Post

So the issue here was that a Safari bug is truncating, i.e. just chopping the end off, of websocket messages over a certain size in @roomy.space. This makes the messages fail to parse and crashes the websocket. This isn't even in JS, this is in the browser itself.

Massive shoutout to @flo-bit.dev who stayed up late (sorry!) to fix that loading issue 🙏 zick doesn’t have any Apple device and Meri is busy talking to you all so flo truly came in clutch on this one, as he does <3 iOS/Safari is the bane of webdev I kid you not

We had to reduce the size of our messages a lot which, without like reorganizing the code to work with chunked messages, meant we had to reduce how much we could download at a time and made the app slower and "bouncier".

This is also causing another issue where we can't fetch all of the threads for a channel, because when we have over 100 threads, ( there are lot of Atmosphere Conf talks this year! ), that pushes the message size over the limit and crashes the websocket again!

I'm seriously thinking about switching away from websockets to long-polling after this.

0 reposts1 like

Ah, it looks like there is a real overhead to long polling. We'll just have to work around the Safari WebSocket bugs I think.

yeah i actually tried to switch to long polling, but gave up on that after waiting ~5 minutes for things to load in the atmosphereconf space :P (not sure if that even worked correctly though, i did only change client side code)