liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 256 forks source link

Uploads failing with symlink #758

Open cod3monk opened 4 years ago

cod3monk commented 4 years ago

Describe the bug Uploading any files of my project failed. Files do not show up on remote host and log shows unhelpful stack trace. Downloading files from remote works fine.

Expected behavior Upload to remote server.

Debug Log


[04-20 11:09:04] [debug] Outgoing: Writing CHANNEL_DATA (0)
[04-20 11:09:04] [error] Error: Failure
    at SFTPStream._transform (/Users/codemonk/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/sftp.js:412:27)
    at SFTPStream.Transform._read (_stream_transform.js:189:10)
    at SFTPStream._read (/Users/codemonk/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/sftp.js:183:15)
    at SFTPStream.Transform._write (_stream_transform.js:177:12)
    at doWrite (_stream_writable.js:418:12)
    at writeOrBuffer (_stream_writable.js:402:5)
    at SFTPStream.Writable.write (_stream_writable.js:302:11)
    at Channel.ondata (_stream_readable.js:720:22)
    at Channel.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Channel.Readable.push (_stream_readable.js:210:10)
    at SSH2Stream.<anonymous> (/Users/codemonk/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2/lib/Channel.js:167:15)
    at SSH2Stream.emit (events.js:203:13)
    at parsePacket (/Users/codemonk/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/ssh.js:3288:10)
    at SSH2Stream._transform (/Users/codemonk/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/ssh.js:694:13)
    at SSH2Stream.Transform._read (_stream_transform.js:189:10)
    at SSH2Stream._read (/Users/codemonk/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/ssh.js:253:15)
    at SSH2Stream.Transform._write (_stream_transform.js:177:12)
    at doWrite (_stream_writable.js:418:12)
    at writeOrBuffer (_stream_writable.js:402:5)
    at SSH2Stream.Writable.write (_stream_writable.js:302:11)
    at Socket.ondata (_stream_readable.js:720:22)
    at Socket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:166:17) download /Users/codemonk/Development/INSPECT/utils.py
[04-20 11:09:34] [debug] Outgoing: Writing ping (GLOBAL_REQUEST: keepalive@openssh.com)```

**Desktop (please complete the following information):**
 - OS: MacOS Catalina
 - VSCode Version 1.44.2
 - Extension Version 1.12.9
cod3monk commented 4 years ago

The problem is the same as described in #540: my project path has a symlink on the remote host. Replacing the remotePath in sftp.json with the absolut path on the remote host fixed the problem.

I don't need this fixed, in the sense that symlinks are supported, but please check for this problem or give some hint during failure as this cost my several hours to debug.

wokalek-work commented 2 years ago

I have this error and setting an absolute path doesn't help image