project-serum / serum-ts

Project Serum TypeScript monorepo
https://projectserum.com
Apache License 2.0
273 stars 246 forks source link

Error: 410 Gone #186

Open v0idum opened 3 years ago

v0idum commented 3 years ago

Getting this error when try to run this example https://github.com/project-serum/serum-ts/blob/master/packages/swap/examples/swap.js from swap package: Error: 410 Gone: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}, "id": "3b56fc88-1bd6-4b12-86b1-42482f87a777" }

at ClientBrowser.callServer (/home/aven/WebstormProjects/serum-ts/packages/swap/node_modules/@solana/web3.js/lib/index.cjs.js:4423:18)
at processTicksAndRejections (internal/process/task_queues.js:95:5)

Screenshot from 2021-11-12 13-59-54

What is wrong?

kinghchan commented 2 years ago

I'm seeing the same issue.

How to reproduce this issue with JSON-RPC: curl https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d ' {"jsonrpc":"2.0", "id":1, "method":"getProgramAccounts", "params":["9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"]} '

The program ID is the Serum DEX V3 (see link below) https://explorer.solana.com/address/9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin/tokens

phlqp commented 2 years ago

Use this RPC: https://solana-api.projectserum.com to fix

armaniferrante commented 2 years ago

Note that getProgramAccounts is disabled for some RPC servers. Hence the error.