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: [ethjs-query] while formatting outputs from RPC - header not found_Last 30 Days: 66k #14676

Closed
sentry-io bot opened this issue May 10, 2022 · 3 comments · Fixed by #21035
Closed
Labels
area-Sentry error reporting to sentry release-11.3.0 Issue or pull request that will be included in release 11.3.0 stability team-extension-platform
Milestone

Comments

@sentry-io
Copy link

sentry-io bot commented May 10, 2022

Sentry Issue: METAMASK-MD7V

Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"message":"Internal JSON-RPC error.","data":{"code":-32000,"message":"header not found"},"stack":"{\n  \"code\": -32603,\n  \"message\": \"Internal JSON-RPC error.\",\n  \"data\...
  at Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"message":"Internal JSON-RPC error.","data":{"code":-32000,"message":"header not found"},"stack":"{\n  \"code\": -32603,\n  \"message\": \"Internal JSON-RPC error.\",\n  \"d... (metamask/common-0.js:1:111705)\\n    at s ()
  at None (metamask/common-0.js:18:164824)

Last 30 Days: 66K

@seaona seaona added this to the Sentry-Error milestone May 10, 2022
@seaona seaona changed the title Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"message":"Internal JSON... Sentry Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"message":"Internal JSON... May 10, 2022
@seaona seaona changed the title Sentry Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"message":"Internal JSON... Sentry Error: [ethjs-query] while formatting outputs from RPC - header not found May 10, 2022
@seaona
Copy link
Contributor

seaona commented May 10, 2022

Problem: I've encountered the header not found issue while making an RPC call to my ganache local instance. I couldn't find solid repro steps, but it seems that the problem is more on the network side than on Metamask side, so we just need to handle the error correctly.

Here is the issue on Ganache repo trufflesuite/ganache#615

header-not-found.mp4

@bschorchit bschorchit added the area-Sentry error reporting to sentry label May 16, 2022
@segun
Copy link
Contributor

segun commented May 19, 2022

The sentry issue linked here is different from "header not found"

@hilvmason hilvmason changed the title Sentry Error: [ethjs-query] while formatting outputs from RPC - header not found Sentry Error: [ethjs-query] while formatting outputs from RPC - header not found_Last 30 Days: 6 May 24, 2022
@seaona
Copy link
Contributor

seaona commented May 25, 2022

@segun due to a new re-grouping algorithm on Sentry, the link was pointing to the wrong error. I've updated the link to the correct Sentry error and also the occurrence rate on the description (FYI @hilvmason).

Just to add extra info on the bug: I can confirm the header not found issues lays on the network side. This means that on Metamask side we should just simply handle the error, so it does not appear on Sentry.

I could repro it on another network, aside from Ganache. See steps:

  1. Add Network
  1. Open Swap page
  2. Fill data and click Review Swap
  3. Wait there for the RPC calls, and if you wait long enough (~a couple of minutes) you'll see one of the header not found errors

image

@seaona seaona changed the title Sentry Error: [ethjs-query] while formatting outputs from RPC - header not found_Last 30 Days: 6 Sentry Error: [ethjs-query] while formatting outputs from RPC - header not found_Last 30 Days: 66k May 25, 2022
@digiwand digiwand assigned digiwand and unassigned digiwand May 31, 2022
brad-decker added a commit that referenced this issue Sep 26, 2023
## **Description**
Our fork of ethjs-query has been namespaced to the `@metamask/`
namespace, and updated with mostly development only fixes. There is one
exception which is the reason for this pull request which is the removal
of a try/catch that was catching too broadly and wrapping legitimate
errors in a new Error object that claimed the issue was with the
formatting of the output. In most cases this is incorrect and results in
a wide swath of errors being lumped together inside of sentry. This
change will result in the real errors being surfaced, after which we can
decide where to prioritize efforts to resolve RPC issues.

This PR progresses, and is expected to change the stack trace for the
following issues:
#9317 
#10519 
#10619
#11488 
#11974 
#13395 
#14298 
#14365 
#15250 
#17073 
#17803 
#19697 
#20699 

We are closing these issues opened automatically by sentry-io which are
not fully resolved but should result in better errors and stack traces:

fixes #10552 
fixes #14660 
fixes #14676 
fixes #14730 
fixes #14801
fixes #15065 

## **Manual testing steps**
1. Attempt to reproduce any of the bugs listed, 17073 was the easiest to
reproduce for me. This involves getting test currency from the wemix
faucet as listed in the issue and initiating a transaction between two
accounts you own.
2. On develop you'll see an 'error formatting outputs' error text
similar to what is reported in the issue.
3. On this branch you'll get the original error, without the wrapped
'formatting' error. including a different stack trace.

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [x] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: MetaMask Bot <[email protected]>
@metamaskbot metamaskbot added the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Sep 26, 2023
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 release-11.3.0 Issue or pull request that will be included in release 11.3.0 stability team-extension-platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants