I’ve just started noticing that my Phoenix Liveview app hangs for a long time every time it must re-open a websocket connection. The warning I get after a few seconds is: “Websocket is closed before the connection is established”
I don’t think I have made any change recently that would start triggering this behavior except I started building my app remotely when deploying (with fly deploy --remote-only) because I was having issues deploying from my new mac with its M1 chip. I don’t see why that would affect anything but it might still be valuable info.
I get this issue on Brave, Chrome and Safari (so all browsers I’m pretty sure)
I have tried moving from the cdg region to ams, to no avail
Happens on both Windows and MacOS
I know this issue comes up on forums from time to time but unfortunately, none of the possible resolutions has helped me.
Hi Kurt, thanks for taking a look. It turns out I deployed a small change a few minutes ago (I just changed some HTML), and now this issue is gone. I see the same headers you do now.
It used to hang on every refresh and now I cannot reproduce it at all.
Interesting issue. I have a similar problem after the issue today. Looks like it’s happening when I access a a specific instance (or region → one in CDG, one in FRA).
For me it appears like that. Whenever I open a new page that mounts a LiveView it reloads several times (4-6 times) until the page is stable. When I navigate within the liveview or via a live_redirect to another live view it seems to work fine. But when I reload the whole page or just click on a non-live link it reloads several times. It never happened before for me like this.
One of my customers (Toronto) had this issue too last year too. And I assumed it was an issue with his Brave browser. But I am not using Brave at all. And I saw this issue today on Chrome and Safari…