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

run-detectors: unable to find an interpreter for /mnt/c/Program Files/Microsoft VS Code/Code.exe #635

Open
doggy8088 opened this issue Sep 19, 2020 · 8 comments
Assignees

Comments

@doggy8088
Copy link

doggy8088 commented Sep 19, 2020

Describe the bug

During using Pengwin Linux a while (few months). I can't open Windows app from Pengwin Linux in WSL now.

To Reproduce
Steps to reproduce the behavior:

  1. Open WSL 2 (Pengwin Linux)

  2. cd ~

  3. code .

  4. See error

    $ code .
    run-detectors: unable to find an interpreter for /mnt/c/Program Files/Microsoft VS Code/Code.exe

Expected behavior

Download VSCode server and open VSCode with Remote - WSL2 extension in Windows.

Screenshots

image

Additional context

I can fix this problem by using the following update-binfmts command that I found here.

sudo update-binfmts --disable cli

It takes me a while to find this workaround. I don't know why this problem happening. Is it avoidable?

Basic Troubleshooting Checklist

[x] I have searched Google for the error message.
[x] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled.
[x] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues.
[x] I have searched the Pengwin issues page: https://github.com/WhitewaterFoundry/Pengwin/issues.
[x] I have reset Pengwin: Settings->Apps->Apps & features->Pengwin->Advanced Options->Reset.
[x] I have disabled and re-enabled WSL in Windows Features.
[x] I have run Windows 10 updates and restarted.

What other troubleshooting have you attempted?

Insert here:

Pengwin Version

Find: Settings->Apps->Apps & features->Pengwin->Advanced Options->Version.

Insert here: 20.8.3.0

Windows Build

Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here:

OS Name:                   Microsoft Windows 10 Professional
OS Version:                10.0.19041 N/A Build 19041
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
BIOS Version:              American Megatrends Inc. 0401, 2018/8/31

For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number

@crramirez crramirez self-assigned this Sep 19, 2020
@juliosegarra
Copy link

@doggy8088

Try running wsl --shutdown on powershell then starting WSL2 again.

I did this and I think it's what fixed it for me.

Try just this first, but my exact steps were deleting my .vscode-server folder, running wsl --shutdown in powershell, doing a sudo apt-get update && sudo apt-get upgrade, then running code . inside a WSL2 project folder again.

After this it re-installed/set up my vscode-server; I of course then had to reinstall all my extension on WSL side.

Hope this helps,
Julio

@jan6055
Copy link

jan6055 commented Jun 19, 2022

it is so useful, thank you

@j1nxxn1j
Copy link

It should be caused by the conflict with systemd.

Please check the file /etc/wsl.conf and see if the systemd = true flag was added under [boot] settings as shown below. If so, please switch it to false.

Snipaste_2023-01-12_11-45-09

For more info, please refer to https://learn.microsoft.com/en-us/windows/wsl/wsl-config#per-distribution-configuration-options-with-wslconf

@p1-ra
Copy link

p1-ra commented Mar 27, 2023

Disabling systemd boot worked for me.
Not sure what happens, prior of updating WSL2 everything was going smoothly with systemd usage,

@crramirez
Copy link
Collaborator

Before disabling SystemD give it a try to wsl --shutdown or even reboot the PC. This error happens because sometimes the Interop get disconnected. This issue is worse with the Store version of WSL.

@japita-se
Copy link

me too, the problem was with systemd=true

@crramirez
Copy link
Collaborator

Hello,

I have been doing exhaustive testing and I can corroborate the behavior. The good thing is that is happening with every distro so, Microsoft will fix it soon.

Meanwhile, I'll find a workaround

@crramirez crramirez reopened this Mar 29, 2023
@crramirez
Copy link
Collaborator

We made a change in pengwin-base to minimize this impact can you make a test?

pengwin-setup update

Then activate SystemD and terminate Pengwin.

See if now exes can be executed

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants