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
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.1d448b81.chunk.js:1:438482
at Array.reduce (<anonymous>)
at https://app.uniswap.org/static/js/main.1d448b81.chunk.js:1:438406
at Object.Aa [as useMemo] (https://app.uniswap.org/static/js/35.4cd51aae.chunk.js:2:1353145)
at t.useMemo (https://app.uniswap.org/static/js/35.4cd51aae.chunk.js:2:1288165)
at https://app.uniswap.org/static/js/main.1d448b81.chunk.js:1:438043
at uv (https://app.uniswap.org/static/js/main.1d448b81.chunk.js:1:439372)
at Wv (https://app.uniswap.org/static/js/main.1d448b81.chunk.js:1:445282)
at ua (https://app.uniswap.org/static/js/35.4cd51aae.chunk.js:2:1348412)
at Va (https://app.uniswap.org/static/js/35.4cd51aae.chunk.js:2:1357979)
Device data
{
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "99.0.4844.84",
"major": "99"
},
"engine": {
"name": "Blink",
"version": "99.0.4844.84"
},
"os": {
"name": "Mac OS",
"version": "10.15.3"
},
"device": {},
"cpu": {}
}
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 crash at the supplied add-liquidity URL using the reported mintV3 state, then trace the minified stack through the Array.reduce and useMemo calls. Done means the same URL and state no longer produce the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100