cacheCall() sometimes hangs. Needs a browser restart to fix.
simondlr opened this issue · 4 comments
Hey.
I've been encountering a bug where cacheCall() does not return a key. It just hangs. It's really hard to debug. Unsure why it happens.
It would do this in Brave, but then when I open it in Chrome, it fetches correctly. Unsure if there's some other caching happening. Maybe it's Chrome/Brave or MetaMask or Drizzle.
Restarting Brave fixes the issue. How do I debug this?
Hi Simon, which version of Brave and MetaMask are you on and do you have a repo we can test this with? Thanks!
Hey @DiscRiskandBisque. It's really hard to reproduce.
MetaMask 6.3.2
Version 0.62.50 Chromium: 73.0.3683.86 (Official Build) (64-bit)
Here's the repo: https://github.com/simondlr/thisartworkisalwaysonsale
Something I discovered is that it sometimes the cache is a bit wonky, which I think is the reason for the above too. If I Switch between Chrome & Brave I would see different results on the page. One showing old data, and the other not. Not sure where the caching occurs?
When the cache is broken again, I will try diagnose. I just don't know when this cache mishap occurs. Can't reproduce it.
Hey. So I might have more information.
It seems it is likely MetaMask that's the issue. I found a caching problem and then verified that if I loaded the app through MM, the cache wouldn't update. If it went to the fallback, using websockets, it loaded fine.
The issue with MM was that the block tracker wasn't updating anymore. So it's not a cached call somewhere. It just wasn't getting new blocks. It was fixed by reloading the extension. My suspicion is that it has to do potentially with errors within MM that causes it to "brick". The last error in MM before it was reloaded was a 404 to balanc3 API [it's price checking API that's being updated]. My internet sometimes goes down, so I'm wondering if it has to do with MM being polled during bad internet connection and then breaking down for some reason.
Haven't been able to replicate that 404, so will need to run more tests.
So at the very least, I don't think it has anything to do with Drizzle. Likely a MetaMask issue. :)
@simondlr Thanks for digging further into this. If you feel the issue is most likely w/ MM, I hope you don't mind if we close this issue for now (can always re-open later). Might be worthwhile to link any new issues on other repos to this one though, in case other people are also experiencing a similar problem.