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

[Bug]: Navigation between unapproved transactions breaks MM with Cannot read properties of undefined (reading 'length') / Message: Should have a queue. This is likely a bug in React. errors #27913

Closed
sleepytanya opened this issue Oct 16, 2024 · 2 comments · Fixed by #27985
Assignees
Labels
regression-develop Regression bug that was found on development branch, but not yet present in production release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-confirmations Push issues to confirmations team type-bug

Comments

@sleepytanya
Copy link
Contributor

sleepytanya commented Oct 16, 2024

Describe the bug

Navigation between two pending malicious transactions breaks MetaMask with errors:

Cannot read properties of undefined (reading 'length')

and

Message: Should have a queue. This is likely a bug in React

At the moment, functionalities like Malicious ERC20 Approval (BUSD) and Malicious Set Approval for All are not operating as anticipated in both the develop branch and the RC 12.5.0 version on Base and BNB networks.

#27909

#27905

If a user initiates two consecutive transactions where the latter is a Malicious Set Approval for All, attempting to navigate between these transactions in the popup triggers an error. However, in the Expanded view, these transactions appear as unapproved and can be successfully processed or cancelled.

Expected behavior

No errors

Screenshots/Recordings

Screenshot 2024-10-15 at 21 55 07 Screenshot 2024-10-15 at 22 36 52
1.mov
2.mov

Steps to reproduce

  1. Connect to test dapp
  2. Trigger any transaction, do not confirm
  3. Trigger Malicious Set Approval for All
    Alternatively, trigger Malicious Set Approval for All first and then any button from PPOM section - this will produce another type of error.

Error messages or log output

No response

Detection stage

On the development branch

Version

12.4.1

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

@sleepytanya sleepytanya added type-bug regression-develop Regression bug that was found on development branch, but not yet present in production team-confirmations Push issues to confirmations team labels Oct 16, 2024
@jpuri jpuri self-assigned this Oct 17, 2024
@jpuri
Copy link
Contributor

jpuri commented Oct 17, 2024

Hey @sleepytanya , I also faced this issue at some point, but I am not able to replicate this in latest code:

Screen.Recording.2024-10-17.at.3.03.23.PM.mov

@sleepytanya
Copy link
Contributor Author

@jpuri
I'm still seeing it on develop:

Screen.Recording.2024-10-18.at.10.56.57.mov

github-merge-queue bot pushed a commit that referenced this issue Oct 21, 2024
…ion is approve all (#27985)

## **Description**
Navigation in transaction header was broken when one of the transaction
is of type Approve All

## **Related issues**

Fixes: #27913

## **Manual testing steps**

1. Go to test dapp
2. Submit any re-designed transaction followed by an approve all
transaction
3. Try navigating between transaction using header buttons

## **Screenshots/Recordings**

TODO

## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@metamaskbot metamaskbot added the release-12.8.0 Issue or pull request that will be included in release 12.8.0 label Oct 21, 2024
@gauthierpetetin gauthierpetetin added release-12.6.0 Issue or pull request that will be included in release 12.6.0 and removed release-12.8.0 Issue or pull request that will be included in release 12.8.0 labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-develop Regression bug that was found on development branch, but not yet present in production release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-confirmations Push issues to confirmations team type-bug
Projects
Archived in project
Status: Fixed
4 participants