earthrise-media / vacs-map

Exploring VACS project data
1 stars 0 forks source link

Mobile page reload bug #123

Closed mwbernard closed 9 months ago

mwbernard commented 9 months ago

When navigating to the explore page on mobile, the page reloads and can throw a browser reload error sometimes (often on Safari). Not totally sure what is causing this - It happens when navigating from the crop overview page, or just loading the page straight from a URL.

We have some components which try to access data, sometimes before its loaded - we might try handling these more smoothly at a high level (for example don't try to render anything on the sidebar until data is ready) and see if that helps. Its probably worth doing that anyway.

mwbernard commented 9 months ago

@ebrelsford tried connecting through Safari developer tools w/ wired connection to phone. I'm able to inspect the page etc. but I'm not seeing any console warnings or errors that seem related to the page reloading bug. Just a 'webpage crashed' message in the page title, but no console messages. Tested on both safari and chrome but just not yielding much info. Also its not giving any of the console warnings that show up on desktop.

Once or twice I got a warning regarding not having mapbox css styles loaded, but we do have those imported in the app, and that warning wasn't consistent so I don't think that's it.

ebrelsford commented 9 months ago

@mwbernard Thanks for the update! Can you see any metrics around performance before the crash? Such as amount of memory in use or the length of time network requests are taking?

mwbernard commented 9 months ago

@ebrelsford This is a recording of loading the explore page. From what I can tell around the 8s mark the page automatically reloads and the crash seems to happen then, or right after that automatic reload gets triggered for some reason. The inspector also kind of crashes, or disconnects, when the page reloads though and I keep having to re-inspect the new page - so I'm not convinced this is fully tracking what's happening

Screenshot 2023-12-12 at 3 14 17 PM
ebrelsford commented 9 months ago

@mwbernard Thanks I can take a look at this this afternoon.

ebrelsford commented 9 months ago

@mwbernard I'll have a fix soon, I believe I've isolated the issue to the grid data and how it gets joined.