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://swap.keyring.app/#/swap?chain=mainnet
swap state
{
"INPUT": {
"currencyId": "ETH"
},
"OUTPUT": {
"currencyId": null
},
"independentField": "INPUT",
"typedValue": "",
"recipient": null
}
Error
TypeError: Cannot read properties of undefined (reading '0')
Stacktrace
TypeError: Cannot read properties of undefined (reading '0')
at GI (https://swap.keyring.app/static/js/main.0a76b5e2.chunk.js:1:575829)
at oo (https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1806898)
at Ho (https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1816465)
at Xf (https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1860189)
at Pu (https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1846439)
at Cu (https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1846367)
at Su (https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1846230)
at wu (https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1843196)
at https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1792690
at t.unstable_runWithPriority (https://swap.keyring.app/static/js/34.5b0b48ce.chunk.js:2:1869927)
Device data
{
"ua": "Mozilla/5.0 (X11; CrOS x86_64 14816.131.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "103.0.0.0",
"major": "103"
},
"engine": {
"name": "Blink",
"version": "103.0.0.0"
},
"os": {
"name": "Chromium OS",
"version": "14816.131.0"
},
"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
Begin with the swap URL and supplied swap state, then use the stack trace's main.0a76b5e2.chunk.js entry to locate the corresponding source. Reproduce the crash in the swap flow and identify the undefined value behind the [0] access. Done means this state no longer crashes and a regression check covers it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100