MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.93k stars 4.88k forks source link

[Bug]: Multichain - when there are three unapproved transactions across different networks, confirming the first one causes MetaMask to break with an error: 'Message: Minified React error #185; ...' #25596

Closed sleepytanya closed 2 months ago

sleepytanya commented 3 months ago

Describe the bug

When there are three unapproved transactions across different networks, confirming the first one causes MetaMask to break with an error: Message: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. STX toggle is OFF. Latest v12.0.0 build

Expected behavior

-

Screenshots/Recordings

https://github.com/MetaMask/metamask-extension/assets/104780023/8df97df9-efeb-4201-a152-f6433a70fd1a

Screenshot 2024-06-29 at 02 08 41

Steps to reproduce

  1. Connect to Polygon on Uniswap
  2. Connect to BNB Chain on Pancakeswap
  3. Connect to Linea on Sushiswap
  4. Start a transaction on Uniswap, do not approve
  5. Start a transaction on Sushiswap, do not approve
  6. Start a transaction on Pancakeswap
  7. Blue badge on MetaMask icon displays '3' transaction
  8. Access the first transaction (created on Polygon) and confirm it
  9. See the error

Error messages or log output

No response

Version

12.0.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

sleepytanya commented 3 months ago

Another scenario where the Minified React error #185 doesn't happen and second transaction is created (and submitted) on the wrong network. Sometimes one of the three txs is not submitted (can't be seen in the Activity list).

  1. Start tx on BNB Chain (Pancakeswaps), do not approve
  2. Start tx on Linea (Sushiswaps), do not approve
  3. Start tx on Ethereum (Uniswap)
  4. Approve first transaction (BNB)
  5. MM popup showing next tx on Ethereum (nonce 1835 in the video, the amount (0.000 000 1) matches second tx, confirmation page shows sushi.com) confirm this transaction
  6. MM popup shows third transaction (nonce 1836, amount and dapp match the third transaction)
  7. Within the Activity you can see 1 tx on BNB Chain (I think I had 1 previous tx on BNB), two txs on Ethereum, no transactions on Linea.

https://github.com/MetaMask/metamask-extension/assets/104780023/bad15681-e671-465b-ae3c-a5f6ab5254ad

First tx:

firstTx

Second tx:

secondTx

Third tx:

thirdTx
sleepytanya commented 3 months ago

The bug is present in this v12.0.0 build as well: https://github.com/MetaMask/metamask-extension/pull/25098#issuecomment-2198759615

Only two txs submitted:

https://github.com/MetaMask/metamask-extension/assets/104780023/59468cf8-faed-4702-810f-a459c572b427

darkwing commented 3 months ago

I merged a PR for this exact scenario last week. 🤔. Will track this down ASAP https://github.com/MetaMask/metamask-extension/pull/25536

darkwing commented 3 months ago

I can no longer reproduce any of these issues after this PR.https://github.com/MetaMask/metamask-extension/pull/25641

sleepytanya commented 3 months ago

@darkwing

I think popup behavior looks acceptable for now? (correct me if I'm wrong). I don't see any errors in all scenarios I've tried.

https://github.com/MetaMask/metamask-extension/assets/104780023/7d9d1d6b-1a76-4d24-87bc-3a803d7eac19

bschorchit commented 2 months ago

Popup behavior above is being addressed by this PR: https://github.com/MetaMask/metamask-extension/pull/25619

bschorchit commented 2 months ago

Should we close this issue since it was reported to be fixed by this PR: https://github.com/MetaMask/metamask-extension/pull/25641 ?

sleepytanya commented 2 months ago

@bschorchit I think so!

darkwing commented 2 months ago

Closing with Tanya's recommendation.