info icon indicating copy to clipboard operation
info copied to clipboard

Account analytics page throws a TypeError and crashes the page.

Open jonathanpdunne opened this issue 3 years ago • 4 comments

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

  • I originally found this bug on Brave, and replicated it on Chrome.
  • Wallets were always connected via Metamask.
  • Screenshot of the dev tools console from Brave:

image

jonathanpdunne avatar Nov 27 '20 05:11 jonathanpdunne

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".

MaKla89 avatar Dec 06 '20 07:12 MaKla89

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:

  • No need to click any buttons to repro, I have https://info.uniswap.org/account/{address} bookmarked & simply navigating to this url will trigger the problem. (assuming the given address has some pool activity, when I load an address that has swapped via uniswap but not supplied liquidity, there is no problem)
  • I usually use Brave on Ubuntu 18. I do have metamask installed but I do not need to unlock it or connect any accounts in order to see this problem. The injected web3 provider does not appear to have any effect on this issue. In fact, in incognito mode (metamask is not even available here) I see the exact same behavior. I see the same stack trace on Brave as the OP posted: TypeError: Cannot read property 'totalSupply' of undefined
  • I also have Firefox installed on Ubuntu. When I use firefox (whether metamask is unlocked or absent in incognito mode makes no difference) I see the same white screen of death however the console shows a different stack trace: t.pairData is undefined (EDIT: this error was also reported in issue #321) Screenshot from 2020-12-21 09-36-22 cropped

bohendo avatar Dec 21 '20 04:12 bohendo

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.

andy0130tw avatar Jan 11 '21 19:01 andy0130tw

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

metjm avatar Feb 05 '21 22:02 metjm