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

Can't view image files from Remote-WSL, nor via /mnt/c.., but can via Open > Show Local #116059

Closed
warwickgrigg opened this issue Feb 7, 2021 · 6 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@warwickgrigg
Copy link

Issue Type: Bug

File > Open File > Show Local > choose JPG file > Image displays successfuly

File > Open File > choose same image via /mnt/c/Users .... > "An error occurred while loading the image"

In terminal, cp < path to file via /mnt/c/...filename.jpg > .
In Vscode explorer, click on the file I just copied, then "An error occurred while loading the image"

I get this error on all image files via Remote-WSL2, almost always. Very occasionally I can open an image file via Remote-WSL2 and view it, but then later I get the error message when trying to view the same file.

VS Code version: Code 1.53.0 (8490d3d, 2021-02-03T20:36:38.611Z)
OS version: Windows_NT x64 10.0.19041
Remote OS version: Linux x64 4.19.104-microsoft-standard

System Info
Item Value
CPUs AMD Ryzen 5 PRO 3400G with Radeon Vega Graphics (8 x 3700)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 13.93GB (5.18GB free)
Process Argv --crash-reporter-id 68bb34ec-1256-4816-a714-25ac9b9d5490
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-20.04
OS Linux x64 4.19.104-microsoft-standard
CPUs AMD Ryzen 5 PRO 3400G with Radeon Vega Graphics (8 x 3699)
Memory (System) 10.85GB (8.34GB free)
VM 0%
Extensions (4)
Extension Author (truncated) Version
remote-wsl ms- 0.53.2
vscode-eslint dba 2.1.14
prettier-vscode esb 5.9.1
sass-indented syl 1.8.15
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspyt653:30253241
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30211401
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt600cf:30251589

@aeschli
Copy link
Contributor

aeschli commented Feb 9, 2021

It seems to work for my on my machine.
Can you paste the WSL Log here (Remote-WSL: Show Log...)

Does your machine have a proxy configured?

@aeschli aeschli added the info-needed Issue requires more information from poster label Feb 9, 2021
@warwickgrigg
Copy link
Author

I've pasted the WSL-Remote log below.

Yesterday I restarted VS Code to get the clean fresh WSL-Remote for this post. I didn't post the log because the problem went away, all day.

This morning I restarted VS Code and the problem returns. I've tried restarting VS code several times this morning and the problem persists.

No proxy server configured. Windows was set to automatically detect a proxy server. I've turned off the automatic detection to be sure.

Here is the log:

[2021-02-10 09:46:13.303] Resolving wsl+Ubuntu-20.04, resolveAttempt: 1
[2021-02-10 09:46:13.352] Starting VS Code Server inside WSL (Ubuntu-20.04)
[2021-02-10 09:46:13.353] Extension version: 0.53.3, Windows build: 19041. Multi distro support: available. WSL path support: enabled
[2021-02-10 09:46:13.353] No shell environment set or found for current distro.
[2021-02-10 09:46:13.479] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e sh -c "[ -d ~/.vscode-server/bin/5d424b828ada08e1eb9f95d6cb41120234ef57c7 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-02-10 09:46:13.646] Probing result: found
[2021-02-10 09:46:13.646] Server install found in WSL
[2021-02-10 09:46:13.647] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 5d424b8 stable .vscode-server 0 '}
[2021-02-10 09:46:13.791] Setting up server environment: Looking for /home/warwick/.vscode-server/server-env-setup. Not found.
[2021-02-10 09:46:13.791] WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2021-02-10 09:46:13.791] WSL2-shell-PID: 12
[2021-02-10 09:46:13.791] Starting server: /home/warwick/.vscode-server/bin/5d424b828ada08e1eb9f95d6cb41120234ef57c7/server.sh --port=0 --use-host-proxy --without-browser-env-var --enable-remote-auto-shutdown
[2021-02-10 09:46:14.092]
[2021-02-10 09:46:14.092]
[2021-02-10 09:46:14.092] *
[2021-02-10 09:46:14.092] * Visual Studio Code Server
[2021-02-10 09:46:14.092] *
[2021-02-10 09:46:14.092] * Reminder: You may only use this software with Visual Studio family products,
[2021-02-10 09:46:14.092] * as described in the license https://aka.ms/vscode-remote/license
[2021-02-10 09:46:14.092] *
[2021-02-10 09:46:14.092]
[2021-02-10 09:46:14.092] IP Address: 172.19.49.44
[2021-02-10 09:46:14.092] Extension host agent listening on 36863
[2021-02-10 09:46:14.092]
[2021-02-10 09:46:14.092] [09:46:15] Extension host agent started.
[2021-02-10 09:46:14.093] PortResolved: {"hostNames":["172.19.49.44"],"port":36863,"wslVersion":"4.19.104-microsoft-standard Ubuntu-20.04"}
[2021-02-10 09:46:14.093] WSL resolver response: ::1:36863
[2021-02-10 09:46:14.093] To debug connection issues, open a local browser on http://[::1]:36863/version

Thank you for your help with this. Let me know if there's anything more I can do to track down the problem.

@warwickgrigg
Copy link
Author

More info: I rebooted and restarted a couple of times this afternoon and at this moment I am able to view WSL2-Remote image files. The final 8 lines of the WSL-Remote log (especially the WSL resolver response) do look rather different to the one I posted this morning. Is it some ipv4 vs ipv6 issue? Here is the current log, in which I can view images:

[2021-02-10 14:08:19.593] Resolving wsl+Ubuntu-20.04, resolveAttempt: 1
[2021-02-10 14:08:19.638] Starting VS Code Server inside WSL (Ubuntu-20.04)
[2021-02-10 14:08:19.638] Extension version: 0.53.4, Windows build: 19041. Multi distro support: available. WSL path support: enabled
[2021-02-10 14:08:19.639] No shell environment set or found for current distro.
[2021-02-10 14:08:19.766] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e sh -c "[ -d ~/.vscode-server/bin/5d424b828ada08e1eb9f95d6cb41120234ef57c7 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-02-10 14:08:19.852] Probing result: found
[2021-02-10 14:08:19.852] Server install found in WSL
[2021-02-10 14:08:19.853] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 5d424b8 stable .vscode-server 0 '}
[2021-02-10 14:08:20.072] Setting up server environment: Looking for /home/warwick/.vscode-server/server-env-setup. Not found.
[2021-02-10 14:08:20.072] WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2021-02-10 14:08:20.072] WSL2-shell-PID: 610
[2021-02-10 14:08:20.072] Starting server: /home/warwick/.vscode-server/bin/5d424b828ada08e1eb9f95d6cb41120234ef57c7/server.sh --port=0 --use-host-proxy --without-browser-env-var --enable-remote-auto-shutdown
[2021-02-10 14:08:20.072]
[2021-02-10 14:08:20.072]
[2021-02-10 14:08:20.072] *
[2021-02-10 14:08:20.072] * Visual Studio Code Server
[2021-02-10 14:08:20.072] *
[2021-02-10 14:08:20.072] * Reminder: You may only use this software with Visual Studio family products,
[2021-02-10 14:08:20.072] * as described in the license https://aka.ms/vscode-remote/license
[2021-02-10 14:08:20.072] *
[2021-02-10 14:08:20.072]
[2021-02-10 14:08:20.072] IP Address: 192.168.254.49
[2021-02-10 14:08:20.072] Extension host agent listening on 40393
[2021-02-10 14:08:20.072]
[2021-02-10 14:08:20.072] [14:08:19] Extension host agent started.
[2021-02-10 14:08:20.075] Pinging 192.168.254.49:40393...
[2021-02-10 14:08:20.118] 192.168.254.49:40393 responded
[2021-02-10 14:08:20.119] WSL resolver response: 192.168.254.49:40393
[2021-02-10 14:08:20.119] To debug connection issues, open a local browser on http://192.168.254.49:40393/version

@aeschli
Copy link
Contributor

aeschli commented Feb 11, 2021

The change of behavior were caused by new versions of the Remote-WSL extension. There are two ways of how to connect to the server running in the WSL distro:
It seems when we connect with the remote IP (192.168.254.49) the image shows, if we use localhost (::1) it doesn't

To reproduce the issue, there's a setting in the wsl extension "remote.WSL.server.connectThroughLocalhost": true to force the usage of localhost.

However, on my machine I see the image either way, localhost or IP.

@mjbvz You wrote the image viewer. Any tips how we can debug this further?

@aeschli aeschli assigned mjbvz and unassigned aeschli Feb 11, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 11, 2021

Does this reproduce in the latest VS Code insiders build? This seems like a potential duplicate of #105536

@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants
@aeschli @mjbvz @warwickgrigg and others