-
Notifications
You must be signed in to change notification settings - Fork 28.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[web][ff] web socket breaks when changing network #194284
Comments
It is worth to mention that we observed this issue also without reconnection as well. Would maybe make sense as a safeguard to cycle a web socket if after replay the first replayed message don't satisfy this criteria: vscode/src/vs/base/parts/ipc/common/ipc.net.ts Line 1003 in d532fad
|
I was able to reproduce it reliably with VS Code Server from sources by toggling VPN exit nodes. I've enabled server side diagnostics and noticed that server gets
cc @alexdima does it ring any bell? Would it help if i share such traces? EDIT: I also confirmed that it only happens with FireFox, in case of Chrome it keeps working. |
Here are traces one from Chrome and another from FireFox with the same test. You can see that at the end of FF log there are no anymore tracing for server.chrome.log EDIT: It is interesting that in case of FF |
Hmm, it's possible Firefox is sending a control opcode that we don't handle well https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 |
@akosyakov If you still have an easy repro, could you perhaps log the opcode: diff --git a/src/vs/base/parts/ipc/node/ipc.net.ts b/src/vs/base/parts/ipc/node/ipc.net.ts
index ed30467961b..e1f14c2361a 100644
--- a/src/vs/base/parts/ipc/node/ipc.net.ts
+++ b/src/vs/base/parts/ipc/node/ipc.net.ts
@@ -390,6 +390,8 @@ export class WebSocketNodeSocket extends Disposable implements ISocket, ISocketT
const firstByte = peekHeader.readUInt8(0);
const finBit = (firstByte & 0b10000000) >>> 7;
const rsv1Bit = (firstByte & 0b01000000) >>> 6;
+ const opcode = (firstByte & 0b00001111);
+ console.log(`opcode: ${opcode}`);
const secondByte = peekHeader.readUInt8(1);
const hasMask = (secondByte & 0b10000000) >>> 7;
const len = (secondByte & 0b01111111); |
@alexdima here is output with FF: opcode 9 reliably happens when i toggle exit nodes. |
Thank you! ❤️ |
Marking as verified due to @akosyakov's confirmation. |
At Gitpod we received bug requests that in FireFox (117-118) VS Code Web (1.82) sometimes became unresponsive. See Loom for what unresponsive means.
It is hard to reproduce, but I was able with following:
Debugging web part showed that frontend is keep asking to replay missing messages, but server keeps replaying with the same message. Unfortunately I was not able to debug the server part.
The text was updated successfully, but these errors were encountered: