project-serum / serum-dex

Project Serum Rust Monorepo
https://projectserum.com
Apache License 2.0
625 stars 327 forks source link

Error: 410 Gone: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."} #195

Open kinghchan opened 2 years ago

kinghchan commented 2 years ago

Serum javascript library is broken.

How to re-create issue:

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

fanatid commented 2 years ago

How is data provider issue related to serum?

kinghchan commented 2 years ago

I believe it is related to Serum because it breaks the Market.placeOrder() function in the '@project-serum/serum' javascript library.

Please could you give your opinion on why this is happening and what the root cause is? I'm slightly loss here.

This 410 issue only seems occur for this specific program ID, so naturally I thought it might be related to Serum.

I googled "The RPC call or parameters have been disabled" and haven't seen any useful results.

Thank you.

fanatid commented 2 years ago

You need to change the data provider and close the issue since curl has zero relations with serum-dex.

BriungRi commented 2 years ago

Having this issue too. This is node.js code for me, not even curl

vbenvenuto commented 2 years ago

This is related. I am having the same issue trying to run the example here.

Error: 410 Gone:  {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}, "id": "7e752b88-8e82-4cba-ad41-2b97475400bc" }
     at ClientBrowser.callServer (/Users/*/swap-serum-client/node_modules/@solana/web3.js/lib/index.cjs.js:4423:18)
     at processTicksAndRejections (node:internal/process/task_queues:96:5)
quazzuk commented 2 years ago

I see the same issue with 2 different node providers

abi commented 2 years ago

Try the Serum RPC endpoint "https://solana-api.projectserum.com". That works for me. But this does seem like an issue that needs to be fixed because the Solana Labs endpoint does error out during the placeOrder call.

ludekvodicka commented 2 years ago

The same issue here. RPC 'https://solana-api.projectserum.com' works ok but default clusterApiUrl('mainnet-beta') not.

madhushriv commented 2 years ago

Same issue - not working with "https://solana-api.projectserum.com/" rpc endpoint either.

thislooksrare commented 2 years ago

got same issue here, same with the Genesysgo RPC https://ssc-dao.genesysgo.net/

rashidkhokhar98 commented 2 years ago

both clusterApiUrl('mainnet-beta') and https://solana-api.projectserum.com are not working for me ..... trying getProgramAccounts but getting error: Error: 410 Gone: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}, "id": "8d5781a4-46ff-414d-b6d4-512c000356fd" } at ClientBrowser.callServer (connection.ts:849)

easydeveloppement commented 2 years ago

I have the same problem here with getParsedProgramAccounts on the solana mainnet api network, i have the 410 gone error, on serum network i have 504 gateaway timeout problem... Any idea ?! it was working great a few days ago

w4t3r-45 commented 2 years ago

same issue , i resolved it by using QuickNode RPC

MrAlexWinkler commented 2 years ago

same issue , i resolved it by using QuickNode RPC

Did you pay the $90 / month for the endpoint service?

I'm also getting this issue.. very frustrating.

image

jimmyntu commented 2 years ago

QuickNode gives me other error when I trying to place an order in Serum. by using serum lib. Does that work for you? I'm trying to see if QuickNode solves the problem.

The same code works when using https://solana-api.projectserum.com/. (But this one is very flaky. not always get through).

(node:91896) UnhandledPromiseRejectionWarning: Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x1000760
    at Connection.sendEncodedTransaction (/Users/jiaming/my_project/crypto-trading/node-try/node_modules/@solana/web3.js/lib/index.cjs.js:6937:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Connection.sendRawTransaction (/Users/jiaming/my_project/crypto-trading/node-try/node_modules/@solana/web3.js/lib/index.cjs.js:6897:20)
    at async Connection.sendTransaction (/Users/jiaming/my_project/crypto-trading/node-try/node_modules/@solana/web3.js/lib/index.cjs.js:6887:12)
    at async Market._sendTransaction (/Users/jiaming/my_project/crypto-trading/node-try/node_modules/@project-serum/serum/lib/market.js:510:27)
    at async Market.placeOrder (/Users/jiaming/my_project/crypto-trading/node-try/node_modules/@project-serum/serum/lib/market.js:251:16)
    at async run_serum (/Users/jiaming/my_project/crypto-trading/node-try/serum-test.js:47:28)
(node:91896) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:91896) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Git-Marco-86 commented 1 year ago

Hi, i have same problem. I use React and Hooks. I searched a lot on Web but i didn't find a solution.

This is the function:

const getNftsForOwnerByAddressAndChainNameSolana = async (address, chainName) => {
  const connection = new Connection(clusterApiUrl(chainName), "confirmed");
  const keypair = Keypair.generate();

  const metaplex = new Metaplex(connection);
  metaplex.use(keypairIdentity(keypair));

  const owner = new PublicKey(address);
  const allNFTs = await metaplex.nfts().findAllByOwner({ owner });

  console.log(allNFTs);
}

Where chainName = "mainnet-beta"; and address is a real Solana address.

And this is the error: Error: 410 Gone: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}

I tried to connect to the cluster "devnet". so, chainName = "devnet"; The request has a success response and the program works, but i need to connect to the cluster "mainnet-beta".

How to solve this? Don't need an API Key? Alchemy uses an API Key and it works great.

alex09poletaev commented 1 year ago

Hi, i have same problem. I use React and Hooks. I searched a lot on Web but i didn't find a solution.

This is the function:

const getNftsForOwnerByAddressAndChainNameSolana = async (address, chainName) => {
  const connection = new Connection(clusterApiUrl(chainName), "confirmed");
  const keypair = Keypair.generate();

  const metaplex = new Metaplex(connection);
  metaplex.use(keypairIdentity(keypair));

  const owner = new PublicKey(address);
  const allNFTs = await metaplex.nfts().findAllByOwner({ owner });

  console.log(allNFTs);
}

Where chainName = "mainnet-beta"; and address is a real Solana address.

And this is the error: Error: 410 Gone: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}

I tried to connect to the cluster "devnet". so, chainName = "devnet"; The request has a success response and the program works, but i need to connect to the cluster "mainnet-beta".

How to solve this? Don't need an API Key? Alchemy uses an API Key and it works great.

Same problem. Are there any solutions?