Uniswap / info

ℹ️ Uniswap v1+v2 analytics
https://v2.info.uniswap.org/
GNU General Public License v3.0
322 stars 651 forks source link

Account analytics page throws a TypeError and crashes the page. #319

Open jonathanpdunne opened 3 years ago

jonathanpdunne commented 3 years ago

Bug Description After navigating to the account analytics page at https://info.uniswap.org/account/{address}, the site crashes. A TypeError is thrown from info.uniswap.org/static/js/contexts/User.js:508. The stack trace, as seen in the browser console (equivalent on both Brave & Chrome):

TypeError: Cannot read property 'totalSupply' of undefined
    at O (index.js:138)
    at la (react-dom.production.min.js:154)
    at Ss (react-dom.production.min.js:259)
    at yu (react-dom.production.min.js:230)
    at pu (react-dom.production.min.js:229)
    at ou (react-dom.production.min.js:223)
    at react-dom.production.min.js:121
    at t.unstable_runWithPriority (scheduler.production.min.js:18)
    at Gi (react-dom.production.min.js:120)
    at Qi (react-dom.production.min.js:121)

Steps to Reproduce

  1. Connect a wallet that is providing liquidity to a pool via Metamask (the wallet I had connected is providing liquidity to the ETH/USDC pool).
  2. Go to https://app.uniswap.org/#/pool.
  3. Navigate to https://info.uniswap.org/account/{address} via the button named "Account analytics and accrued fees".
  4. The site now crashes, and the aforementioned error is present in the browser console.

Expected Behaviour Ideally, the page loads correctly and displays the address's analytics and accrued fees. Alternatively, the error is handled gracefully. In either case, the page probably shouldn't be crashing.

Additional Context

image

MaKla89 commented 3 years ago

Can confirm this issue, using Brave Browser on a Windows 10 machine.

Additional info: Repetetive reloads (between 1 - 15 of them) "fixes" the problem, or at least the page is loaded normally. Another refresh does restart the "lottery of blank white pages".

The error message is also "TypeError: Cannot read property 'totalSupply' of undefined".

bohendo commented 3 years ago

I'm seeing this problem too & it has rendered the account tracking page nearly useless bc the odds of this "lottery of blank white pages" do not appear to be in my favor (It works <5% of the time in my experience).

A few additional notes re reproduction:

andy0130tw commented 3 years ago

Same here. If you begin with the homepage and click a bookmarked address on the side it works normally. If you reload the page it voids out with the TypeError.

metjm commented 3 years ago

pr with a workaround: https://github.com/Uniswap/uniswap-info/pull/348