Uniswap / Uniswap/interface

Crash report: `Error: Invariant failed`

Open
#4,345 1 comment 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/#/swap/?chain=mainnet

swap state

{
  "INPUT": {
    "currencyId": "ETH"
  },
  "OUTPUT": {
    "currencyId": "0x0391D2021f89DC339F60Fff84546EA23E337750f"
  },
  "independentField": "OUTPUT",
  "typedValue": "9897.",
  "recipient": null
}

Error

Error: Invariant failed

Stacktrace

i@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:221041
e@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:3186762
@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:3188630
@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:3202584
@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:3204214
@https://app.uniswap.org/static/js/main.9a64e0b4.chunk.js:1:115848
Xo@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2832760
bi@https://app.uniswap.org/static/js/main.9a64e0b4.chunk.js:1:116198
@https://app.uniswap.org/static/js/main.9a64e0b4.chunk.js:1:163397
zc@https://app.uniswap.org/static/js/main.9a64e0b4.chunk.js:1:164431
ko@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2828349
Ea@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2840038
gu@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2874498
mu@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2874426
yu@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2874289
fu@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2871069
iu@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2869620
iu@[native code]
S@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2896198
M@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2896732
@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2900166
c@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2900280
n@https://app.uniswap.org/static/js/2.82d2c4a8.chunk.js:2:2899226

Device data

{
  "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/104.0.5112.88 Mobile/15E148 Safari/604.1",
  "browser": {
    "name": "Chrome",
    "version": "104.0.5112.88",
    "major": "104"
  },
  "engine": {
    "name": "WebKit",
    "version": "605.1.15"
  },
  "os": {
    "name": "iOS",
    "version": "15.6"
  },
  "device": {
    "vendor": "Apple",
    "model": "iPhone",
    "type": "mobile"
  },
  "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

Reproduce the crash at the reported app.uniswap.org swap URL using the supplied state, especially OUTPUT as the independent field and typedValue 9897.. The report names only minified deployed bundles, not source files or tests; done means identifying the corresponding source path, preventing the invariant failure for this state, and verifying the swap view no longer crashes.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.