Ethereum Asked by The Renaissance on November 26, 2020
I’m using MetaMask with an app I’m developing, and previously working functions are now returning a quite ferocious error.
This error has been duplicated on a number of functions in the platform, so I won’t provide specific code to any given function. All of them are web3 functions that submit transactions – functions that only read data from the chain work fine.
I also checked just sending Rinkeby ETH to another account, and that also failed.
Here’s the error:
Error: [ethjs-query] while formatting outputs from RPC
'{
"value":{"code":-32603,"message":"Internal JSON-RPC error.",
"data":{"code":-32000,"message":"invalid sender"},
"stack":"o@moz-extension://125500d6-db15-4fb6-bc31-b59dc631b8ab/background.js:60:358924ns@moz-extension://125500d6-db15-4fb6-bc31-b59dc631b8ab/background.js:60:361390ninternal@moz-extension://125500d6-db15-4fb6-bc31-b59dc631b8ab/background.js:60:361794nl@moz-extension://125500d6-db15-4fb6-bc31-b59dc631b8ab/background.js:60:35483n[715]</</t.exports/<@moz-extension://125500d6-db15-4fb6-bc31-b59dc631b8ab/background.js:60:34640n"
}}'
As per this I tried resetting the account in MetaMask, but it did not help.
What causes this error? I see that it’s saying the sender is invalid, but can’t figure out what that means in this context. Thoughts?
Update: In response to @goodvibration’s request for code, I will put some code from one of the functions that failed. As stated above, many functions failed, in fact any function writing to the chain, and not only functions failed, a simple send from inside MetaMask (sending Rinkeby Ether from one address to another) also failed, clearly demonstrating that this is not an issue with code.
Here’s an example function:
const signer = props.injectedProvider.getSigner()
const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS, abi, signer);
const result = await contract.updateRole(arg1, arg2, name)
.then(() => submitted())
.catch(e => err(e));
This is React code. The injectedProvider
is an ethers.js provider passed in from higher up in the component tree as props. The contract address is stored as an env var, and functions correctly. updateRole
is the name of the function being called in the target contract. submitted
and err
are popup notifications defined elsewhere in the code.
Even if there were to be a problem in the code, though, it would not be the (only) cause of the error mentioned above. As stated before, my rationale for this is that even simple sends inside MetaMask fail with the exact same error. Thanks!
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP