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

Sending a tx with a negative gas crashes MetaMask both on FF(8.0.8) and Chrome(8.0.7). #9262

Closed
chebykin opened this issue Aug 18, 2020 · 0 comments · Fixed by #9306
Closed
Labels
Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. type-bug Something isn't working

Comments

@chebykin
Copy link

Describe the bug

Sending a tx with a negative gas crashes MetaMask both on FF(8.0.8) and Chrome(8.0.7).

After enabling/disabling a plugin and reopening a browser the error still persists.

Is there a way to recover access to the accounts after encountering this bug?

image

MetaMask encountered an error
Try again by closing and reopening the popup, or contact support at [email protected]
Error Details

    Message: new BigNumber() not a base 16 number: 0x-1

    Code: BigNumber Error
    Stack:

    $@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:72:44268
    w@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:72:49785
    H@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:72:41732
    w@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:180:666933
    [1501]</r.getHexGasTotal@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:180:662077
    I/<@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:180:625876
    n/</</<@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:165:321725
    dispatch@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:165:324000
    [1479]</r.setTransactionToConfirm/<@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:180:623029
    n/</</<@moz-extension:c40-8145-22eebaaa783e/ui.js:165:321725
    dispatch@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:165:335653
    setTransactionToConfirm@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:180:817889
    componentDidMount@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:180:813784
    vl@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:100808
    require<[949]</r.unstable_runWithPriority@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:220:3472
    Gi@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:45477
    gl@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:97165
    ol@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:87525
    Xi/<@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:45768
    require<[949]</r.unstable_runWithPriority@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:220:3472
    Gi@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:45477
    Xi@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:45715
    Yi@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:45648
    ul@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:87699
    Xl@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:113230
    render@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui-libs.js:117:115151
    [1756]</</r.default/</<@moz-extension://8ebb7b23-1a66-6c40-8145-22eebaaa783e/ui.js:180:1213356

To Reproduce (REQUIRED)
Send a tx with a negative gas like:

await web3.eth.sendTransaction({ from: '0x1e37954857d2fb8d4707c30fa85d5a78d53ccb97', to: '0x1e37954857d2fb8d4707c30fa85d5a78d53ccb97', value: '123', gas: -1})

Negative gasPrice could trigger this error too.

@Gudahtt Gudahtt added Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. type-bug Something isn't working labels Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. type-bug Something isn't working
Projects
None yet
2 participants