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

Windows Store installed Ubuntu fails to launch - Invalid parameter (french canadian) #2577

Open
domtoupin opened this issue Oct 19, 2017 · 55 comments

Comments

@domtoupin
Copy link

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [version 10.0.16299.19]

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

I just installed the Windows 10 Fall Creator Update and I was thrilled at the fact that I could install Ubuntu.

However, all my attempts resulted in the following error:
From the UI (attempt to launch from Windows Store, I simply Ctrl-C, Ctrl-V the Dialog box here)

[Window Title]
C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc\ubuntu.exe

[Content]
C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc\ubuntu.exe

Paramètre incorrect.


[OK]

Power Shell (both as regular user and as administrator)

PS C:\WINDOWS\system32> ubuntu install
Le programme « ubuntu.exe » n’a pas pu s’exécuter : Paramètre incorrectAu caractère Ligne:1 : 1
+ ubuntu install
+ ~~~~~~~~~~~~~~.
Au caractère Ligne:1 : 1
+ ubuntu install
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

(Sorry for the french...)

What I did was this:

  • Installed Ubuntu from the Windows Store and then realized I also need "Windows Subsystem for Linux"
  • Installed "Windows Subsystem for Linux" using PowerShell: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Restarted my PC
  • Attempted to start Ubuntu both from Windows Store and PowerShell (ubuntu) -> Failed
  • Uninstalled Ubuntu (right-click on Ubuntu in Start Menu -> Uninstall)
  • Reinstalled Ubuntu from Windows Store
  • Once more attempted to start Ubuntu both from Windows Store and PowerShell (ubuntu) -> Failed
  • Uninstalled Ubuntu (right-click on Ubuntu in Start Menu -> Uninstall)
  • Disabled "Windows Subsystem for Linux" using PowerShell: Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Restarted my PC
  • Reinstalled "Windows Subsystem for Linux" using PowerShell: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Restarted my PC
  • Reinstalled Ubuntu from Windows Store
  • Once more attempted to start Ubuntu both from Windows Store and PowerShell (ubuntu) -> Failed
  • Ran http://aka.ms/diag_apps10 and fixed a potential cache issue
  • Once more attempted to start Ubuntu both from Windows Store and PowerShell (ubuntu) -> Failed
  • Uninstalled Ubuntu (right-click on Ubuntu in Start Menu -> Uninstall)
  • Reinstalled Ubuntu from Windows Store
  • Once more attempted to start Ubuntu both from Windows Store and PowerShell (ubuntu) -> Failed

I am now out ouf ideas...

@onomatopellan
Copy link

onomatopellan commented Oct 22, 2017

Your user profile could be damaged. I'd try to create a new user account with admin rights and after enabling WSL install Ubuntu from the store.

@zadjii-msft
Copy link
Member

Are you trying ubuntu install or just ubuntu? I don't think it will install on the ubuntu install case, IIRC it just wants to be launched without any params.

@mdentremont
Copy link

mdentremont commented Oct 24, 2017

I received the same thing - I tried executing the ubuntu.exe directly (C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc\ubuntu.exe) in an administrator cmd prompt, but it failed with "access denied"

I've also tried:

  • Clearing TMP
  • Manually deleting the %localappdata%\Lxss folder
  • Running lxrun /install followed by lxrun /uninstall /force

@kakalos12
Copy link

Same problem here.

@mdentremont
Copy link

mdentremont commented Nov 6, 2017

@zadjii-msft I was trying ubuntu, but I also am unable to start the ubuntu prompt by clicking the ubuntu icon in the start menu:

capture

@onomatopellan
Copy link

@mdentremont Can you try the other way to install a distro? Follow these steps:

  • Uninstall Ubuntu with right click on the Ubuntu start menu icon -> Uninstall.

  • Download Ubuntu appx from https://aka.ms/wsl-ubuntu-1604

  • Double click on the appx file to install Ubuntu manually.

If that works then there is a problem with the Windows Store.

@oaksboard
Copy link

hello @onomatopellan,

sorry, but that didn't work for me.

nb: this is not only an issue with ubuntu. the same happens with openSUSE, too.

what i tried so far:
nb: i already had "bash on ubuntu on windows" working on 1703

first attempt

  • while still on 1703: uninstalled "bash on ubuntu on windows" and"windows subsystem for linux" and disabled developer mode.
  • installed 1709 update
  • installed ubuntu app
  • error "the parameter is incorrect"
  • realized, that subsystem is necessary
  • installed subsystem (had to purge c:\windows\system32\lxss folder in order to be able to reinstall)
  • error "the parameter is incorrect"
  • various attempts to uninstall/reinstall ubuntu and subsystem in correct order, no success

restored windows to 1703 from bare metal backup
second attempt

  • left everything untouched and installed 1709 update
  • installed ubuntu app
  • error "the parameter is incorrect"
  • installed opensuse app
  • error "the parameter is incorrect"

bye, oskar

@rohatsu
Copy link

rohatsu commented Nov 15, 2017

Same problem, found "a" workaround:

  • copy contents of C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc to another directory (I copied to C:\Ubuntu); Windows Explorer didn't let me browse this directory so I used Total Commander (Run As Administrator) to access it and copy
  • start ubuntu.exe from the new location and it should install
  • use ubuntu.exe from the new location going forward to start up bash etc.

@foxx1337
Copy link

foxx1337 commented Nov 23, 2017

@rohatsu - this worked for me too. I had an unrelated error when trying to run ubuntu.exe for the first time. So simple, yet so effect, thank you!

L.E. The problem with this (and I think it's not even a problem) is the fact that the root filesystem gets created under the new directory instead of AppData\Local\Packages.
My error was #2323.

@domtoupin
Copy link
Author

@rohatsu - I confirm that your work around also works for me; many many thanks!

@mdentremont
Copy link

mdentremont commented Dec 11, 2017

@zadjii-msft this is still an issue for many users (without the workaround of course) - just want to make sure it doesn't fall through the cracks

@zadjii-msft
Copy link
Member

@mdentremont Don't worry, it's still on the radar, even though I apparently forgot to mark it as a bug. My bad. It is on the radar though :)

@oliverhanappi
Copy link

Any progress on this?

@oaksboard
Copy link

oaksboard commented Jan 19, 2018 via email

@zhaixuepan
Copy link

I also encountered the same error

@oaksboard
Copy link

installed 1803 last night. same "the parameter is incorrect" as before (with debian, too)

@eyeonpower
Copy link

What's the status on this? The old product on 1703 worked. On 1709 , I got "the parameter is incorrect". Now on 1803, I get the same message "the parameter is incorrect". Please someone!

@mdentremont
Copy link

@zadjii-msft Still broken on latest April 2018 update. Should it have been fixed here? Is there anything I should be doing to clear caches, etc?

@zadjii-msft
Copy link
Member

@benhillis owns the launcher code now, maybe he has a better idea

@Biswa96
Copy link

Biswa96 commented Jun 11, 2018

Does that problem happen for all WSL Windows Store app?

@mdentremont
Copy link

@Biswa96 I just tried openSuse and got the same dialog
image

@benhillis
Copy link
Member

Since you are seeing this as a error dialog I feel this is likely a store issue and unrelated to WSL, however we could quickly confirm that by a trace.

Could somebody who is experiencing this issue please collect a trace while attempting to launch?

https://github.com/Microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs

@mdentremont
Copy link

@benhillis
Copy link
Member

@mdentremont - Thanks for sharing the traces. As I feared there are no events coming from our components so I suspect something else in Windows is causing this failure. Are there any interesting events in your event log around when this error occurs?

@mdentremont
Copy link

@benhillis I've browsed around and couldn't see anything - do you know of a custom event filter which might catch anything relevant?

@benhillis
Copy link
Member

benhillis commented Jun 14, 2018

@mdentremont - Sorry none that I know of. You might be able to track down where the error is coming from by using ProcMon.

@zhaixuepan
Copy link

Is it because of domain control users?
After I reinstalled the system, I did not use domain controllers , I did not report this error again.

@leapwill
Copy link

leapwill commented Jun 18, 2018

I have most of my files on a secondary drive with SYMLINKD's on the system drive. I just moved my AppData\Local folder back onto the system drive. Now I can launch kali or ubuntu from the command line or Start Menu, but launching bash still gives Error: 0x80070003.

Edit: I had copied the folder of the WindowsApps to another location as a workaround. Now that I've removed it, all methods of launching are giving the same error code. I was part of the WSL beta, but I have run lxrun /uninstall /full from an elevated prompt. I just entirely disabled the WSL optional feature, rebooted, and started over. Still getting the same error.

@harakka
Copy link

harakka commented Jun 18, 2018

It's not just a domain issue, also happens with local users.

I had a local profile with this issue, and a while back tracked it down with ProcMon to some Windows History folder (IIRC the folder name also referred IE) somewhere in AppData. Unfortunately I was in a hurry and didn't take notes.

I couldn't tell exactly what was going wrong with the folder, but deleting the folder manually fixed the issue. It seems to be a more general Store/Windows issue as suggested above and not specific to WSL, even though WSL installs happen to trigger it.

@mdentremont
Copy link

@benhillis This has happened to everybody in my office - we all were part of the "bash for windows" beta, which was before the Windows 10 Fall Creators update. Once we installed the fall creators update which I believe added support for installing linux ditros through the store, none of the available distros worked.

I'd venture a guess that pretty much everyone in this thread is experiencing the same issue. Do you think it would be possible for you to test this out on your end? As I mentioned, this is an issue on the 2 other developer laptops in my office, so it will hopefully be easy to reproduce.

@benhillis
Copy link
Member

@mdentremon - I use WSL every day and have never hit this issue. This is likely something configuration-related. Do other store apps work on these machines?

@akadooie
Copy link

The workaround @rohatsu described works for me as well (thanks mate!).

I have multiple store apps installed and none of them give any issues, it's only the Ubuntu Windows Store App. Other distro's like Kali Linux or openSUSE give the same error.

I found the following error in the event viewer:
0x80070057: Cannot create the process for package CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.427.0_x64__79rhkp1fndgsc because an error was encountered while configuring runtime.
[LaunchProcess]

@mdentremont
Copy link

mdentremont commented Jun 19, 2018

@benhillis Other store apps work for us. Were you using WSL back when it was in beta and not available through the Windows store? And then after updating to the Fall Creators update, the store Ubuntu app worked fine despite still having the old WSL installed?

@mdentremont
Copy link

@benhillis Update: I tried installing Slack through the Windows store today and the issue is present for it as well, so this likely isn't a WSL issue.

@eyeonpower
Copy link

I found that it may not be a WSL issue also. It is a Windows Store issue. The only solutions that seems to work for people are drastic. Create new windows store user or reinstalling Windows are some of the things that do work. I guess i won't be using any windows store programs from now on.

@aksm
Copy link

aksm commented Sep 25, 2018

Same problem as described by others above. In addition to the workaround by @rohatsu running bash from command prompt also works.

@mdentremont
Copy link

Works as of the latest Windows October update (1809)!

@oaksboard
Copy link

i can confirm that it works with the latest windows 10 update (1809)

@mkanet
Copy link

mkanet commented Jun 21, 2019

Pretty lame. Same issue here. I dont understand why Microsoft doesnt fix issues like this after so many people report it.

PS: Copying the folder to another place on my file system (and executing the Ubuntu executable elevated) fixed the issue for me.

Screenshot

@ducttapecoder-vt
Copy link

@benhillis Do you have a communication channel to the Windows Store team? I can confirm the issue is still present with Windows 10 1903. Two years seems like an awfully long time for this bug to persist.

@juliusdedekind
Copy link

Ridiculous that this is still a problem and a horrendous first-time user experience. Easier to just download VirtualBox than to DO ANY of this CRAP

@yhliyr
Copy link

yhliyr commented Dec 20, 2019

thanks @rohatsu, it works for me too.

i just execute wrong command(like mv /* /xx) on ubuntu, then everything is gone.

so i restarted reinstall everything, the result is the error code: WslRegisterDistribution error 0x80370102 when openning wsl ubuntu

@gjb2048
Copy link

gjb2048 commented Jan 28, 2020

Still getting this:

Annotation 2020-01-28 125154

@rohatsu's solution works for me and the advantage is that Ubuntu is running on the HD instead of the SSD so less wear on it.

@mayankshukla91
Copy link

Same problem, found "a" workaround:

  • copy contents of C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc to another directory (I copied to C:\Ubuntu); Windows Explorer didn't let me browse this directory so I used Total Commander (Run As Administrator) to access it and copy
  • start ubuntu.exe from the new location and it should install
  • use ubuntu.exe from the new location going forward to start up bash etc.

unfortunately this didnt resolve the issue. I am still getting

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.
Press any key to continue...

@lr154lrose
Copy link

lr154lrose commented Jun 30, 2020

This is an actual problem with the Microsoft Store. I was getting the same error while trying to launch Ubuntu and this is what worked for me:

  1. Troubleshoot + restart Microsoft Store.
    https://www.tenforums.com/tutorials/45437-run-windows-store-apps-troubleshooter-windows-10-a.html

  2. At this point, I was getting the following error in the terminal: "WslRegisterDistribution failed with error: 0x8007019e
    The Windows Subsystem for Linux optional component is not enabled. Please enable it and try again.
    "

  3. This can be solved by turning on the developer mode and turning on the Windows Subsystem for Linux feature, these steps are explained here: https://answers.microsoft.com/en-us/insider/forum/all/how-to-enable-the-windows-subsystem-for-linux/16e8f2e8-4a6a-4325-a89a-fd28c7841775?auth=1

As I said, this worked fine for me and it got rid of the error. Let me know if it's any help.

Edit: It's been one day and the error is back. The steps I followed yesterday don't seem to work anymore.

@krehwell
Copy link

krehwell commented Jul 3, 2020

I found a solution how to fix this, following the tips by @rohatsu .
this happened to me because my windows store is broken, so what I did is I downloaded WSL(ubuntu) manually from this link this. After I installed it, it occurs the error like the description of the problem, and I follow the guides form @rohatsu has mentioned. however, I couldn't see the directory of the Ubuntu which has been installed since I cannot access C:\Program Files\WindowsApps\ folder.

so what I did is, first I make my PC current user as administrator to get the ownership of files which is private, I followed step no.2 on this website to get it website.
after I am getting the ownership of the administrator to my local user (pc user), now I can open C:\Program Files\WindowsApps\ folder. from there I copied the content inside the Ubuntu folder (in my case its name is CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc) and paste it on C:\Ubuntu which is the folder I made it myself, and run the .exe from there and somehow it works.

@juliusdedekind
Copy link

juliusdedekind commented Jul 3, 2020 via email

@krehwell
Copy link

krehwell commented Jul 6, 2020 via email

@mkanet
Copy link

mkanet commented Jul 6, 2020

you might want to try it again following the instructions slowly, and you will get it. the idea is simple, what you just need to do is accessing the installation folder of wsl and move it else where. and open it from the new directory of wsl. at least it works for me, would be glad if I could help

Yes this definitely works. I was never able to repair the permissions issue with the original 'WindowsApps' hidden folder though; even when setting permissions for EVERYONE to have access to the folder.

@439bananas
Copy link

Can reproduce for Debian as well. ^^

@Bary
Copy link

Bary commented Aug 6, 2020

I did a shortcut on my desktop of ubuntu.exe file from problematic path and no problem. Runing it from Start menu is still the problem.

@Natfan
Copy link

Natfan commented Aug 19, 2021

I feel like it's pretty clear that the issue here is spaces within the ubuntuXXXX.exe path.

On my machine, the program installs to C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuXX.XXonWindows_XXXX.XXXX.XXX.X_x64\ubuntuXXXX.exe

When running the ubuntuXXXX.exe from that location, I received the same error as everyone else in this thread: The parameter is incorrect.

When moving the folder to C:\ubuntu instead, the program successfully installs and runs:

nat@pc:~pwsh> C:\ubuntu\ubuntu2004.exe
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: nat
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
...
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 4.4.0-18362-Microsoft x86_64)
...
nat@pc:~$

There is clearly an issue with how the package deals with spaces within it's path. I would recommend either properly quoting the string as it is passed around the application, or ensuring that all spaces are preceded with the escape character to resolve this issue.

@omesur
Copy link

omesur commented Sep 21, 2021

I followed the steps (manual installation steps) on this site and solved the problem:
https://docs.microsoft.com/en-us/windows/wsl/install-win10

@ghost
Copy link

ghost commented Nov 11, 2023

Is there any fix for this now? Can anyone give some solid advice and guidelines how to overcome it?

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

No branches or pull requests