Uniswap / Uniswap/interface

Crash report: `Error: Unsupported chain ID`

Open
#4,050 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

URL

https://app.uniswap.org/#/swap?chain=

swap state

{
  "INPUT": {
    "currencyId": "ETH"
  },
  "OUTPUT": {
    "currencyId": null
  },
  "independentField": "INPUT",
  "typedValue": "",
  "recipient": null
}

Error

Error: Unsupported chain ID

Stacktrace

Error: Unsupported chain ID
    at n.get (https://app.uniswap.org/static/js/main.8c9f966b.chunk.js:1:535062)
    at https://app.uniswap.org/static/js/main.8c9f966b.chunk.js:1:632780
    at sf (https://app.uniswap.org/static/js/2.365a8d52.chunk.js:2:2442916)
    at Ya (https://app.uniswap.org/static/js/2.365a8d52.chunk.js:2:2495216)
    at Cs (https://app.uniswap.org/static/js/2.365a8d52.chunk.js:2:2482457)
    at Ts (https://app.uniswap.org/static/js/2.365a8d52.chunk.js:2:2482385)
    at Os (https://app.uniswap.org/static/js/2.365a8d52.chunk.js:2:2482248)
    at ws (https://app.uniswap.org/static/js/2.365a8d52.chunk.js:2:2479214)
    at https://app.uniswap.org/static/js/2.365a8d52.chunk.js:2:2428708
    at t.unstable_runWithPriority (https://app.uniswap.org/static/js/2.365a8d52.chunk.js:2:2505945)

Device data

{
  "ua": "Mozilla/5.0 (Linux; Android 10; Android SDK built for x86 Build/OSM1.180201.023) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.92 Mobile Safari/537.36",
  "browser": {
    "name": "Chrome",
    "version": "77.0.3865.92",
    "major": "77"
  },
  "engine": {
    "name": "Blink",
    "version": "77.0.3865.92"
  },
  "os": {
    "name": "Android",
    "version": "10"
  },
  "device": {
    "model": "Android SDK built for x86",
    "type": "mobile"
  },
  "cpu": {}
}

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

Reproduce https://app.uniswap.org/#/swap?chain= with the reported swap state and inspect the stack trace locations in main.8c9f966b.chunk.js and 2.365a8d52.chunk.js. Trace how the empty chain value reaches the unsupported-chain error, then verify the URL no longer crashes the interface.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.