vscode-sftp icon indicating copy to clipboard operation
vscode-sftp copied to clipboard

Workaround to get this plugin working without downgrading

Open sephentos opened this issue 3 years ago • 7 comments

https://github.com/liximomo/vscode-sftp/issues/919#issuecomment-838586635

Since this project seems to be abandoned no one cares about duplicate issues, mentioning etc.

sephentos avatar May 12 '21 13:05 sephentos

Leaving a comment here because I am all ears. I use this package everyday and it needs to get fixed or this is the kind of thing that may drive me back to Atom. At this point I'm really not sure why this functionality isn't just built into VSCode.

speiffer829 avatar May 12 '21 17:05 speiffer829

POSTED TO Stack Overflow: https://stackoverflow.com/questions/67506693/vscode-error-no-such-file-sftp-liximomo-extension/67524099#67524099

This is apparently a brand new problem that has been introduced into the newer versions of VS Code. I have FOUND A SOLUTION that seems to work well, by modifying a single line in the extension code. This is only valid for version 1.12.9 of the liximomo.sftp extension.

Here are the steps:

  1. Shutdown / Quit VS Code.
  2. Locate the following file:
    Mac OS X:
    ~/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/sftp.js
    Windows:
    C:\Users\account_name\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\sftp.js

  3. Make a backup copy of the file.
  4. Modify line 388, which should be:
    if ( code === STATUS_CODE . OK ) { changing it to:
    if (code === STATUS_CODE.OK || code === STATUS_CODE.NO_SUCH_FILE) {
  5. Save the file.
  6. Relaunch VS Code; test by uploading or downloading from your sftp server. The error should not be present.

CREDIT:
Bao from: https://blog.naver.com/PostView.nhn?blogId=pcgun70&logNo=222341271496
From their blog entry (translated by Google to English):

"At first, there was no solution, but Now, 12 hours later, the Holy One appeared, who told me how to solve it.files that sftp cannot find in the first place. There is a calling phrase, VScode is upgraded and an error is called. It came out. Actually, I did not solve the problem. Even if the file is not found, the same result as the success process is exported. It is just a modification. It is expected that a modified version will be released in the future."

jewettg avatar May 13 '21 21:05 jewettg

@jewettg I mean, it's not like I'm the one who came up with it in https://github.com/liximomo/vscode-sftp/issues/915#issuecomment-833269280, but ok.

Webbeh avatar May 16 '21 10:05 Webbeh

Dupe of #915 anyway.

Webbeh avatar May 16 '21 10:05 Webbeh

This worked for me

frankwas avatar May 17 '21 18:05 frankwas

This appears to be a duplicate of issue SFTP error upload no such file after update VS code 1.56.0 #919. Since the plugin appears to have been abandoned by the author (and also note the lack of response) only the opener can close this issue. So, please, @sephentos, would you close this issue?

Ben-Voris avatar May 18 '21 00:05 Ben-Voris

this worked for me too. thank you so much.

aimanzaidan avatar May 20 '21 04:05 aimanzaidan