Skip to content
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-SSH Bug]: After update, Remote save file silently fails #9898

Closed
3 tasks done
drscotthawley opened this issue May 17, 2024 · 7 comments
Closed
3 tasks done

[Remote-SSH Bug]: After update, Remote save file silently fails #9898

drscotthawley opened this issue May 17, 2024 · 7 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@drscotthawley
Copy link

drscotthawley commented May 17, 2024

Is there an existing issue for this bug?

  • I have searched the existing issues

Required Troubleshooting Steps

  • I have followed these troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting

Connect Locally

It connects successfully

->

Pressed the button to update VSCode tonight and now remote saving no longer works.

Can read files on remote server but saves never get made. No error message, just silently fails to update the remote file.

Expected Behavior

Pressing Save (Cmd-S) would save the file to the remote server, as has worked fine for a long time, up until applying tonight's VSCode update.

Steps To Reproduce

  1. From Mac laptop, use VSCode Remote to connect to remote Ubuntu server
  2. Open .py file
  3. Make changes to file
  4. Press save (Cmd S)
  5. Run your code and notice that the changes haven't occured
  6. Cat the file in the unix shell, notice that it's still the old version of the file
  7. Double check to make sure you have the directories correct
  8. Try quitting and restarting VSCode to no effect.
  9. Kill the remote server and start anew, no effect.

MacOS version: 14.2.1 (23C71)

Remote-SSH version: v0.110.1

Vscode:
Version: 1.89.1
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:32.757Z (1 wk ago)
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.2.0

Remote-SSH Log

[18:47:36.579] Log Level: 2
[18:47:36.590] SSH Resolver called for "ssh-remote+flow", attempt 1
[18:47:36.590] "remote.SSH.useLocalServer": false
[18:47:36.590] "remote.SSH.useExecServer": true
[18:47:36.591] "remote.SSH.showLoginTerminal": false
[18:47:36.591] "remote.SSH.remotePlatform": {"flow":"linux"}
[18:47:36.591] "remote.SSH.path": undefined
[18:47:36.591] "remote.SSH.configFile": undefined
[18:47:36.591] "remote.SSH.useFlock": true
[18:47:36.591] "remote.SSH.lockfilesInTmp": false
[18:47:36.593] "remote.SSH.localServerDownload": auto
[18:47:36.593] "remote.SSH.remoteServerListenOnSocket": false
[18:47:36.593] "remote.SSH.showLoginTerminal": false
[18:47:36.593] "remote.SSH.defaultExtensions": []
[18:47:36.593] "remote.SSH.loglevel": 2
[18:47:36.593] "remote.SSH.enableDynamicForwarding": true
[18:47:36.593] "remote.SSH.enableRemoteCommand": false
[18:47:36.593] "remote.SSH.serverPickPortsFromRange": {}
[18:47:36.593] "remote.SSH.serverInstallPath": {}
[18:47:36.594] VS Code version: 1.89.1
[18:47:36.594] Remote-SSH version: remote-ssh@0.110.1
[18:47:36.594] darwin arm64
[18:47:36.597] SSH Resolver called for host: flow
[18:47:36.597] Setting up SSH remote "flow"
[18:47:36.599] Using commit id "dc96b837cf6bb4af9cd736aa3af08cf8279f7685" and quality "stable" for server
[18:47:36.601] Install and start server if needed
[18:47:36.603] PATH: /Users/shawley/opt/anaconda3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/shawley/envs/hs/bin:/Users/shawley/.cargo/bin:/Users/shawley/gems/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/TeX/texbin:/Applications/quarto/bin
[18:47:36.603] Checking ssh with "ssh -V"
[18:47:36.610] > OpenSSH_9.4p1, LibreSSL 3.3.6

[18:47:36.612] Running script with connection command: ssh -T -D 54406 -o ConnectTimeout=15 flow bash
[18:47:38.891] > 9f4a93c0e425: running
[18:47:38.892] Got some output, clearing connection timeout
[18:47:38.906] > Found existing installation at /home/shawley/.vscode-server...

Starting VS Code CLI... "/home/shawley/.vscode-server/code-dc96b837cf6bb4af9cd736aa3af08cf8279f7685" command-shell --cli-data-dir "/home/shawley/.vscode-server/cli" --on-port --parent-process-id 1884955 &> "/home/shawley/.vscode-server/.cli.dc96b837cf6bb4af9cd736aa3af08cf8279f7685.log" < /dev/null
printenv:
SHELL=/bin/bash
PWD=/home/shawley
LOGNAME=shawley
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/shawley
LANG=en_US.UTF-8
VSCODE_AGENT_FOLDER=/home/shawley/.vscode-server
SSH_CONNECTION=68.52.14.35 37158 <my_remote_url>
XDG_SESSION_CLASS=user
USER=shawley
SHLVL=0
XDG_SESSION_ID=4444
XDG_RUNTIME_DIR=/run/user/1001
SSH_CLIENT=68.52.14.35 37158 22
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
_=/usr/bin/printenv
[18:47:38.913] > Removing old logfile at /home/shawley/.vscode-server/.cli.dc96b837cf6bb4af9cd736aa3af08cf8279f7685.log
Spawned remote CLI: 1884974
[18:47:38.962] > Waiting for server log...
[18:47:38.993] > 9f4a93c0e425: start
SSH_AUTH_SOCK====
DISPLAY====
listeningOn==127.0.0.1:46805==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1001==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==80==
execServerToken==a11111a1-1a11-1aa1-a11a-11aaaaa11a1a==
9f4a93c0e425: end
[18:47:38.994] Received install output:
SSH_AUTH_SOCK====
DISPLAY====
listeningOn==127.0.0.1:46805==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1001==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==80==
execServerToken==a11111a1-1a11-1aa1-a11a-11aaaaa11a1a==

[18:47:38.994] Remote server is listening on port 46805
[18:47:38.994] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":46805},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1001","platform":"linux","execServerToken":"a11111a1-1a11-1aa1-a11a-11aaaaa11a1a"},"serverStartTime":80,"installUnpackCode":""}
[18:47:38.996] Starting forwarding server. local port 54409 -> socksPort 54406 -> remotePort 46805
[18:47:38.996] Forwarding server listening on port 54409
[18:47:38.996] Waiting for ssh tunnel to be ready
[18:47:38.997] Tunneled port 46805 to local port 54409
[18:47:38.997] Resolved "ssh-remote+flow" to "port 54409"
[18:47:39.001] Initizing new exec server for ssh-remote+flow
[18:47:39.001] Resolving exec server at port 54409
[18:47:39.012] [Forwarding server port 54409] Got connection 0
[18:47:39.013] [Forwarding server port 54409] Got connection 1
[18:47:39.254] Exec server for ssh-remote+flow created and cached
[18:47:39.257] ------

[18:47:39.340] [server] Checking /home/shawley/.vscode-server/cli/servers/Stable-dc96b837cf6bb4af9cd736aa3af08cf8279f7685/log.txt and /home/shawley/.vscode-server/cli/servers/Stable-dc96b837cf6bb4af9cd736aa3af08cf8279f7685/pid.txt for a running server...
[18:47:39.340] [server] Installing and setting up Visual Studio Code Server...
[18:47:39.340] [server] Server setup complete
[18:47:39.341] [server] Starting server...
[18:47:39.341] [server] Starting server with command... Command { std: "/home/shawley/.vscode-server/cli/servers/Stable-dc96b837cf6bb4af9cd736aa3af08cf8279f7685/server/bin/code-server" "--connection-token=remotessh" "--accept-server-license-terms" "--start-server" "--enable-remote-auto-shutdown" "--socket-path=/tmp/code-a04002f5-d688-45f0-b213-4e067c6349a4", kill_on_drop: false }
[18:47:39.384] [server] *
[18:47:39.385] [server] * Visual Studio Code Server
[18:47:39.385] [server] *
[18:47:39.385] [server] * By using the software, you agree to
[18:47:39.386] [server] * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
[18:47:39.387] [server] Server bound to /tmp/code-a04002f5-d688-45f0-b213-4e067c6349a4
[18:47:39.387] [server] Extension host agent listening on /tmp/code-a04002f5-d688-45f0-b213-4e067c6349a4
[18:47:39.387] [server] parsed location: "/tmp/code-a04002f5-d688-45f0-b213-4e067c6349a4"
[18:47:39.387] [server]
[18:47:39.388] [server] Server started
[18:47:39.509] [server] [16:47:39]
[18:47:39.509] [server]
[18:47:39.509] [server]
[18:47:39.509] [server]
[18:47:39.510] [server] [16:47:39] Extension host agent started.
[18:47:39.580] [server] [16:47:39] Deleted uninstalled extension from disk github.copilot /home/shawley/.vscode-server/extensions/github.copilot-1.190.0
[18:47:39.580] [server] [16:47:39] Deleted uninstalled extension from disk github.copilot-chat /home/shawley/.vscode-server/extensions/github.copilot-chat-0.15.1
[18:47:39.663] [server] [16:47:39] [][1aead53b][ManagementConnection] New connection established.
[18:47:39.753] [server] [16:47:39] [][4467a99e][ExtensionHostConnection] New connection established.
[18:47:39.782] [server] [16:47:39] [][4467a99e][ExtensionHostConnection] <1885138> Launched Extension Host Process.

Anything else?

I will gladly downgrade to previous VSCode if it'll let me somehow.

@drscotthawley drscotthawley added the ssh Issue in vscode-remote SSH label May 17, 2024
@drscotthawley
Copy link
Author

drscotthawley commented May 18, 2024

Update:
Just noticed that LOCAL execution of new VSCode also fails to save changes to files.
This suggests that the problem is not (necessarily) Remote-SSH related.

Downgrading Mac VSCode to March 2024 (version 1.88) did not resolve this issue. Will look for some Settings issue. (note: file/directory write persmission is not the issue.)

Update 2:
Wait, Cmd-S doesn't work, but File > Save does. (??)

@drscotthawley
Copy link
Author

Wow, completely deleting VSCode and all user-related settings directories, preferences, and all Extensions --- everything -- and reinstalling from scratch: still no local saves possible.

@drscotthawley
Copy link
Author

Okay, reverting to Feb 2024 version of VSCode fixed everything. Remote saves and local saves both work again.

I'll ignore the "Update VSCode" button even more diligently now. ;-)

Closing.

@drscotthawley
Copy link
Author

Nope, remote files are not saving again. :-/

@drscotthawley drscotthawley reopened this May 18, 2024
@roblourens roblourens assigned bpasero and unassigned roblourens May 19, 2024
@roblourens roblourens removed the ssh Issue in vscode-remote SSH label May 19, 2024
@bpasero
Copy link
Member

bpasero commented May 19, 2024

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

@bpasero bpasero added the info-needed Issue requires more information from poster label May 19, 2024
@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
@Tomas-Lee
Copy link

trying to close the vscode setting-> remove-ssh:Use Exec Server can solve this problem. I did so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants