Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid JSON RPC response: {"id":15,"jsonrpc":"2.0","error":{"code":-32603}} #3140

Closed
vpomo opened this issue Jan 30, 2018 · 53 comments
Closed
Assignees
Labels
area-provider Relating to the provider module. type-bug

Comments

@vpomo
Copy link

vpomo commented Jan 30, 2018

Does not work from January 26, 2018.
I, too, have such a mistake. She appeared since January 26, 2018. I know for sure that it was not on January 25, 2018. I implemented a smart contract without the error. On January 27, 2018, I was no longer able to make this smart contract a reality. The error manifests itself when a smart contract is made with parameters. On the main network, this error exists. On the network Ropsten it is not.
Everyone talks about this:
https://gitter.im/ethereum/remix

@vpomo
Copy link
Author

vpomo commented Jan 30, 2018

It's still:
https://ethereum.stackexchange.com/questions/37806/invalid-json-rpc-response-when-creating-contract/37818#37818

The contract must be with parameters and nested other contracts

@citrixrep
Copy link

this problem fix using Brave, with firefox and chrome dont work on mainnet

@danfinlay
Copy link
Contributor

We believe we found the source of this and that it has been fixed. Let us know if it is not fixed, and I will reopen the issue.

We recently switched our Infura connection to a RESTful API, to reduce network load on them. Part of that required allowing differently structured requests, to account for contract publishing payloads under the new API.

@aphexyuri
Copy link

I'm still experiencing this right now

@raoneel
Copy link

raoneel commented Feb 2, 2018

Still experiencing this as well on Remix. I can deploy some contracts, but for a larger contract I'm getting this exact error.

Network: Rinkeby
Browser: Chrome 63, Mac OSX

@mckapur
Copy link

mckapur commented Feb 2, 2018

Having the same issue! :/ Also using Remix, main network. Chrome 63 on Mac OS X.

@allurco
Copy link

allurco commented Feb 2, 2018

Please Re-open the issue, this is not fixed yet.

@younseunghyun
Copy link

It is not fixed TT, plz reopen issue

@olgierds
Copy link

olgierds commented Feb 2, 2018

@danfinlay
Hi, it's still not fixed.

@danfinlay danfinlay reopened this Feb 2, 2018
@danfinlay
Copy link
Contributor

Can anyone please provide reprosuction steps, ideally for a test network? We have not reproduced this problem.

@danfinlay
Copy link
Contributor

Ok we may have a reproduction contract here:
#3117 (comment)

@sameepsi
Copy link

sameepsi commented Feb 2, 2018

Yes I am still able to reproduce it using remix.
Here are the steps-:

  1. The sample code is available in the following gist- https://gist.github.com/sameepsi/c2e09cc0782e6dbf0ae0980a90e9098f
  2. The contract parameters are 10000000, "TEST", "test"

The compiler version I am using in remix is 0.4.18

@danfinlay
Copy link
Contributor

Alright, thanks @sameepsi, I've been able to reproduce this issue, Infura is throwing a 500 error in response to this constructor. I suspect it has to do with some changes we recently made to our API connection to them.

We should have this fixed soon, but in the meanwhile, you should be able to work around it by clicking the top-left provider menu in MetaMask, and entering https://mainnet.infura.io/500workaround, or the address of another ethereum client running an RPC service.

@olgierds
Copy link

olgierds commented Feb 2, 2018

Thanks,
rinkeby also works on
https://rinkeby.infura.io/500workaround

@massimo110
Copy link

same error in https://rinkeby.infura.io/500workaround
Invalid JSON RPC response: {"id":824,"jsonrpc":"2.0","error":{"code":-32601}}

@massimo110
Copy link

https://rinkeby.infura.io/500workaround not work for me.

@chebykin
Copy link

chebykin commented Feb 8, 2018

In my private aura network, I'm facing the same error.
I use Remix <-> MetaMask v3.14.1 (Chrome) <-> Parity v1.9.2

  • transactions with state modification - fail with 32603 error
  • transactions without state modifications - calls work fine

@danfinlay
Copy link
Contributor

This should be fixed. For those reporting this is not fixed (@olgierds, @massimo110, @chebykin), please provide fresh reproduction steps, since the excellent steps provided above no longer cause a problem.

@oschvr
Copy link

oschvr commented Feb 13, 2018

Im still getting the error at remix when I click debug, I've tried all steps above and also tried to use the /500workaround

@danfinlay
Copy link
Contributor

The /500workaround endpoint is now irrelevant, its fix should be deployed to all networks.

Since no core devs can reproduce, the debugging needs to be done by someone who can reproduce.

Try opening the background inspector, and looking at the Network tab when making this request. Click on the request that should be publishing, and look at its response. What's the error?

Bonus: Right click that request, click copy as cURL, and send it to us, maybe at support@metamask.io, so we can debug very precisely at the provider layer.

@chebykin
Copy link

@danfinlay, thank you for the instructions!

As for me, it looks like a problem with Parity aura engine or it's config. This is a request/response pair from the Parity node rpc logs:

2018-02-14 15:17:10 TRACE rpc Request: {"id":2637171441,"jsonrpc":"2.0","params":[{"from":"0x3c6463e6bb1d5879c54a2240545e3a629cf09358","to":"0xaa488f54fa157e8dfee11561ea40b2ba6ef161ba","value":"0x0","data":"0xbc201a9d0000000000000000000000000daa3d4b5a83ec4175277027483657165452a242"}],"method":"eth_estimateGas"}.

2018-02-14 15:17:10 DEBUG rpc Response: {"jsonrpc":"2.0","error":{"code":-32015,"message":"Transaction execution error.","data":"Internal(\"Requires higher than upper limit of 47000000\")"},"id":2637171441}.

The two frustrating things about MetaMask response are:

  • a different than in the server response error code
  • a dropped off error description.

@sameepsi
Copy link

@chebykin As far as I can see from the logs you need to increase the gas limit for the deployment of your contract.

@chebykin
Copy link

@sameepsi, Thank you for the suggestion! But this is a contract method invocation, not a contract deployment. The contract is a consensus contract and is hardcoded into the chain.json file as a bytecode, so it's already deployed.
If I ignore a gas estimation step, the transaction execution goes fine. Will try to find something in Parity issue tracker.

@danfinlay
Copy link
Contributor

Will try to find something in Parity issue tracker.

Let us know how that goes.

I'm a little curious why some people reported this isn't working on Infura, though. They are running Geth right now, not Parity.

@chebykin
Copy link

In my case, it was my mistake with chain state which lead to the response I described above. I tried to invoke gas estimation request against the brand new chain with no blocks mined yet. The error response disappeared after the first block was mined.

As I see here https://github.com/kumavis/json-rpc-engine/blob/b5185e5d6e75717745269f5f4be65af42bf6bb40/src/index.js#L107 the -32602 error is a default one, so it could wrap any error from the server.

@danfinlay danfinlay self-assigned this Feb 26, 2018
@antogh
Copy link

antogh commented Mar 9, 2018

I'm having the same issue described by @jtakalai above.

I use remix + metamask inside chrome, on the rinkeby testnet.

All work fine when I deploy a contract or interact with previously deployed contract at some address.

The failure comes when I use the debugger tab to debug a certain transaction. I enter the block/tx paramaeters , then click start debugging and, boom, I get the error:
"Invalid JSON RPC response: {"id":30,"jsonrpc":"2.0","error":{"code":-32603}}"

Notice that if in Remix I change the environment from the metamask provided "injected web3" to my local geth node "web3 provider" the debugger with the very same transaction works flawlessly, so the problem must be in the way metamask is handling the bridge for this kind of operation.

Shouldnt be difficult to reproduce this problem, but in case you are unable to I can provide further details (the only problem is that github email notifications never worked for me, I have to check manually, in polling mode, if someone replied to my posts)

Any help, workaround to solve this issue greatly appreciated, keeping a local node always in sync with Eth blockchain is already annoying on rinkeby, don't want to imagine how hard can be on the main net.

Thank you

@danfinlay
Copy link
Contributor

You can work around this for now by entering this custom RPC endpoint:
https://mainnet.infura.io/metamask

Where”mainnet” can be most network names.

@antogh
Copy link

antogh commented Mar 9, 2018

thanks Dan,
where i should enter this setting exactly? Remix settings, metamask?
and ...
should I use
https://rinkeby.infura.io/metamask
since I am on the rinkeby net?

@antogh
Copy link

antogh commented Mar 9, 2018

just tried
https://rinkeby.infura.io/metamask
in remix as web3 provider endpoint
interacts correctly with a deployed contract
but starting debugger on the prevsiously mentioned tx produces always
Invalid JSON RPC response: ""
so to be able to debug I'm stuck with my geth local node that needs to download all the ethereum blockchain

@danfinlay
Copy link
Contributor

You should enter the custom rpc url in MetaMask. Find “Custom RPC” in the network menu when you click the network name in MetaMask.

@antogh
Copy link

antogh commented Mar 9, 2018

Set the custom RPC as you suggested, used address
https://rinkeby.infura.io/metamask
now MetaMask says "Private network" on top left corner
tried remix: interacting with the contract , reading functions works fine, but...
trying to start debugger on any transaction gives me the same error :((( with slight different code:
Invalid JSON RPC response: {"id":68,"jsonrpc":"2.0","error":{"code":-32601}}
before was
Invalid JSON RPC response: {"id":30,"jsonrpc":"2.0","error":{"code":-32603}}
any new idea?

@danfinlay
Copy link
Contributor

Oh, MetaMask doesn't support the remix debugger yet. Sorry I didn't understand that's what you were trying to do. We do have a PR for adding it in client-side, and it may be merged soon, but it does not work yet.

We're also going to be fixing these undescriptive errors soon.

@antogh
Copy link

antogh commented Mar 10, 2018

What a pity :( ...
This would be a killer feature, AFAIK there is no way to debug a TX with source trace without having a local node in sync with the whole ETH blockchain, this is time and resource consuming. Etherscan has a debug feature but without the source trace (useless IMO)
If you provide such a tool it would be a relief for many.
If you look at the @jtakalai post above for example he is trying to do the same I guess.
Hope to receive good news from Metamask soon.

@danfinlay
Copy link
Contributor

Yes, it would be a killer feature...
#3482

@fan31415
Copy link

I get the same error too, luckly I fix it later. Hope these info will help :)

Environment

ganache-cli in docker
truffle:4.1.3
soldity:0.4.19

Reproduction

  1. I add a function in my contract
  2. use truffle migration to deploy my contract
  3. invoke this function in js by using truffle-contract's contract instance
  4. encounter this error.

Solution

Use truffle migration --reset in step 2.

@ltfschoen
Copy link

ltfschoen commented Mar 27, 2018

I fixed this error by updating to the latest Node.js, Truffle, Ganache-CLI, i.e.

$ nvm use v9.8.0;
$ node --version
v9.8.0
$ npm install -g truffle ganache-cli;
$ truffle --version
Truffle v4.1.3 - a development framework for Ethereum
$ ganache-cli version
Ganache CLI v6.1.0 (ganache-core: 2.1.0)

I then restarted Ganache CLI, redeployed my contracts (i.e. truffle migrate --reset --network development;) and restarted my front-end, and then my code worked without the error

@jetaggart
Copy link

jetaggart commented Apr 4, 2018

I received this error using firefox and a sample app. The application works fine in Chrome (65.0.3325.181). This may help diagnose as this is a very small, self contained example app.

Environment
Firefox 59.0.2 (64-bit)
macOS 10.13.13
Metamask 3.13.8
https://github.com/f-o-a-m/purescript-web3-example -- built from scratch no modifications

Reproduction

  1. Follow steps in repo to build sample app
  2. Navigate to http://0.0.0.0:8080/ in Firefox
  3. Select Metamask from dropdown
  4. Submit new count
  5. Observe console error: Error: Invalid JSON RPC response: "", Error Code: -32603

Solution
Use chrome

@ltfschoen
Copy link

It was also important for me to redeploy the contracts if I restarted TestRPC with truffle migrate --reset --network development;

@mitsuaki-u
Copy link

Same issue using Firefox 59.0.2 and MetaMask 3.13.8.

@danfinlay
Copy link
Contributor

I received this error using firefox and a sample app. The application works fine in Chrome

Firefox has recently been a bit slower about deploying our latest fixes, we are working with them to improve this process. It's very possible this bug has been fixed in our latest release, but on Firefox we need to get our builds perfectly deterministic before we can get reliable deploys anymore.

@dmi3y
Copy link

dmi3y commented Apr 27, 2018

In my case all I had to do is to connect account (with funds) to metamask

@bdresser
Copy link
Contributor

bdresser commented Jun 6, 2018

@bitpshr was this fixed by #4433 ?

@bitpshr
Copy link
Contributor

bitpshr commented Jun 6, 2018

@bdresser I don't think this is related to #4433. That PR fixed a specific issue where certain RPC errors were only being logged on the client, not actually thrown. This sounds like a different FireFox-specific issue and one that may be fixed already, it just needs investigation.

@bdresser
Copy link
Contributor

@psylinse @bitdom0 firefox is now up to date with Chrome & our most recent release (4.7.4) – are you still seeing this issue?

@talaikis
Copy link

At least for me, all rpc 32603 errors are due to my own fault, like 3 reasons: 1) not having latest contract json in dApp, 2) migrations not reset, or 3) wrong network (json specifies one, you try to connect to another). Metamask works fine.

@bdresser bdresser removed the P1-asap label Jun 20, 2018
@birdkingz
Copy link

birdkingz commented Aug 28, 2018

MetaMask - RPC Error: Internal JSON-RPC error. {code: -32603, message: "Internal JSON-RPC error."}
while calling estimateGas on my contract.

The contract is working fine because if I don't use metamask then I'll be able to call the function.
Anyone has got this issue solved?

Metamask version: 4.9.3
Chrome version: 68

PS: Happens in Firefox too

@danfinlay
Copy link
Contributor

@birdkingz This thread has become a catch-all for people receiving this generic error code. Please open a new issue, and include specific reproduction steps, such as a Dapp or your contract's address and the transaction whose estimation fails.

@kumavis
Copy link
Member

kumavis commented Oct 10, 2018

If you encounter an issue similar to this, please open a new issue, and include specific reproduction steps, such as a Dapp or your contract's address and the transaction whose estimation fails.

@m1z4rd
Copy link

m1z4rd commented Nov 21, 2021

Metamask Team, your wallet is so rad.

But there's still an error deploying on Remix Plugin for vscode.

there are errors deploying: error: invalid json rpc response: {"id":36,"jsonrpc":"2.0"}
I had to use ganache instead.

Hopefully, you can fix it.

Thanks in advance

@kumavis
Copy link
Member

kumavis commented Nov 22, 2021

@m1z4rd filed a new issue here #12788
please add more information about how you encountered this

@MetaMask MetaMask locked as resolved and limited conversation to collaborators Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-provider Relating to the provider module. type-bug
Projects
None yet
Development

No branches or pull requests