dblack

dblack

I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.

I pushed out an update to a test app, and now when i browse to it, it’s stuck in a cycle trying to connect to the web socket. The static content is displayed, the browser tries to connect to the web socket, it times out and repeats the cycle.

I have seen this in the development environment too very intermittently (like twice). I thought it might be something to do with the code reloader, because as soon as I switched that off in dev, the problem went away.

Any ideas about where to start looking?

Also, it seems confined to a browser session. ie, I can browse to the same app in a different browser and it works fine… So with that in mind, I cleared cookies on the failing instance, crossed my fingers… but still no good.

Showing Posts 1 to 10

dblack

dblack OP

I have more info, but I’m not sure how significant it is! The connection came good, for no apparent reason. I’m trying to work out why. When comparing two adjacent websocket calls in dev tools (the last failing call, and the first successful one), the only obvious difference is regarding the time of the message. The failing call (says it was stalled for 5.3 days? Actually, hovering over the the time on the failing call, it says 06/01/1970 16:24…):

And the next call, that was successful:

chrismccord

chrismccord

Creator of Phoenix

Are you using brave by any chance?

dblack

dblack OP

Wow, how did you know?! It was in the back of my mind that Brave might be the culprit… I wasn’t seeing the same thing with Chrome

chrismccord

chrismccord

Creator of Phoenix

This is the third report I have seen with Brave hanging in the 101 websocket upgrade. Unfortunately it doesn’t appear to be anything on our side and by all things I’ve seen the bits never make it to the server. One person had it happen only when the adguard extension was enabled, but disabling didn’t fix it until they restarted Brave. Both previous reports I’ve seen restarting Brave fixed it, but this looks like some obscure issues squarely on Brave’s side. I have wondered if we are attempting to connect too aggressively for brave, but it is a total guess. If you are able to reliably recreate, you could try instantiating the liveSocket and liveSocket.connect inside a window.addEventListender("DOMContentLoaded", ...)

outlog

outlog

from a very quick look it seems like Brave proxies websocket when the shield is “up”.. through this code: brave-core/browser/net/brave_proxying_web_socket.cc at master · brave/brave-core · GitHub (and probably else where for the 101 upgrade - NOT a C expert)

there was a recent commit to that file fixing a bug 15715: Properly shutdown our websocket proxy. · brave/brave-core@79783d3 · GitHub, slated for next major brave version (1.26) but totally unknown if it fixes anything related to this issue..

but does sound plausible that some issue exist with brave, especially when using the shield ws proxy.. maybe it can be sporadically reproduced running 100-1k tests with wallaby/chromedriver?

dblack

dblack OP

Thank you both, that’s great news (for me!), I thought I was entering a world of pain trying to work out why my app was misbehaving.

I’ll continue to use brave and try a couple of things when it next happens. It appears to only happen when something updates on the server - once in production after I pushed a new release, and a couple of times in dev when the code reloader kicked in. It seems to right itself after about an hour for no reason (yesterday I gave up trying stuff, then came back after 20 mins, and it was all good).

I’ll fire up wireshark next time and see if i can see anything on the wire.

cmo

cmo

I use Brave get that when I have forgotten to close a div or something. I thought it happened on Edge too though…

sanswork

sanswork

I have a control panel which has two domains point at it and I see these a lot in Chrome when I have tabs open with both domains. If all my tabs are 1 domain or the other it’s fine but as soon as there is a mix all liveview pages start to fail.

jakemauer

jakemauer

Just wanted to check in and say I’m still encountering the same endless reloading “websocket connection is closed before connection is established” issue.

I’m using Brave 1.28.105 on MacOS 11.5.1 and looking at the source code for this version of Brave on Github, the previously linked PR’s websocket fix code is present in this version of the browser but it doesn’t seem to make a difference.

I still get the Websocket error with or without Brave’s “shields” up or not.

dblack

dblack OP

Hi @jakemauer, that’s interesting, I’ve not had it happen to me since I posted. For me it’s been really intermittent. Is it happening for you all the time?

I’m on the same version of Brave, but on linux

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews