Uniswap / Uniswap/interface

Crash report: `The "listener" argument must be of type Function`

Open
#1,524 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug p2
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Bug Description

App crashed

Steps to Reproduce

  1. Go to ...
  2. Click on ...
    ...

Error

TypeError: The "listener" argument must be of type Function. Received type undefined

Stacktrace

TypeError: The "listener" argument must be of type Function. Received type undefined
    at l (chrome-extension://nlbmnnijcnlegkjjpcfjclmcfggfefdm/js/cxWeb3.js:18:185254)
    at r.a.removeListener (chrome-extension://nlbmnnijcnlegkjjpcfjclmcfggfefdm/js/cxWeb3.js:18:188689)
    at Object.removeListener (chrome-extension://nlbmnnijcnlegkjjpcfjclmcfggfefdm/js/cxWeb3.js:18:67940)
    at https://app.uniswap.org/static/js/main.1cc75114.chunk.js:1:216961
    at Lu (https://app.uniswap.org/static/js/4.7be9d8b6.chunk.js:2:1517853)
    at t.unstable_runWithPriority (https://app.uniswap.org/static/js/4.7be9d8b6.chunk.js:2:1535801)
    at Hi (https://app.uniswap.org/static/js/4.7be9d8b6.chunk.js:2:1458159)
    at Mu (https://app.uniswap.org/static/js/4.7be9d8b6.chunk.js:2:1517449)
    at https://app.uniswap.org/static/js/4.7be9d8b6.chunk.js:2:1517360
    at N (https://app.uniswap.org/static/js/4.7be9d8b6.chunk.js:2:1534860)

Device data

{
  "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36/10csO9CgK-99",
  "browser": {
    "name": "Chrome",
    "version": "90.0.4430.212",
    "major": "90"
  },
  "engine": {
    "name": "Blink",
    "version": "90.0.4430.212"
  },
  "os": {
    "name": "Windows",
    "version": "10"
  },
  "device": {},
  "cpu": {
    "architecture": "amd64"
  }
}

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

The stack trace points to the Chrome extension bundle js/cxWeb3.js and the app.uniswap.org static JavaScript bundles; start by reproducing the crash in Chrome 90 with the reported environment. Trace the listener removal path from those entry points and confirm the reported action no longer crashes with an undefined listener.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.