Uniswap / Uniswap/interface

Crash report: `TypeError: Cannot read properties of undefined (reading '0')`

Open
#3,605 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/#/add/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/ETH/3000?chain=mainnet

mintV3 state

{
  "independentField": "CURRENCY_A",
  "typedValue": "",
  "startPriceTypedValue": "",
  "leftRangeTypedValue": "",
  "rightRangeTypedValue": ""
}

Error

TypeError: Cannot read properties of undefined (reading '0')

Stacktrace

TypeError: Cannot read properties of undefined (reading '0')
    at https://app.uniswap.org/static/js/main.dfacf3cb.chunk.js:1:401821
    at Array.reduce (<anonymous>)
    at https://app.uniswap.org/static/js/main.dfacf3cb.chunk.js:1:401745
    at Object.Ta [as useMemo] (https://app.uniswap.org/static/js/3.ec50b941.chunk.js:2:1659109)
    at t.useMemo (https://app.uniswap.org/static/js/3.ec50b941.chunk.js:2:1578581)
    at https://app.uniswap.org/static/js/main.dfacf3cb.chunk.js:1:401382
    at Vg (https://app.uniswap.org/static/js/main.dfacf3cb.chunk.js:1:402703)
    at Kg (https://app.uniswap.org/static/js/main.dfacf3cb.chunk.js:1:405096)
    at ia (https://app.uniswap.org/static/js/3.ec50b941.chunk.js:2:1654376)
    at za (https://app.uniswap.org/static/js/3.ec50b941.chunk.js:2:1663943)

Device data

{
  "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36",
  "browser": {
    "name": "Chrome",
    "version": "99.0.4844.83",
    "major": "99"
  },
  "engine": {
    "name": "Blink",
    "version": "99.0.4844.83"
  },
  "os": {
    "name": "Mac OS",
    "version": "10.15.7"
  },
  "device": {},
  "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

The payload names no source file or test; begin by reproducing the crash at the supplied add-liquidity URL with the shown mintV3 state and tracing the minified stack back to its TypeScript source. Identify the undefined value behind the indexed access and verify that this flow no longer crashes with regression coverage.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.