Skip to content

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

@5m477

Description

@5m477

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions