You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this issue is related to #15410 and #19123. The timings of the server and browser causes this issue to appear haphazardly and is normally difficult to reproduce reliably.
This is what happens:
client makes a connection to the server
server receives client headers and establishes the connection
client.readyState is still OPENING
closing the websocket during this window of OPENING and OPENED causes the close packet to never be sent
subsequent websocket connections to the same server hang; server never receives those connections
Steps to Reproduce
We first setup the environment to reproduce this bug.
First we setup the server. Paste the following into server.js and run npm install ws and then node server.js
Can you reproduce this issue with the current release? yes
Can you reproduce this issue with the beta channel? N/A didn't test
Can you reproduce this issue with the nightly channel? N/A didn't test
Other Additional Information:
Does the issue resolve itself when disabling Brave Shields? no
Does the issue resolve itself when disabling Brave Rewards? no
Is the issue reproducible on the latest version of Chrome? no (even though "WebSocket is closed before the connection is established" gets printed, server still receives the close packet, and following connections work fine)
Miscellaneous Information:
I hope the reproducible steps help facilitate a fix for this issue, since this looks like it has been a problem for more than a year...
The text was updated successfully, but these errors were encountered:
Description
this issue is related to #15410 and #19123. The timings of the server and browser causes this issue to appear haphazardly and is normally difficult to reproduce reliably.
This is what happens:
Steps to Reproduce
We first setup the environment to reproduce this bug.
First we setup the server. Paste the following into
server.js
and runnpm install ws
and thennode server.js
Open Brave, go to
http://127.0.0.1:8080
, open dev tools, then paste the following into the consoleNow to reproduce this bug:
testLatency()
multiple times. I got 5ms on averagetryAndBreak(3)
until two conditions occur (I reproduced this issue on every first try):WebSocket connection to 'ws://127.0.0.1:8080/' failed: WebSocket is closed before the connection is established.
testLatency()
again will result in the connection hanging. The server also doesn't receive the connection.Actual result:
On step 3, server never receives the close packet, and subsequent connections hang.
Expected result:
On step 3, server does receive the close packet, and subsequent connections work fine.
Reproduces how often:
Very easy, if you get the timings right.
Brave version (brave://version info)
Version/Channel Information:
Other Additional Information:
Miscellaneous Information:
I hope the reproducible steps help facilitate a fix for this issue, since this looks like it has been a problem for more than a year...
The text was updated successfully, but these errors were encountered: