google/santa-tracker-web

Chrome iOS won't load new scenes

Opened this issue · 0 comments

Describe the bug

Chrome on iOS - notably not Safari on iOS - won't load new scenes. (I presume this is actually to do with the underlying webview that Chrome has to use.)

To Reproduce

  1. Open Santa Tracker in Chrome on iOS
  2. Try to load another game or scene
  3. Wait and see the timeout

Notes

This is new in 2021.

Basically we try to load another <iframe> but never receive its hello payload (every scene that starts up posts a port to its parent) or see it render on the screen.

If you kill the previous frame immediately (rather than letting it stick around for a bit), sometimes it will load. My hunch is that iOS is severely limiting the number of frames that are allowed. The lifecycle around killing the previous frame is a bit nebulous though (even though I wrote it) - I'd suggest maybe taking a fresh look at in future.

The solution is: not sure. The entire architecture of Santa today leverages "disposable" cross-domain iframes to load games, which has worked pretty well for us.