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

[Sentry] Error: Internal JSON-RPC error. #20315

Open
sentry-io bot opened this issue Jul 31, 2023 · 12 comments
Open

[Sentry] Error: Internal JSON-RPC error. #20315

sentry-io bot opened this issue Jul 31, 2023 · 12 comments
Labels
area-Sentry error reporting to sentry ready-for-dev regression-prod-10.34.1 regression-prod-11.2.0 Regression bug that was found in production in release 11.2.0 regression-prod-11.6.0 Regression bug that was found in production in release 11.6.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-wallet-api-platform type-bug

Comments

@sentry-io
Copy link

sentry-io bot commented Jul 31, 2023

Sentry Issue: METAMASK-X62Q

Error: Internal JSON-RPC error.
  at new EthereumRpcError (node_modules/eth-rpc-errors/dist/classes.js:18:1)
  at getEthJsonRpcError (node_modules/eth-rpc-errors/dist/errors.js:118:1)
  at exports.ethErrors.rpc.internal (node_modules/eth-rpc-errors/dist/errors.js:28:1)
  at parseResponse (node_modules/@metamask/eth-json-rpc-middleware/dist/fetch.js:100:1)
  at <anonymous> (node_modules/@metamask/eth-json-rpc-middleware/dist/fetch.js:57:1)
...
(1 additional frame(s) were not displayed)
@gauthierpetetin
Copy link
Contributor

Events in past 14 days: 731

@gauthierpetetin
Copy link
Contributor

The error indicates an internal JSON-RPC error with MetaMask. In this particular case, the error mentions that the transaction reverted without a reason string. This often means that the smart contract's function was called with parameters or in a state that caused it to fail, but no specific error message was provided by the contract.

@danjm
Copy link
Contributor

danjm commented Aug 11, 2023

There are actually multiple different errors being grouped in here. Examples:

  "code": -32603,
  "message": "Internal JSON-RPC error.",
  "data": {
    "code": -32000,
    "message": "header not found"
  },
  "code": -32603,
  "message": "Internal JSON-RPC error.",
  "data": {
    "code": -32602,
    "message": "Block with such an ID doesn't exist yet"
  },
  "code": -32603,
  "message": "Internal JSON-RPC error.",
  "data": {
    "code": -32000,
    "message": "cannot query unfinalized data"
  },
  "message": "Internal JSON-RPC error.",
  "data": {
    "code": -32000,
    "message": "missing trie node 1c3f42345fbf34a12934730eb5ff6cd2e3283aaa3d929cc2485542e0bc702161 (path ) state ******************************************3d929cc2485542e0bc702161 is not available, not found"
  },

It seems that these cases are all a result of errors coming from the network provider.

As a first step with this task, we should probably focus on having the errors properly reported in sentry, with the data.message being what is reported to sentry instead of all these different errors being grouped under Internal JSON-RPC Error. Then we can figure out which can be ignored, which require special handling, and which indicate a bug that needs to be fixed.

@sentry-io
Copy link
Author

sentry-io bot commented Oct 30, 2023

Sentry issue: METAMASK-X7G7

@metamaskbot metamaskbot added the regression-prod-11.2.0 Regression bug that was found in production in release 11.2.0 label Oct 30, 2023
@gauthierpetetin gauthierpetetin added the Sev2-normal Normal severity; minor loss of service or inconvenience. label Nov 6, 2023
@gauthierpetetin
Copy link
Contributor

Next step suggested by @danjm would be a good topic to prioritise in a future Sentry sprint.

Copy link
Author

sentry-io bot commented Nov 30, 2023

Sentry issue: METAMASK-X7T3

@metamaskbot metamaskbot added the regression-prod-11.6.0 Regression bug that was found in production in release 11.6.0 label Nov 30, 2023
Copy link
Author

sentry-io bot commented Mar 4, 2024

Sentry Issue: METAMASK-X7MY

Copy link
Author

sentry-io bot commented Mar 4, 2024

Sentry Issue: METAMASK-X8DR

@gauthierpetetin
Copy link
Contributor

Related issue: #5907

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Jul 11, 2024
@gauthierpetetin gauthierpetetin removed the stale issues and PRs marked as stale label Jul 12, 2024
@gauthierpetetin
Copy link
Contributor

Example steps to reproduce in this issue (switching network multiple times): #25785

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Oct 13, 2024
@gauthierpetetin gauthierpetetin removed the stale issues and PRs marked as stale label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Sentry error reporting to sentry ready-for-dev regression-prod-10.34.1 regression-prod-11.2.0 Regression bug that was found in production in release 11.2.0 regression-prod-11.6.0 Regression bug that was found in production in release 11.6.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-wallet-api-platform type-bug
Projects
Status: To be fixed
Status: To be fixed
Development

No branches or pull requests

3 participants