Early WebSocket messages can be missing in the Network tab
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(Not tracked)
People
(Reporter: holyfoek, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
Reproduction instructions
Keep this running in a terminal
docker run --rm --init -p 3030:3030 ekzhang/rustpad@sha256:728dd31070c027a5978008ac816164e2052462f9ad24c295e9d645ee2dc44134
Then visit
http://localhost:3030
Go to the devtools and activate the "Network" tab, filter for WebSocket requests, then refresh the page to see the requests.
Activate the WebSocket request and open the "Response" tab.
What happened?
Often (on my machine >50%), the first message is missing from the list.
What should have happened?
The first message should start with
{"Identity":
Anything else we should know?
Tested on 91.0a1 (2021-07-06) (64-bit) with a clean profile.
I believe the reason I could not reproduce this with the public instance of the server at https://rustpad.io is that the message has to arrive immediately after the connection is open for the message to be dropped.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Thanks for the report, taso!
I can reproduce the problem using your Docker image on my Ubuntu (VM) machine.
See the attached screenshot. The first "identity" frame is missing.
Honza
Comment 4•4 years ago
•
|
||
I am also attaching simpler test case that can be also used to repro the problem.
-
Run the PHP script (WS server) locally on your machine
php -q websockets.php -
Open DevTools and select the Network panel
-
Load http://janodvarko.cz/tests/bugzilla/1719394/
You can also load data URL:data:text/html,<script>new WebSocket('ws://127.0.0.1:12345/websockets.php');</script> -
Inspect WS frames for the 101 request
ER: You should see two frames: First Now <time> and (after two seconds) Second Now <time>
AR: The First Now frame is missing sometimes
You can also run the HTML client file locally on your machine (might be easier to repro the issue)
Honza
Comment 5•4 years ago
|
||
Updated•4 years ago
|
This bug makes debugging web socket connections in firefox unreliable, is there any workaround maybe?
Description
•