I use https://docs.solana.com/developing/lookup-tables An error will be reported when Fetch an Address Lookup Table method is used. Uncaught error: invalid instruction; RangeError: Trying to access beyond buffer length. Can you help me out? Code block: const lookupTableAddress = new web3.PublicKey( "BNhLBVM7rCxCShds7wVgYCqpTZBJnPNsd8gMhc6gGv3g" ); console.log("lookupTableAddress-publicKey:", lookupTableAddress.toBase58()); // get the table from the cluster const lookupTableAccount = await connection .getAddressLookupTable(lookupTableAddress) .then((res) => res.value); // lookupTableAccount will now be a AddressLookupTableAccount object console.log("Table address from cluster:", lookupTableAccount);

1 Answer 1


It looks like this account only exists on devnet: https://explorer.solana.com/address/BNhLBVM7rCxCShds7wVgYCqpTZBJnPNsd8gMhc6gGv3g?cluster=devnet, but it has 0 allocated length and is not assigned to the Address Lookup Table program, which means that it isn't even a lookup table. Perhaps there's a different address that you should be using? You pretty much just need to create the lookup table, then fetching it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.