-
Notifications
You must be signed in to change notification settings - Fork 757
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
Error loading workspace folders (expected 1, got 0) #3563
Comments
This may be limited to git bash. I use git bash on windows and my normal workflow for any programming with vscode is to open a git bash terminal and cd to the directory, using the command line for git operations. I run 'code .' in the git bash terminal to open up vscode, and that is when I get the error. After spending a few hours uninstalling the extension, disabling all my other extensions, reinstalling go, etc, I started a powershell prompt and started vscode from it and I didn't get the errors, but I get them when I start from my git bash prompt. None of the other languages I use (C#, C, node, java) seem to have issues and vscode opens the folder and lets me edit the files just fine when I open from git bash, but the go extension throws this error (twice) for some reason. |
When it's working I see this when I open gopls trace:
When I use git bash the go output shows this:
And the gopls output shows a bunch of these, but with no non-generic information like what it tried to open
|
Sorry, I haven't had time to look into this yet. I believe the problem may be related to a runtime.GOOS mismatch, and resulting confusion in the filepath package. Can you please share the result of |
Type: Bug
Create directory, use 'go mod init mine', open folder in vscode.
This error shows up twice in the bottom-right when the extension tries to open.
Extension version: 0.42.1
VS Code version: Code 1.94.1 (e10f2369d0d9614a452462f2e01cdc4aa9486296, 2024-10-05T05:44:32.189Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: