Natizyskunk / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
373 stars 68 forks source link

uploadOnSave stops working, downgrade to 1.16.1 doesn't help too #454

Closed Spirituss closed 2 months ago

Spirituss commented 7 months ago

Do you read the FAQ?

Describe the bug When I try to upload the file by saving it I see the following log:

[error] Error: Failure
    at 101 (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/protocol/SFTP.js:2704:19)
    at SFTP.push (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/protocol/SFTP.js:278:11)
    at CHANNEL_DATA (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/client.js:525:23)
    at 94 (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/protocol/handlers.misc.js:859:16)
    at Protocol.onPayload (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/protocol/Protocol.js:2025:10)
    at AESGCMDecipherNative.decrypt (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/protocol/crypto.js:987:26)
    at Protocol.parsePacket [as _parse] (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/protocol/Protocol.js:1994:25)
    at Protocol.parse (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/protocol/Protocol.js:293:16)
    at Socket.<anonymous> (/Users/user/.vscode/extensions/natizyskunk.sftp-1.16.1/node_modules/ssh2/lib/client.js:713:21)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) download /Users/user/test.yaml
[debug] Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)
[debug] Inbound: Received REQUEST_FAILURE

It worked for many months correctly.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Run command '....'
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Extension Logs from Startup - required

  1. Open User Settings.

    • On Windows/Linux - File > Preferences > Settings
    • On macOS - Code > Preferences > Settings
  2. Set sftp.debug to true and reload vscode.
  3. Reproduce the problem, get the logs from View > Output > sftp.
Spirituss commented 7 months ago

I found that uploadOnSave does work in the subfolders of the root folder, but doesn't work on the root folder.

Spirituss commented 7 months ago

It seems that the reason is that remote path is the symlink. All files that placed in the root of the symlink folder can't be uploaded via sftp, while the files from subfolders upload successfully.

Kolia56 commented 6 months ago

I found that uploadOnSave does work in the subfolders of the root folder, but doesn't work on the root folder.

I have the exact same issue. It has been working for months without any troubles. VSCode version: Version: 1.84.2 (user setup) Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e Date: 2023-11-09T10:51:52.184Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19044

You steered to he solution, I change SFTP config folder to a non symlink folder and it works again. Thanks for that. I still don't know why it worked until now.

Spirituss commented 6 months ago

You steered to he solution, I change SFTP config folder to a non symlink folder and it works again. Thanks for that. I still don't know why it worked until now.

In my case I use VSCode for Home Assistant. I found that HA changed base config folder some time ago and created symlink to it with the old name.

Kolia56 commented 6 months ago

You steered to he solution, I change SFTP config folder to a non symlink folder and it works again. Thanks for that. I still don't know why it worked until now.

In my case I use VSCode for Home Assistant. I found that HA changed base config folder some time ago and created symlink to it with the old name.

same with me

welove commented 6 months ago

Having the same problem. I must close and reopen VS Code every 5 minutes in order to save my code

Kolia56 commented 6 months ago

As said here, try so save in a folder that is not a symlink. For both of us it worked

welove commented 6 months ago

As said here, try so save in a folder that is not a symlink. For both of us it worked

I have no idea what a symlink folder is. I'm using a Mac, is that something that I should change on Mac OS also?

I'm also having trouble simply opening folders on the tree view. Everything is very slow since yesterday. Lask week everything was fine and I have no idea what might have changed that could be causing these behaviours

Kolia56 commented 6 months ago

The symlink is on the remote target system, not on your Mac where VSCode is installed. I guess the target system is not your Mac?

Spirituss commented 6 months ago

The symlink is on the remote target system, not on your Mac where VSCode is installed. I guess the target system is not your Mac?

Yes, it is on the host where the code is placed. That's why I use sftp from my Mac to connect to.

Kolia56 commented 6 months ago

so then the folder that is targeted is most probably a symlink that is not the real folder but a pointer to the folder. try to find out the real folder path and change the sftp configuration accordingly.

Spirituss commented 2 months ago

I changed the path from symlink to the direct one, it works