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]: App crashes when deleting browser favorites on android devices #10583

Closed
chrisleewilcox opened this issue Aug 12, 2024 · 0 comments · Fixed by #10598
Closed

[Bug]: App crashes when deleting browser favorites on android devices #10583

chrisleewilcox opened this issue Aug 12, 2024 · 0 comments · Fixed by #10598
Assignees
Labels
regression-prod-7.29.0 Regression bug that was found in production in release 7.29.0 release-7.30.0 Issue or pull request that will be included in release 7.30.0 release-blocker This bug is blocking the next release Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing team-mobile-platform type-bug Something isn't working

Comments

@chrisleewilcox
Copy link
Contributor

chrisleewilcox commented Aug 12, 2024

Describe the bug

When attempting to remove a browser favorite by tapping the 'x' on a browser favorite the app closes. Sometime a device crash report is shown. This happens on android devices only, not an issue with iOS devices.

Expected behavior

Deleting a browser favorite from browser view should not crash app.

Not able to reproduce for 7.28.0.

Screenshots/Recordings

Screen.Recording.2024-08-12.at.2.32.03.PM.mov

Steps to reproduce

GIVEN I am on browser view
WHEN I remove a browser favorite
AND I confirm to delete browser favorite
THEN browser favorite is removed (FAILED: app crashes, browser favorite is not removed)

Error messages or log output

No response

Detection stage

In production (default)

Version

7.29.0

Build type

None

Device

Samsung Galaxy A42 Android 13

Operating system

Android

Additional context

No response

Severity

No response

@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Aug 12, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Aug 12, 2024
@chrisleewilcox chrisleewilcox added the release-blocker This bug is blocking the next release label Aug 12, 2024
@metamaskbot metamaskbot added the regression-prod-7.29.0 Regression bug that was found in production in release 7.29.0 label Aug 12, 2024
@sethkfman sethkfman added the Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing label Aug 12, 2024
@Daniel-Cross Daniel-Cross self-assigned this Aug 13, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Aug 13, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Aug 13, 2024
@metamaskbot metamaskbot added the release-7.30.0 Issue or pull request that will be included in release 7.30.0 label Aug 13, 2024
runway-github bot added a commit that referenced this issue Aug 14, 2024
…ces (#10598)

## **Description**

Added a resolve() to the `metamask_removeFavorite` function to stop
Hermes from crashing when trying to handle the Promise.

Hermes would crash when trying to handle the Promise of the `Alert`
method. Adding a `resolve()` fixes this issue and stops the app from
crashing.

## **Related issues**

Fixes: #10583

## **Manual testing steps**

1. Go to the web browser and visit a random website of your choosing.
2. Add said site to favourites (or favorites if you're based in North
America).
3. Go back to favourites tab and delete the bookmark you just added.
4. Observe that an alert is displayed and the app does not crash to
desktop.

## **Screenshots/Recordings**

### **Before**

https://github.com/user-attachments/assets/cc8c1a85-41a6-4b6b-829a-12b1c8ba83b0
### **After**

![fix](https://github.com/user-attachments/assets/40543a47-216c-4a9d-849c-caad477af820)

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.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
- [x] 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-mobile/blob/main/.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.

---------

Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
runway-github bot added a commit that referenced this issue Aug 14, 2024
…ces (#10598)

## **Description**

Added a resolve() to the `metamask_removeFavorite` function to stop
Hermes from crashing when trying to handle the Promise.

Hermes would crash when trying to handle the Promise of the `Alert`
method. Adding a `resolve()` fixes this issue and stops the app from
crashing.

## **Related issues**

Fixes: #10583

## **Manual testing steps**

1. Go to the web browser and visit a random website of your choosing.
2. Add said site to favourites (or favorites if you're based in North
America).
3. Go back to favourites tab and delete the bookmark you just added.
4. Observe that an alert is displayed and the app does not crash to
desktop.

## **Screenshots/Recordings**

### **Before**

https://github.com/user-attachments/assets/cc8c1a85-41a6-4b6b-829a-12b1c8ba83b0
### **After**

![fix](https://github.com/user-attachments/assets/40543a47-216c-4a9d-849c-caad477af820)

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.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
- [x] 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-mobile/blob/main/.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.

---------

Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
runway-github bot pushed a commit that referenced this issue Aug 14, 2024
…orites on android devices (#10598)

## **Description**

Added a resolve() to the `metamask_removeFavorite` function to stop
Hermes from crashing when trying to handle the Promise.

Hermes would crash when trying to handle the Promise of the `Alert`
method. Adding a `resolve()` fixes this issue and stops the app from
crashing.

## **Related issues**

Fixes: #10583

## **Manual testing steps**

1. Go to the web browser and visit a random website of your choosing.
2. Add said site to favourites (or favorites if you're based in North
America).
3. Go back to favourites tab and delete the bookmark you just added.
4. Observe that an alert is displayed and the app does not crash to
desktop.

## **Screenshots/Recordings**

### **Before**

https://github.com/user-attachments/assets/cc8c1a85-41a6-4b6b-829a-12b1c8ba83b0
### **After**

![fix](https://github.com/user-attachments/assets/40543a47-216c-4a9d-849c-caad477af820)

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.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
- [x] 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-mobile/blob/main/.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.

---------

Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
sethkfman added a commit that referenced this issue Aug 15, 2024
…orites on android devices (#10651)

- fix: App crashes when deleting browser favorites on android devices
(#10598)

## **Description**

Added a resolve() to the `metamask_removeFavorite` function to stop
Hermes from crashing when trying to handle the Promise.

Hermes would crash when trying to handle the Promise of the `Alert`
method. Adding a `resolve()` fixes this issue and stops the app from
crashing.

## **Related issues**

Fixes: #10583

## **Manual testing steps**

1. Go to the web browser and visit a random website of your choosing.
2. Add said site to favourites (or favorites if you're based in North
America).
3. Go back to favourites tab and delete the bookmark you just added.
4. Observe that an alert is displayed and the app does not crash to
desktop.

## **Screenshots/Recordings**

### **Before**


https://github.com/user-attachments/assets/cc8c1a85-41a6-4b6b-829a-12b1c8ba83b0
### **After**


![fix](https://github.com/user-attachments/assets/40543a47-216c-4a9d-849c-caad477af820)

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding

Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.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
- [x] 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-mobile/blob/main/.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.

---------

Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
[0ba2cbf](0ba2cbf)

Co-authored-by: Daniel Cross <dan.s.cross@icloud.com>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-prod-7.29.0 Regression bug that was found in production in release 7.29.0 release-7.30.0 Issue or pull request that will be included in release 7.30.0 release-blocker This bug is blocking the next release Sev1-high An issue that may have caused fund loss or access to wallet in the past & may still be ongoing team-mobile-platform type-bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants