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

Prevent wallet from randomly crashing when current network is Arbitrum #21109

Closed
onyb opened this issue Feb 15, 2022 · 1 comment · Fixed by brave/brave-core#12272
Closed
Assignees
Labels
bug feature/web3/wallet Integrating Ethereum+ wallet support front-end-change This task is a front end task and doesn't need any C++ changes OS/Desktop QA Pass-macOS QA/Yes release-notes/include

Comments

@onyb
Copy link
Member

onyb commented Feb 15, 2022

If the currently selected network is one that does not support Buy and Swap, relaunching the browser will make the wallet crash with a blank page. The following error is seen in the terminal logs / console:

[44944:259:0215/210451.230463:ERROR:CONSOLE(57318)] "Uncaught TypeError: Cannot read properties of undefined (reading 'decimals')", source: chrome://wallet/brave_wallet_page.bundle.js (57318)
[44944:259:0215/210451.233778:ERROR:CONSOLE(234637)] "The above error occurred in the <Send> component:
    in Send (created by SendTab)
    in SendTab (created by BuySendSwap)
    in div (created by MainContainer)
    in MainContainer (created by BuySendSwapLayout)
    in div (created by MainContainerWrapper)
    in MainContainerWrapper (created by BuySendSwapLayout)
    in div (created by StyledWrapper)
    in StyledWrapper (created by BuySendSwapLayout)
    in BuySendSwapLayout (created by BuySendSwap)
    in BuySendSwap (created by Container)
    in div (created by WalletWidgetStandIn)
    in WalletWidgetStandIn (created by Container)
    in div (created by StyledContent)
    in StyledContent (created by wallet_page_layout_WalletPageLayout)
    in div (created by StyledWrapper)
    in StyledWrapper (created by wallet_page_layout_WalletPageLayout)
    in wallet_page_layout_WalletPageLayout (created by Container)
    in Container (created by ConnectFunction)
    in ConnectFunction (created by App)
    in Le (created by BraveCoreThemeProvider_BraveCoreThemeProvider)
    in BraveCoreThemeProvider_BraveCoreThemeProvider (created by App)
    in Router (created by BrowserRouter)
    in BrowserRouter (created by App)
    in Provider (created by App)
    in App

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.", source: chrome://wallet/brave_wallet_page.bundle.js (234637)
[44944:259:0215/210451.241858:ERROR:CONSOLE(57318)] "Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'decimals')", source: chrome://wallet/brave_wallet_page.bundle.js (57318)

To reproduce:

  1. Add Arbitrum network from chainlist.org.
  2. Switch to Arbitrum.
  3. Relaunch the browser.
  4. Wallet page should crash with a blank screen.

⚠️ The issue is not always reproducible easily.

@onyb onyb added bug QA/Yes release-notes/include feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop front-end-change This task is a front end task and doesn't need any C++ changes labels Feb 15, 2022
@onyb onyb self-assigned this Feb 15, 2022
@onyb onyb added this to the 1.37.x - Nightly milestone Feb 15, 2022
@bbondy bbondy added this to Web3 Mar 18, 2022
@bbondy bbondy moved this to Done in Web3 Mar 18, 2022
@Uni-verse
Copy link
Contributor

Verified crashing fix using

Brave 1.37.105 Chromium: 100.0.4896.46 (Official Build) (x86_64)
Revision 5ca33821b2211805855c77d334353d27c616a7ca-refs/branch-heads/4896@{#584}
OS macOS Version 12.1 (Build 21C52)
  • Verified not able to reproduce crash. Tried Arbitrum One, BSC, Moonriver, Cronos chains.

STR:

  1. Add Arbitrum network from chainlist.org.
  2. Switch to Arbitrum.
  3. Relaunch the browser.
  4. Wallet page should crash with a blank screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature/web3/wallet Integrating Ethereum+ wallet support front-end-change This task is a front end task and doesn't need any C++ changes OS/Desktop QA Pass-macOS QA/Yes release-notes/include
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants