satiromarra / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
23 stars 3 forks source link

CTRL-S results in error: "Config Not Found." #83

Closed robbyleh closed 10 months ago

robbyleh commented 10 months ago

Do you read the FAQ?

Describe the bug After CTRL-S (save) I am getting below error message (Config file not found) even so that the config file is there below .vscode\sftp.json. The old plugin 1.16.3 was working fine at least in winter 2022. Since them I didn't use it anymore. Now I uninstalled it and then installed this new version 1.18.1 but the issue persists.

To Reproduce Steps to reproduce the behavior:

  1. Change a file in the project and save it (CTRL-S)
  2. the related file on the remote server keeps unchanged.
  3. see the error message in debug output

Expected behavior

Screenshots none

Desktop (please complete the following information):

Extension Logs from Startup - required [2023-08-28 22:38:27] [info] .env not exists [2023-08-28 22:38:27] [info] config at z:\Privat\UserID\Workspace\prometheus_2 {"remotePath":"/etc/prometheus/","uploadOnSave":true,"ignoreRealPath":false,"useTempFile":false,"openSsh":false,"downloadOnOpen":false,"ignore":[],"concurrency":4,"protocol":"sftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"remoteExplorer":{"order":0},"name":"prometheus_2","host":"192.168.1.119","port":22,"username":"******","password":"******"} [2023-08-28 22:39:22] [info] [file-save] \\MYNAS\Data_UserID\Privat\UserID\Workspace\prometheus_2\prometheus.yml [2023-08-28 22:39:22] [error] Error: Config Not Found. (file://mynas/Data_UserID/Privat/UserID/Workspace/prometheus_2/prometheus.yml) at l (c:\Users\UserID Lastname\.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:416739) at c:\Users\UserID Lastname\.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:417103 at Generator.next (<anonymous>) at c:\Users\UserID Lastname\.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:416475 at new Promise (<anonymous>) at n (c:\Users\UserID Lastname\.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:416220) at c:\Users\UserID Lastname\.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:417042 at c:\Users\UserID Lastname\.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:447663 at Generator.next (<anonymous>) at o (c:\Users\UserID Lastname\.vscode\extensions\satiromarra.code-sftp-1.18.1\dist\extension.js:2:446644) download \\MYNAS\Data_UserID\Privat\UserID\Workspace\prometheus_2\prometheus.yml

My actions till here: I was researching the internet a lot and found a few sites with users having same problem. One hint was to add this context path to the config: "context":"." and made an attempt and it was working fine. ( That was with version 1.16.3 few days ago). Few more save attempts the error appeared agein and till now the error persists indipendent if I use this context parameter or not.

Thanks in advance...

robbyleh commented 10 months ago

screenshot shows the config at the right location. grafik

satiromarra commented 10 months ago

@robbyleh On your PC, is the path to your project's folder virtual?

robbyleh commented 10 months ago

Hi Satiro,

it's just a network drive mount in Windows: You can see this drive in the explorer with the letter "Z:" It comes up automatically since several years. ( /PERSISTENT ).

`C:\Users\UserId Lastname>net use Neue Verbindungen werden gespeichert.

Status Lokal Remote Netzwerk

OK Z: \MYNAS\Data_UserId Microsoft Windows Network Der Befehl wurde erfolgreich ausgeführt. ` Sorry for german sys-language. Last sentence says "command succesfully".

Robby

robbyleh commented 10 months ago

But just now, I see that the Code windows shows me the .vscode folder but when I check the folder in windows itself the .vscode folder is not there: grafik

`Z:>cd Privat\Robby\Workspace\prometheus_2

Z:\Privat\UserId\Workspace\prometheus_2>dir Datenträger in Laufwerk Z: ist Data_UserId Volumeseriennummer: 31BF-C113

Verzeichnis von Z:\Privat\UserId\Workspace\prometheus_2

23.08.2023 15:02

. 23.08.2023 14:47 .. 23.08.2023 15:02 files_sd 28.08.2023 23:02 1.221 prometheus.yml 23.08.2023 15:23 rules 23.08.2023 15:02 rules.s 1 Datei(en), 1.221 Bytes 5 Verzeichnis(se), 1.079.551.201.280 Bytes frei`

This is strange, I never realised that. Or is this normal so that VS Code shows that only and save it somewhere else?

robbyleh commented 10 months ago

The network mount is mapped to a QNAP NAS which is a Linux. I have this running since 2014 and sfp plugin with VSCode was also working long time... One more I found outg now: As you saw above cmd output, the folder .vscode is not there. When I check the same on the NAS directly I see the .vscode folder:

[admin@MYNAS prometheus_2]# ls -l .vscode/ -rwxrwx--- 1 userid everyone 264 Aug 28 23:02 sftp.json*

grafik

satiromarra commented 10 months ago

In sftp.json file use this option

"ignoreRealPath":false (or true)

robbyleh commented 10 months ago

"ignoreRealPath": true solved the issue.

Thank you very much :-)

robbyleh commented 10 months ago

Thank you

UmbrellaProject commented 8 months ago

that helped me too!