Open Bug 1719394 Opened 4 years ago Updated 3 months ago

Early WebSocket messages can be missing in the Network tab

Categories

(DevTools :: Netmonitor, defect, P3)

x86_64
Linux
defect

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.

Flags: needinfo?(odvarko)
Attached image image.png

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

Flags: needinfo?(odvarko)
Attached file websockets.php

I am also attaching simpler test case that can be also used to repro the problem.

  1. Run the PHP script (WS server) locally on your machine
    php -q websockets.php

  2. Open DevTools and select the Network panel

  3. 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>

  4. 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

Severity: -- → S3
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Priority: -- → P3

This bug makes debugging web socket connections in firefox unreliable, is there any workaround maybe?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: