vscode-sftp
vscode-sftp copied to clipboard
Error: No such file but file was uploaded
Describe the bug When using the extension to save a file through a SSH tunnel the file is saved correctly but you also get the error No such file. So the upload failed... successfully.
To Reproduce Steps to reproduce the behavior:
- Create an SSH tunnel:
ssh [email protected] -L 11343:dest:22
(Cannot give you the actual information) - Create config:
{
"name": "Server",
"host": "localhost",
"protocol": "sftp",
"port": 11343,
"username": "user",
"password": "password",
"remotePath": "/",
"uploadOnSave": true,
"ignore": [
".vscode",
".sftp.json"
]
}
- Create a file and save
Expected behavior No error popup
Desktop (please complete the following information):
- OS: Windows 10 20H2 19042.985
- VSCode Version 1.56.2
- Extension Version 1.12.9
Extension Logs from Startup - required
[05-29 15:44:47] [debug] register command "Cancel All Transfer" from "./commandCancelAllTransfer.ts"
[05-29 15:44:47] [debug] register command "Config" from "./commandConfig.ts"
[05-29 15:44:47] [debug] register command "List Active Folder" from "./commandListActiveFolder.ts"
[05-29 15:44:47] [debug] register command "Open Ssh Connection" from "./commandOpenSshConnection.ts"
[05-29 15:44:47] [debug] register command "Set Profile" from "./commandSetProfile.ts"
[05-29 15:44:47] [debug] register command "Toggle Output Panel" from "./commandToggleOutputPanel.ts"
[05-29 15:44:47] [debug] register command "Upload Changed Files" from "./commandUploadChangedFiles.ts"
[05-29 15:44:47] [debug] register command "Delete Remote" from "./fileCommandDeleteRemote.ts"
[05-29 15:44:47] [debug] register command "Diff" from "./fileCommandDiff.ts"
[05-29 15:44:47] [debug] register command "Diff Active File" from "./fileCommandDiffActiveFile.ts"
[05-29 15:44:47] [debug] register command "Download" from "./fileCommandDownload.ts"
[05-29 15:44:47] [debug] register command "Download Active File" from "./fileCommandDownloadActiveFile.ts"
[05-29 15:44:47] [debug] register command "Download Active Folder" from "./fileCommandDownloadActiveFolder.ts"
[05-29 15:44:47] [debug] register command "Download File" from "./fileCommandDownloadFile.ts"
[05-29 15:44:47] [debug] register command "Download Folder" from "./fileCommandDownloadFolder.ts"
[05-29 15:44:47] [debug] register command "Download Force" from "./fileCommandDownloadForce.ts"
[05-29 15:44:47] [debug] register command "Download Project" from "./fileCommandDownloadProject.ts"
[05-29 15:44:47] [debug] register command "Edit In Local" from "./fileCommandEditInLocal.ts"
[05-29 15:44:47] [debug] register command "List" from "./fileCommandList.ts"
[05-29 15:44:47] [debug] register command "List All" from "./fileCommandListAll.ts"
[05-29 15:44:47] [debug] register command "Reveal In Explorer" from "./fileCommandRevealInExplorer.ts"
[05-29 15:44:47] [debug] register command "Reveal In Remote Explorer" from "./fileCommandRevealInRemoteExplorer.ts"
[05-29 15:44:47] [debug] register command "Sync Both Directions" from "./fileCommandSyncBothDirections.ts"
[05-29 15:44:47] [debug] register command "Sync Local To Remote" from "./fileCommandSyncLocalToRemote.ts"
[05-29 15:44:47] [debug] register command "Sync Remote To Local" from "./fileCommandSyncRemoteToLocal.ts"
[05-29 15:44:47] [debug] register command "Upload" from "./fileCommandUpload.ts"
[05-29 15:44:47] [debug] register command "Upload Active File" from "./fileCommandUploadActiveFile.ts"
[05-29 15:44:47] [debug] register command "Upload Active Folder" from "./fileCommandUploadActiveFolder.ts"
[05-29 15:44:47] [debug] register command "Upload File" from "./fileCommandUploadFile.ts"
[05-29 15:44:47] [debug] register command "Upload Folder" from "./fileCommandUploadFolder.ts"
[05-29 15:44:47] [debug] register command "Upload Force" from "./fileCommandUploadForce.ts"
[05-29 15:44:47] [debug] register command "Upload Project" from "./fileCommandUploadProject.ts"
[05-29 15:44:47] [info] config at d:\Programmierung\NodeJS-Projekte\LoraChat {"remotePath":"/","uploadOnSave":true,"downloadOnOpen":false,"ignore":[".vscode",".sftp.json"],"concurrency":4,"protocol":"sftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"Server","host":"localhost","port":11343,"username":"******","password":"******"}
[05-29 15:44:55] [warn] ENOENT: no such file or directory, open 'C:\Users\malo0\.ssh\config' load C:\Users\malo0\.ssh\config failed
[05-29 15:44:58] [info] [file-save] d:\Programmierung\NodeJS-Projekte\LoraChat\baum.js
[05-29 15:44:58] [trace] handle upload file for d:\Programmierung\NodeJS-Projekte\LoraChat\baum.js
[05-29 15:44:58] [debug] Local ident: 'SSH-2.0-ssh2js0.4.5'
[05-29 15:44:58] [debug] Client: Trying localhost on port 11343 ...
[05-29 15:44:58] [debug] Client: Connected
[05-29 15:44:58] [debug] Remote ident: 'SSH-2.0-OpenSSH_7.9p1 Raspbian-10+deb10u2+rpt1'
[05-29 15:44:58] [debug] Outgoing: Writing KEXINIT
[05-29 15:44:58] [debug] DEBUG: Comparing KEXINITs ...
[05-29 15:44:58] [debug] (local) KEX algorithms: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
[05-29 15:44:58] [debug] (remote) KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
[05-29 15:44:58] [debug] KEX algorithm: ecdh-sha2-nistp256
[05-29 15:44:58] [debug] (local) Host key formats: ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
[05-29 15:44:58] [debug] (remote) Host key formats: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
[05-29 15:44:58] [debug] Host key format: ssh-ed25519
[05-29 15:44:58] [debug] (local) Client->Server ciphers: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,[email protected],aes256-gcm,[email protected]
[05-29 15:44:58] [debug] (remote) Client->Server ciphers: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
[05-29 15:44:58] [debug] Client->Server Cipher: aes128-ctr
[05-29 15:44:58] [debug] (local) Server->Client ciphers: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,[email protected],aes256-gcm,[email protected]
[05-29 15:44:58] [debug] (remote) Server->Client ciphers: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
[05-29 15:44:58] [debug] Server->Client Cipher: aes128-ctr
[05-29 15:44:58] [debug] (local) Client->Server HMAC algorithms: hmac-sha2-256,hmac-sha2-512,hmac-sha1
[05-29 15:44:58] [debug] (remote) Client->Server HMAC algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
[05-29 15:44:58] [debug] Client->Server HMAC algorithm: hmac-sha2-256
[05-29 15:44:58] [debug] (local) Server->Client HMAC algorithms: hmac-sha2-256,hmac-sha2-512,hmac-sha1
[05-29 15:44:58] [debug] (remote) Server->Client HMAC algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
[05-29 15:44:58] [debug] Server->Client HMAC algorithm: hmac-sha2-256
[05-29 15:44:58] [debug] (local) Client->Server compression algorithms: none,[email protected],zlib
[05-29 15:44:58] [debug] (remote) Client->Server compression algorithms: none,[email protected]
[05-29 15:44:58] [debug] Client->Server compression algorithm: none
[05-29 15:44:58] [debug] (local) Server->Client compression algorithms: none,[email protected],zlib
[05-29 15:44:58] [debug] (remote) Server->Client compression algorithms: none,[email protected]
[05-29 15:44:58] [debug] Server->Client compression algorithm: none
[05-29 15:44:58] [debug] Outgoing: Writing KEXECDH_INIT
[05-29 15:44:58] [debug] DEBUG: Checking host key format
[05-29 15:44:58] [debug] DEBUG: Checking signature format
[05-29 15:44:58] [debug] DEBUG: Verifying host fingerprint
[05-29 15:44:58] [debug] DEBUG: Host accepted by default (no verification)
[05-29 15:44:58] [debug] DEBUG: Verifying signature
[05-29 15:44:58] [debug] Outgoing: Writing NEWKEYS
[05-29 15:44:58] [debug] Outgoing: Writing SERVICE_REQUEST (ssh-userauth)
[05-29 15:44:58] [debug] Outgoing: Writing USERAUTH_REQUEST (none)
[05-29 15:44:58] [debug] Client: none auth failed
[05-29 15:44:58] [debug] Outgoing: Writing USERAUTH_REQUEST (password)
[05-29 15:44:58] [debug] Outgoing: Writing CHANNEL_OPEN (0, session)
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_REQUEST (0, subsystem: sftp)
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [debug] Outgoing: Writing MKDIR
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [debug] Outgoing: Writing LSTAT
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [debug] Outgoing: Writing OPEN
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [debug] Outgoing: Writing FSTAT
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [debug] Outgoing: Writing FSETSTAT
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [debug] Outgoing: Writing CLOSE
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [debug] Outgoing: Writing FSETSTAT
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [warn] Can't set modified time to the file because Failure
[05-29 15:44:59] [debug] Outgoing: Writing CLOSE
[05-29 15:44:59] [debug] Outgoing: Writing CHANNEL_DATA (0)
[05-29 15:44:59] [error] Error: No such file
at SFTPStream._transform (c:\Users\malo0\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\sftp.js:412:27)
at SFTPStream.Transform._read (internal/streams/transform.js:205:10)
at SFTPStream._read (c:\Users\malo0\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\sftp.js:183:15)
at SFTPStream.Transform._write (internal/streams/transform.js:193:12)
at writeOrBuffer (internal/streams/writable.js:358:12)
at SFTPStream.Writable.write (internal/streams/writable.js:303:10)
at Channel.ondata (internal/streams/readable.js:719:22)
at Channel.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Channel.Readable.push (internal/streams/readable.js:223:10)
at SSH2Stream.<anonymous> (c:\Users\malo0\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2\lib\Channel.js:167:15)
at SSH2Stream.emit (events.js:315:20)
at parsePacket (c:\Users\malo0\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\ssh.js:3288:10)
at SSH2Stream._transform (c:\Users\malo0\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\ssh.js:694:13)
at SSH2Stream.Transform._read (internal/streams/transform.js:205:10)
at SSH2Stream._read (c:\Users\malo0\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\ssh.js:253:15)
at SSH2Stream.Transform._write (internal/streams/transform.js:193:12)
at writeOrBuffer (internal/streams/writable.js:358:12)
at SSH2Stream.Writable.write (internal/streams/writable.js:303:10)
at Socket.ondata (internal/streams/readable.js:719:22)
at Socket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Socket.Readable.push (internal/streams/readable.js:223:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) when local ➞ remote d:\Programmierung\NodeJS-Projekte\LoraChat\baum.js
Same problem here. The file was updated successfully but i keep getting "Error: No such file".
UPDATED: Anyone facing the same issue, this suggested workaround resolved mine. Just remember to restart vscode for the changes to take effect.
You can try my version, i've fixed a lot of bugs, maybe this will fix yours 🙂 https://github.com/Natizyskunk/vscode-sftp/releases
Same issue... error but file is uploaded ok.
Changelog shows 1.12.3 - 2019-04-27
[09-04 15:40:23] [info] [file-save] c:\TOMC\Work_Bentley\CS213\index.html
[09-04 15:40:24] [error] Error: No such file
at SFTPStream._transform (c:\Users\TMCon.vscode-insiders\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\sftp.js:412:27)
at SFTPStream.Transform._read (internal/streams/transform.js:205:10)
at SFTPStream._read (c:\Users\TMCon.vscode-insiders\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\sftp.js:183:15)
at SFTPStream.Transform._write (internal/streams/transform.js:193:12)
at writeOrBuffer (internal/streams/writable.js:358:12)
at SFTPStream.Writable.write (internal/streams/writable.js:303:10)
at Channel.ondata (internal/streams/readable.js:719:22)
at Channel.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Channel.Readable.push (internal/streams/readable.js:223:10)
at SSH2Stream.