Uniswap / Uniswap/interface

Hash fragment redirects trigger “Something went wrong” error on Uniswap web landing page

Open Beginner friendly
#7,979 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Interface Affected


App Version

  • Version: Production build (hash-router landing logic)
  • Production build

System / Environment Info

  • Browser: All browsers

Steps to Reproduce

  1. Open https://app.uniswap.org/#//example.org in a clean browser session.
  2. Allow the landing page to finish loading.
  3. A "Something went wrong" modal appears with a SecurityError stack trace.

Expected Behavior

Ignore external-looking hash fragments or redirect only to internal routes without raising errors.


Actual Behavior

  • Fragment is passed to React Router's <Navigate>.
  • Router calls history.replaceState('https://example.org/'); the browser rejects it with SecurityError.
  • User stays on app.uniswap.org but sees the error overlay until reload.

Screenshots or Screen Recording

Screenshot available showing the "Something went wrong" overlay with the SecurityError stack trace.

Image

Additional Context

  • Logic lives in apps/web/src/pages/RouteDefinitions.tsx via <Navigate to={args.hash.replace('#', '')} />.
  • Sanitising fragments (e.g., require a leading /) preserves legacy hashes like #/swap while avoiding the error.
  • No cross-origin redirect occurs; the issue is limited to a user-visible error state.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/web/src/pages/RouteDefinitions.tsx, focusing on the hash-based logic described in the issue. Reproduce the URL with an external-looking fragment in a clean browser session, then verify that internal hashes such as #/swap still work and the external-looking fragment no longer produces a SecurityError overlay.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.