Crash report: `Error: Invariant failed`
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
URL
swap state
{
"INPUT": {
"currencyId": "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE"
},
"OUTPUT": {
"currencyId": "ETH"
},
"independentField": "INPUT",
"typedValue": "",
"recipient": "0x4014d002b839a38f727604e4298b136e7424729b"
}
Error
Error: Invariant failed
Stacktrace
Error: Invariant failed
at https://app.uniswap.org/static/js/35.a759c04b.chunk.js:2:135543
at t.sortsBefore (https://app.uniswap.org/static/js/35.a759c04b.chunk.js:2:68832)
at https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:166500
at Array.map (<anonymous>)
at https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:166282
at Object.Aa [as useMemo] (https://app.uniswap.org/static/js/35.a759c04b.chunk.js:2:1194683)
at https://app.uniswap.org/static/js/35.a759c04b.chunk.js:2:1129703
at sa (https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:166260)
at https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:168423
at ba (https://app.uniswap.org/static/js/main.411b0c26.chunk.js:1:168844)
Device data
{
"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "94.0.4606.81",
"major": "94"
},
"engine": {
"name": "Blink",
"version": "94.0.4606.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
Start by reproducing the swap URL and reviewing the recorded swap state. Trace the minified stack from sortsBefore in 35.a759c04b.chunk.js into the corresponding source behind main.411b0c26.chunk.js, then verify that this case no longer crashes and add or run a regression test if one is identified.
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
- 30/100