metaplex-foundation / js

A JavaScript SDK for interacting with Metaplex's programs
357 stars 182 forks source link

metaplex.nfts().findAllByOwner() error #447

Open sunxxg opened 1 year ago

sunxxg commented 1 year ago
const connection = new Connection(clusterApiUrl("mainnet-beta"));
const metaplex = new Metaplex(connection, { cluster: 'mainnet-beta' });
const ownerAddress = new PublicKey("C3HC8DrAoQqiWdCvo4u4nJATfmsHxwg3cZx18cUm9wuH");
const nft = await metaplex.nfts().findAllByOwner({ owner: ownerAddress }).run();
console.log(nft)

[Error: 410 undefined: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}, "id": "9b1b48e1-559d-42e8-aa0a-aa6402f27ab8" } ]

8bithero commented 1 year ago

Looks like you are using an RPC that doesn't support this call for whatever reason. Try using a different RPC server II usually use the free tier on https://syndica.io and haven't had any issues :)