microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.93k stars 28.77k forks source link

opening workspace on wsl has some issue? #227821

Closed sanket-bhalerao closed 2 weeks ago

sanket-bhalerao commented 3 weeks ago

Type: Bug

after the latest insiders update i am getting following popup when trying to open a vscode insiders on wsl. the host 'wsl.localhost' was not found in the list of allowed hosts. Do you want to allow this anyway?

image

i am unsure if this is a bug or i messed something up.

UPDATE: this happens when i use code-insiders . to open the workspace, if i open it using the recent things work as usual. in my workflow i use code-insiders . a lot (at least few times a day).

VS Code version: Code - Insiders 1.94.0-insider (a162831c17ad0d675f1f0d5c3f374fd1514f04b5, 2024-09-06T12:53:19.832Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)| |GPU Status|2d_canvas: enabled
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| |Load (avg)|undefined| |Memory (System)|15.82GB (6.21GB free)| |Process Argv|.| |Screen Reader|no| |VM|0%|
Extensions (27) Extension|Author (truncated)|Version ---|---|--- ng-template|Ang|18.2.0 vscode-markdownlint|Dav|0.55.0 vscode-eslint|dba|3.0.10 gitlens|eam|15.4.0 EditorConfig|Edi|0.16.4 prettier-vscode|esb|11.0.0 vscode-drawio|hed|1.6.6 output-colorizer|IBM|0.1.2 mongodb-vscode|mon|1.8.1 vscode-scss|mrm|0.10.0 vscode-dotnet-runtime|ms-|2.1.5 data-workspace-vscode|ms-|0.5.0 mssql|ms-|1.24.0 sql-bindings-vscode|ms-|0.4.0 sql-database-projects-vscode|ms-|1.4.3 remote-wsl|ms-|0.88.2 vscode-typescript-next|ms-|5.7.20240904 angular-console|nrw|18.26.0 vscode-xml|red|0.27.2024082510 vscode-yaml|red|1.15.0 sonarlint-vscode|Son|4.10.0 code-spell-checker|str|3.0.1 vscode-stylelint|sty|1.4.0 win-ca|uko|3.5.1 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscodeintellicode-completions|Vis|2.0.0
fc-amiggi commented 3 weeks ago

I also have this issue, starting today, same commit version as reported above.

It appears to me that, instead of opening files inside of my WSL instance, code-insiders is now opening the file under Windows using the full path spec to get to the WSL file from Windows.

One obvious change is that, after opening code-insiders from my WSL command line with code-insiders ., when I then choose "Open File..." from the File menu, a Windows file dialog box opens up with the path to get to that directory from Windows. In earlier versions, a dialog box integrated into VSCode opened with the Linux path specified.

I just upgraded code-insiders while entering this, and it still has the same issue. Here's my current version info:

Version: 1.93.0 (user setup) Commit: 4849ca9bdf9666755eb463db297b69e5385090e3 Date: 2024-09-04T13:02:38.431Z Electron: 30.4.0 ElectronBuildId: 10073054 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22631

sanket-bhalerao commented 3 weeks ago

after installing the update today, i am not facing this issue.

@fc-amiggi can you also confirm this so i can close this issue.

fc-amiggi commented 3 weeks ago

@sanket-bhalerao Confirmed, it's fixed. The issue can be closed.

sanket-bhalerao commented 3 weeks ago

thank you. appreciate the quick fix from @vscode

jakebailey commented 2 weeks ago

I just updated to dc9412125d4e0a480593962ae2687e74e64af728 and code-insiders . is back to being broken :(

image

sanket-bhalerao commented 2 weeks ago

I am not getting this issue, i am currently on

Version: 1.94.0-insider Commit: 8b7eb51f54d7e1492d9baf70454ab6547a4ff9df Date: 2024-09-10T05:04:21.546Z Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code-Insiders/1.94.0-insider Chrome/124.0.6367.243 Electron/30.4.0 Safari/537.36

aeschli commented 2 weeks ago

I also no longer can reproduce with 8b7eb51f54d7e1492d9baf70454ab6547a4ff9df.

Please update to 8b7eb51f54d7e1492d9baf70454ab6547a4ff9df.

Version: 1.94.0-insider (user setup)
Commit: 8b7eb51f54d7e1492d9baf70454ab6547a4ff9df
Date: 2024-09-10T05:04:21.546Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22635
aeschli commented 2 weeks ago

Fixed by https://github.com/microsoft/vscode/pull/228044

sanket-bhalerao commented 2 weeks ago

the popup i got when i originally poste the issue was this image

i do have the window.dialogStyle set to custom image

the image posted by @jakebailey is a custom dialog or notification image

@aeschli is the native dialog i got in the original post a corner case find? or its been fixed or updated to a custom dialog as posted by @jakebailey ?

aeschli commented 2 weeks ago

@sanket-bhalerao The two dialogs are not the same. But both dialogs started to show due to the same bug: The code-insider . script: was no longer able to detect that code insiders was invoked out of a WSL terminal and opened a local VS Code Window instead of a WSL Window.

sanket-bhalerao commented 2 weeks ago

@aeschli , okay.

i am aware this is unrelated to the current issue, but shouldn't this dialog also be a custom instead of a native dialogue then? image

aeschli commented 2 weeks ago

No, the first dialog comes from a check that is done before we start the VS Code. We can only show native dialogs there.