-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
[remote][connection] Allow offline editing in Remote-WSL #121799
Comments
@ozimos Sorry for the slow response, I think I misunderstood this issue when I first read it. Do you use the regular WSL on your local machine? What do you mean "then some time after, I lose network connectivity"? Do you mean that you turn off your wi-fi? |
Apologies for the muddled issue description. Yes, I use WSL2 on my windows machine. No, I do not turn off the wifi. But sometimes, the internet connection becomes unstable or goes down completely. At such times VSCode displays the |
I have investigated this and pushed bb01438 to log more information when disconnection occurs. Here is what I do:
This is what I see with the extra logging that I just pushed:
And I can confirm that the WebSockets are being closed using the Network Tab: @aeschli I would first ask that maybe you can investigate if WSL is the root cause of the closing WebSockets. If WSL is not the root cause of the socket disconnect, then I think we need help from @deepak1556 and create an issue for Chromium. |
Not sure if something has changed, but I'm not able to reproduce a disconnect. I tried the steps from #121799 (comment), tuning of th WSL Ethernet Adapter, Airplane mode, WIFI disconnect. I get reconnected correctly. |
@aeschli I can reproduce this consistently with the steps at #121799 (comment) . Notice how after re-enabling the network adapter, the web sockets get closed by Chromium or the OS, and then reconnection kicks in, which eventually succeeds (after a 30s timeout). Here is a screen recording: |
@alexdima Hm, I don't have a wired network adapter and would first have to organize/buy an USB-3 adapter/dock... Do we want to extract the 'enable adapter triggers disconnect' into a new issue? I'm nor sure if/how it relates to the original reported issue. |
@aeschli The original report is about dodgy wifi. So that means that the laptop loses wifi, gains wifi, loses wifi, gains wifi. I think every time wifi is gained our web sockets get disconnected. I can imagine how that can be excruciatingly annoying if you just try to work. To make it worse, it takes us about 30s to timeout until we end up reconnecting. I haven't thought about how to tackle this, but I first wanted to see if you can reproduce. Once you can reproduce, it would be interesting to see if a nodejs connection would be interrupted the same way or if this is something specific to Chromium. If also nodejs connections get interrupted, then I think this should be reported as a bug to WSL. |
@alexdima As mentioned, I have made various tests around disconnecting/switching wireless, I see that we get into reconnection but for me it reconnects instantly. |
repro steps at https://github.com/alexdima/wsl-socket-sample |
After successfully opening a VSCode editor in Remote-WSL mode and then some time after, I lose network connectivity, I want the editor to remain usable. The current behavior brings up the
Disconnected. Attempting to reconnect
modal. After dismissing the modal, the modal returns almost immediately, making it impossible to continue editing. I want to be able to continue editing the file until network connectivity is restored. Only VSCode features dependent on the network should be disabledThe text was updated successfully, but these errors were encountered: