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

MetaMask masks error information #8975

Closed
wbt opened this issue Jul 13, 2020 · 2 comments
Closed

MetaMask masks error information #8975

wbt opened this issue Jul 13, 2020 · 2 comments
Assignees
Labels
area-api Sev3-low Low severity; minimal to no impact upon users type-bug

Comments

@wbt
Copy link
Contributor

wbt commented Jul 13, 2020

Describe the bug
Metamask errors obscure helpful information into [object Object] before providing the error to the using dapp.

To Reproduce (REQUIRED)
Trigger an RPC error (sorry, no easy examples of how at the moment).

As shown for example in these postings, when there is an RPC error MetaMask returns (and console-logs) an error message like this:

MetaMask - RPC Error: Error: [ethjs-rpc] rpc error with payload {"id":<long int>,"jsonrpc":"2.0","params":["<longer hex>"],"method":"eth_sendRawTransaction"} [object Object]

where the parts in angle brackets are replaced with real content but the parts in square brackets, including the "[object Object]" at the end is not.

Expected behavior
The [object Object] is not part of the error message string but instead replaced by something more useful, or simply removed and the object is included in the error object alongside "code", "message", and "stack". Something like what's shown at the end of this line would be more useful than [object Object].

Browser details (please complete the following information):

  • OS: Windows 10
  • Browser: 83.0.4103.116 (Official Build) (64-bit)
  • MetaMask Version: 7.7.9

Additional context (Error Messages, etc.)
I suspect somewhere there is a + concatenation between 'rpc error with payload ' and an error object where they should be combined in the same object, and not passed/altered/returned as just a string.

@wbt
Copy link
Contributor Author

wbt commented Jul 14, 2020

I'm also seeing transaction failures masked in the popup, when trying to hover over the failure to learn the reason why:
image
This is not useful UI.

@vandan
Copy link

vandan commented Jul 26, 2022

Duplicates #12646

@vandan vandan closed this as completed Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-api Sev3-low Low severity; minimal to no impact upon users type-bug
Projects
None yet
Development

No branches or pull requests

4 participants