MetaMask / MetaMask/metamask-extension

[Bug]: Unexpected error when invalid url

Open
#42,719 0 comments 0 reactions 0 assignees View on GitHub
ai-eligible regression-RC-13.32.0 Sev2-normal team-extension-platform type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### Describe the bug

Invalid urls make the extension to crash

Example:
```
Navigating directly to:

chrome-extension:///home.html#/perps
showed the MetaMask error page. The working routes were:

chrome-extension:///home.html#/?tab=perps
chrome-extension:///home.html#/perps/market/BTC
```
https://www.loom.com/share/012810c51971460aacc55c402580e503

### Expected behavior

The extension should not show an error screen and should not crash when try again

### Screenshots/Recordings

https://www.loom.com/share/012810c51971460aacc55c402580e503

### Steps to reproduce

1. Open extension
2. change url to home.html#/ and go

### Error messages or log output

```shell

```

### Where was this bug found?

Internal release testing

### Version

13.32.0

### Build type

None

### Browser

Chrome

### Operating system

MacOS

### Hardware wallet

_No response_

### Additional context

It is happening in versions such 13.10.0 so I guess in all versions

### Severity

sev2

Contributor guide

Open the contributing guide

Research direction

Reproduce the crash in the extension by opening home.html#/whatever in Chrome, then compare it with the working routes home.html#/?tab=perps and home.html#/perps/market/BTC. Inspect the route handling for invalid hash paths and use the expected behavior as the completion check: retrying an invalid URL should not show an error screen or crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.