vscode-sftp
vscode-sftp copied to clipboard
Can download - cannot upload
Do you read the FAQ?
- [ *] Yes.
- [ ] I am going to read now.
Describe the bug
I was using sftp to manage my Home Assistant on HAOS, was working fine for the past years. Now, after about a year of inactivity, it fails to upload. I didn't change anything on the configuration since when sftp was working, but naturally both my OS (OSX) and HAOS have received multiple updates.
I am able to fetch and download, but uploading will not work, with the following error:
[05-03 13:23:06] [info] [file-save] /Users/thanpolas/Projects/homeassistant/ha-config/sensor.yaml
[05-03 13:23:06] [trace] handle upload file for /Users/thanpolas/Projects/homeassistant/ha-config/sensor.yaml
[05-03 13:23:06] [debug] Outbound: Sending CHANNEL_DATA (r:0, 24)
[05-03 13:23:06] [debug] SFTP: Outbound: Buffered MKDIR
[05-03 13:23:06] [debug] Inbound: CHANNEL_DATA (r:0, 28)
[05-03 13:23:06] [debug] SFTP: Inbound: Received STATUS (id:406, 4, "Failure")
[05-03 13:23:06] [debug] Outbound: Sending CHANNEL_DATA (r:0, 20)
[05-03 13:23:06] [debug] SFTP: Outbound: Buffered LSTAT
[05-03 13:23:06] [debug] Inbound: CHANNEL_DATA (r:0, 41)
[05-03 13:23:06] [debug] SFTP: Inbound: Received ATTRS (id:407)
[05-03 13:23:06] [error] Error: Failure
at 101 (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/SFTP.js:2854:19)
at SFTP.push (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/SFTP.js:278:11)
at CHANNEL_DATA (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/client.js:587:23)
at 94 (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/handlers.misc.js:930:16)
at Protocol.onPayload (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/Protocol.js:2052:10)
at AESGCMDecipherNative.decrypt (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/crypto.js:987:26)
at Protocol.parsePacket [as _parse] (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/Protocol.js:2021:25)
at Protocol.parse (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/protocol/Protocol.js:306:16)
at Socket.<anonymous> (/Users/thanpolas/.vscode/extensions/natizyskunk.sftp-1.16.3/node_modules/ssh2/lib/client.js:775:21)
at Socket.emit (node:events:517:28)
at Socket.emit (node:domain:489:12)
at addChunk (node:internal/streams/readable:335:12)
at readableAddChunk (node:internal/streams/readable:308:9)
at Socket.Readable.push (node:internal/streams/readable:245:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) download /Users/thanpolas/Projects/homeassistant/ha-config/sensor.yaml
[05-03 13:23:12] [debug] Outbound: Sending ping (GLOBAL_REQUEST: [email protected])
[05-03 13:23:12] [debug] Inbound: Received REQUEST_FAILURE
To Reproduce Steps to reproduce the behavior:
On my local I simply cannot upload, either automatically ("uploadOnSave") or manually as a command.
Desktop (please complete the following information):
- OS: MacOS 14.3.1 (23D60)
- VSCode Version: 1.89.0
- Extension Version: v1.16.3
My sftp configuration
Marked with x for obscurity.
{
"name": "Home Assistant",
"host": "192.168.x.x",
"port": xxxx,
"protocol": "sftp",
"remotePath": "/config",
"uploadOnSave": true,
"agent": "$SSH_AUTH_SOCK",
"passphrase": true,
"username": "root",
"interactiveAuth": true
}
Same issue here, on macOS -> Ubuntu:
- OS: MacOS 14.5 (23F79)
- VSCode Version: 1.91.0
- Extension Version: v1.16.3
I was able to have a working solution when I am working on a directory inside my remote home.
Here is my setup:
- I have a
/workspaces/directory indrwxr-xr-xfor my user - Inside this folder, I have a symbolic link to a directory inside my home:
ln -s /home/heziode/Documents/bench-source /workspaces/bench-source
If I attempt to use this extension with path /workspaces/bench-source, it does not work. However, if I use the real path (/home/heziode/Documents/bench-source) it works. I suppose that this extension have some issues to handling symlink.