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

chore(runway): cherry-pick fix: Fix invalid browser url crash #11583

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

runway-github[bot]
Copy link
Contributor

@runway-github runway-github bot commented Oct 2, 2024

Description

This PR fixes the crash in 7.32.0 for invalid URL in browser. The global
URL didn't catch invalid urls gracefully, so we are using the lib
url-parser

Related issues

Fixes: #11479

Manual testing steps

  1. Go to browser
  2. Enter httttps://app.uniswap.org
  3. Website shows invalid url scheme
  4. App doesn't crash

Screenshots/Recordings

Before

After

invalid-url-fix.mov

Pre-merge author checklist

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. e80a1e8

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR fixes the crash in 7.32.0 for invalid URL in browser. The global
`URL` didn't catch invalid urls gracefully, so we are using the lib
`url-parser`

## **Related issues**

Fixes: #11479 

## **Manual testing steps**

1. Go to browser
2. Enter `httttps://app.uniswap.org`
3. Website shows invalid url scheme
4. App doesn't crash

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->


https://github.com/user-attachments/assets/2980c632-ed4b-48a4-976c-b1da54c590ce


## **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**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.
@runway-github runway-github bot requested a review from a team as a code owner October 2, 2024 20:09
Copy link
Contributor

github-actions bot commented Oct 2, 2024

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link

sonarcloud bot commented Oct 2, 2024

@frankvonhoven frankvonhoven merged commit 3337a75 into release/7.32.0 Oct 2, 2024
34 of 35 checks passed
@frankvonhoven frankvonhoven deleted the runway-cherry-pick-7.32.0-1727899785 branch October 2, 2024 21:25
@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants