Crash report: `TypeError: Cannot read properties of undefined (reading '0')`
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
URL
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.411b0c26.chunk.js:1:427942
at Array.reduce (<anonymous>)
at https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:427866
at Object.Aa [as useMemo] (https://app.uniswap.org/static/js/35.a759c04b.chunk.js:2:1194683)
at t.useMemo (https://app.uniswap.org/static/js/35.a759c04b.chunk.js:2:1129703)
at https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:427503
at Pg (https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:428828)
at pv (https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:434543)
at ua (https://app.uniswap.org/static/js/35.a759c04b.chunk.js:2:1189950)
at Ha (https://app.uniswap.org/static/js/35.a759c04b.chunk.js:2:1199517)
Device data
{
"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "98.0.4758.81",
"major": "98"
},
"engine": {
"name": "Blink",
"version": "98.0.4758.81"
},
"os": {
"name": "Windows",
"version": "10"
},
"device": {},
"cpu": {
"architecture": "amd64"
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported URL with the supplied mintV3 state and inspect the source corresponding to the main.411b0c26.chunk.js stack frames, especially the useMemo/reduce path. Trace the undefined value behind the reported array access and add a regression test if the relevant test location is found; done means the add-liquidity flow no longer crashes for this state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100