Jacob-Griffin / TelephonePictionary2.0

New version of blowyourfaceoff.com using more modern web technology than php and raw javascript
0 stars 0 forks source link

Investigation - Kicked to home screen #22

Closed Jacob-Griffin closed 1 year ago

Jacob-Griffin commented 1 year ago

I'm going to enable console logging for why you were kicked out if the game ever decides to do that, along with a dump of the localStorage values my site uses.

I suspect this had something to do with the page reloading due to an input misinterpretation on the browser's part (Maybe pull-to-refresh if it was on phone?), but that's a problem on its own.

At the very least, if it was a fluke, we can keep better track of what the user is actually doing in a round so it can restore progress if you have to rejoin.

Jacob-Griffin commented 1 year ago

A couple improvements happened in this regard:

There could be a little more ui exposed for rejoining a game (maybe autofill on the join game modal if backup data exists? A port from localStorage button to do that?), but it should be entirely rejoinable if everyone's still there.

I'm still not going to close this yet, since we don't know why the kick happened, but I have fixed a couple issues with data races on round refresh

Jacob-Griffin commented 1 year ago

If there is backed up gameid and username data (This is set when the game starts, and clears when the review page is loaded), then it will autofill when you open the "join game" modal

Jacob-Griffin commented 1 year ago

While I still don't know why the kick happened, a lot of potential underlying issues have been resolved (data races, pull-to-refresh, etc), and the heart of the issue - recovering after a sudden disconnect - is now easily worked around. I'll close this, and if it ends up coming back, we can reopen it