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

Browser crashes when trying to Swap Solana tokens on brave://wallet/swap #29680

Closed
srirambv opened this issue Apr 13, 2023 · 3 comments · Fixed by brave/brave-core#18081
Closed
Assignees
Labels
bug crash feature/web3/wallet Integrating Ethereum+ wallet support OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Yes release-notes/exclude

Comments

@srirambv
Copy link
Contributor

Description

Browser crashes when trying to Swap Solana tokens on brave://wallet/swap

Steps to reproduce

  1. Create wallet or restore wallet with balance
  2. Open brave://wallet/swap
  3. Select Solana token and try to swap to Raydium
  4. Browser crashes when clicking on Review order

Actual result

Browser crashes when trying to Swap Solana tokens on brave://wallet/swap

Crash ID: de2b0100-6efb-ec09-0000-000000000000

Expected result

No crash

Issue reproduces how often

Happened on ce

Version/Channel Information:

  • Can you reproduce this issue with the current Play Store version? NA
  • Can you reproduce this issue with the current Play Store Beta version? NA
  • Can you reproduce this issue with the current Play Store Nightly version? Yes

Device details

  • Install type (ARM, x86): ARM
  • Device type (Phone, Tablet, Phablet): Phone
  • Android version: 13

Brave version

1.52.40

Website problems only

  • Does the issue resolve itself when disabling Brave Shields? NA
  • Does the issue resolve itself when disabling Brave Rewards?NA
  • Is the issue reproducible on the latest version of Chrome? NA

Additional information

cc: @vadimstruts @Pavneet-Sing @SergeyZhukovsky

@srirambv srirambv added bug crash QA/Yes release-notes/exclude feature/web3/wallet Integrating Ethereum+ wallet support OS/Android Fixes related to Android browser functionality labels Apr 13, 2023
@srirambv srirambv added this to Web3 Apr 13, 2023
@SergeyZhukovsky
Copy link
Member

Crash stack

java.lang.NumberFormatException: Zero length BigInteger
        at java.math.BigInteger.<init>(BigInteger.java:485)
        at org.chromium.chrome.browser.crypto_wallet.util.Utils.multiplyHexBN(Utils.java:553)
        at org.chromium.chrome.browser.crypto_wallet.util.ParsedTransactionFees.calcGasFee(ParsedTransactionFees.java:149)
        at org.chromium.chrome.browser.crypto_wallet.util.ParsedTransactionFees.parseTransactionFees(ParsedTransactionFees.java:119)
        at org.chromium.chrome.browser.crypto_wallet.util.ParsedTransaction.parseTransaction(ParsedTransaction.java:140)
        at org.chromium.chrome.browser.crypto_wallet.fragments.ApproveTxBottomSheetDialogFragment.fillAssetDependentControls(ApproveTxBottomSheetDialogFragment.java:403)
        at org.chromium.chrome.browser.crypto_wallet.fragments.ApproveTxBottomSheetDialogFragment.lambda$setupDialog$3(ApproveTxBottomSheetDialogFragment.java:293)
        at org.chromium.chrome.browser.crypto_wallet.util.SolanaTransactionsGasHelper.lambda$maybeGetSolanaGasEstimations$0(SolanaTransactionsGasHelper.java:77)
        at org.chromium.chrome.browser.crypto_wallet.util.AsyncUtils$MultiResponseHandler.checkAndRunCompletedAction(AsyncUtils.java:66)
        at org.chromium.chrome.browser.crypto_wallet.util.AsyncUtils$MultiResponseHandler.setWhenAllCompletedAction(AsyncUtils.java:49)
        at org.chromium.chrome.browser.crypto_wallet.util.SolanaTransactionsGasHelper.maybeGetSolanaGasEstimations(SolanaTransactionsGasHelper.java:68)
        at org.chromium.chrome.browser.crypto_wallet.fragments.ApproveTxBottomSheetDialogFragment.lambda$setupDialog$4(ApproveTxBottomSheetDialogFragment.java:286)
        at org.chromium.chrome.browser.crypto_wallet.util.TokenUtils.lambda$getAllTokensFiltered$3(TokenUtils.java:139)
        at org.chromium.brave_wallet.mojom.BraveWalletService_Internal$BraveWalletServiceGetUserAssetsResponseParamsForwardToCallback.accept(BraveWalletService_Internal.java:2397)
        at org.chromium.mojo.bindings.RouterImpl.handleIncomingMessage(RouterImpl.java:235)
        at org.chromium.mojo.bindings.RouterImpl$HandleIncomingMessageThunk.accept(RouterImpl.java:33)
        at org.chromium.mojo.bindings.Connector.readAndDispatchMessage(Connector.java:210)
        at org.chromium.mojo.bindings.Connector.readOutstandingMessages(Connector.java:176)
        at org.chromium.mojo.bindings.Connector.onWatcherResult(Connector.java:152)
        at org.chromium.mojo.bindings.Connector$WatcherCallback.onResult(Connector.java:142)
        at org.chromium.mojo.system.impl.WatcherImpl.onHandleReady(WatcherImpl.java:56)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:339)
        at android.os.Looper.loopOnce(Looper.java:186)
        at android.os.Looper.loop(Looper.java:351)
        at android.app.ActivityThread.main(ActivityThread.java:8381)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)

@kjozwiak
Copy link
Member

The above requires 1.50.120 or higher for 1.50.x verification 👍

@srirambv
Copy link
Contributor Author

Verification passed on following devices running 1.50.120 x64 build

  • Verified steps from brave/brave-core#18081 and issue description
  • Verified no browser crash when initiating Swap from brave://wallet/swap
  • Verified no browser crash when initiating Swap on Solana or Ethereum
Oppo Reno 5(Android 13) Lenovo Tab (Android 12)
29680-ARM.mp4
29680-Tab.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash feature/web3/wallet Integrating Ethereum+ wallet support OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Yes release-notes/exclude
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants