Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.25.0 - new error when opening ssh:// URIs - "Error handling uri: " build.gradle, .devcontainer.json #341

Closed
luckman212 opened this issue Jun 2, 2022 · 19 comments
Labels
bug Something isn't working

Comments

@luckman212
Copy link

Since I updated to today's new 1.25 build, I am getting an error when opening ssh:// URIs with VSCode.

See screenshot. This is macOS 12.4, VSCode 1.67.2

code --folder-uri ssh://r1.xxxxxxx/

CleanShot 2022-06-02 at 03 35 36

@SchoofsKelvin
Copy link
Owner

SchoofsKelvin commented Jun 2, 2022

Looks like some extensions (or built-in VS Code code) is attempting to directly read build.gradle and .devcontainer/devcontainer.json etc without using stat to check if it exists and is readable.

You can add a -FS_NOTIFY_ERRORS flag (globally or per config, see #270) to disable these notifications. I might just disable this by default for both stat and readFile/readDirectory operations in the next version and/or add these two paths to the ignore list. I'll see what's best and doesn't break other things (most importantly, the feature where it informs you if saving something failed, i.e. #282)

@SchoofsKelvin SchoofsKelvin added the bug Something isn't working label Jun 2, 2022
@luckman212
Copy link
Author

luckman212 commented Jun 2, 2022

@SchoofsKelvin Thanks for looking. I'm wary of disabling notifications for write failures. Sounds like just the kind of thing that would bite me on a flaky/VPN connection.

...add these two paths to the ignore list...

This sounds like the way to go... Is that something I can do myself in a config file somewhere?

edit: I tried various local/global settings using stuff like

 "files.exclude": {
    "**/.devcontainer/devcontainer.json": true,
    "**/build.gradle": true
  },
  "files.watcherExclude": {
    "**/.devcontainer/devcontainer.json": true,
    "**/build.gradle": true
  }

but none of that worked. The only thing that suppresses it for me is "sshfs.flags": ["-FS_NOTIFY_ERRORS"]. Head in the sand! ⏳

@SchoofsKelvin
Copy link
Owner

It should be fixed now. Could you try installing the artifact from this build? If you don't specify any flags, it should only show notifications about "write" operations failing, i.e. writeFile, createDirectory, delete and rename.

While I've also added those two files to the ignored list, it only affects how verbose it gets logged in the SSH FS output channel. Shouldn't matter much to you, but I've added them regardless.

@luckman212
Copy link
Author

Thanks @SchoofsKelvin - yep that's working for me! 🚀

@ElmarHarbecke
Copy link

ElmarHarbecke commented Sep 8, 2022

Hello here.
Run into the same issue trying to connect to a server. I have installed the extension on a new machine as one and only extension. But the same issue as in connection with other extensions.
The artifact from above is not longer available, so, I could not try to solve it.
Also, trying to add the files/directories to an exclude list via user config did not solve the problem.
Any help is welcome - thanks in advance.
Elmar

@SP-SuperPoney
Copy link

SP-SuperPoney commented Sep 13, 2022

Same here can you provide a fix ? the linked build is no longer available.

@sebastian-li
Copy link

Same for me here. ran into the same error message and the build link is not working

@rnapoli
Copy link

rnapoli commented Oct 8, 2022

Same here.
It happens every time I open my VSCode.
The remote-machine is in my own local network, and ssh sessions work with other software.

Error handling uri: ssh://remote-machine/build.gradle ssh://remote-machine/build.gradle

My environment:

Windows 10 (up to date)
VSCode Version: 1.72.0 (up to date)
Commit: 64bbfbf67ada9953918d72e1df2f4d8e537d340e
Date: 2022-10-04T23:20:39.912Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19043
Sandboxed: No

@matDOTviguier
Copy link

Same here.
W11 & VSCODE latest stable

@elvirgit
Copy link

I have the same problem. Any solution here? Thanks

@dassels
Copy link

dassels commented Nov 30, 2022

Me as well, perhaps it will be in the next update...

@Fischmuetze
Copy link

same here ... :(

@Cleanerrr
Copy link

Any solution for this error???

@luckman212
Copy link
Author

@ElmarHarbecke @SP-SuperPoney @sebastian-li @rnapoli @matDOTviguier @elvirgit @dassels @Fischmuetze @Cleanerrr

Until @SchoofsKelvin has more time to look at this, I posted a patch here that you can try. Hope it works for you.

https://github.com/luckman212/vscode-sshfs-patch

@SP-SuperPoney
Copy link

@ElmarHarbecke @SP-SuperPoney @sebastian-li @rnapoli @matDOTviguier @elvirgit @dassels @Fischmuetze @Cleanerrr

Until @SchoofsKelvin has more time to look at this, I posted a patch here that you can try. Hope it works for you.

https://github.com/luckman212/vscode-sshfs-patch

Worked fine on my setup !

I had to change the bash script because I'm using VSCode on Windows and the ~/ folder was pointing to /home/<username> and my VSCode extention folder is locatedf at /mnt/c/Users/<username>/.vscode/

So I've manually changed:

cp -iv ./{,f1d0.}extension.js \
~/.vscode/extensions/kelvin.vscode-sshfs-1.25.0/dist/

to

cp -iv ./{,f1d0.}extension.js \
/mnt/c/Users/<username>/.vscode/extensions/kelvin.vscode-sshfs-1.25.0/dist/

et voilà !

@dassels
Copy link

dassels commented Feb 6, 2023

Worked on mine as well! And thanks for the tip @SP-SuperPoney I'm also running on Windows and needed to update the script.

@rustyx
Copy link

rustyx commented Feb 21, 2023

Why is this ticket closed? It's not resolved (or the issue is back). Kindly re-open, @SchoofsKelvin

@rushikpatel08
Copy link

Having Same Issue if you can explain the solution in brief step by step and provide perfect location of file that need to be change with change data

@SchoofsKelvin
Copy link
Owner

I've published a new version of the extension (v1.26.0) which includes this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests