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

Failed to remove the MSIX package #11665

Closed
1 of 2 tasks
Morrigan-Ship opened this issue Jun 6, 2024 · 14 comments
Closed
1 of 2 tasks

Failed to remove the MSIX package #11665

Morrigan-Ship opened this issue Jun 6, 2024 · 14 comments

Comments

@Morrigan-Ship
Copy link

Morrigan-Ship commented Jun 6, 2024

Windows Version

26217

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Distro Version

ubuntu

Actual Behavior

WSL also cannot be started
and cannot be reinstalled

when try to reinstall wsl via wsl releases in github
i downloaded x64 msi version 2.2.4

Failed to remove the MSIX package (error: The deployment operation was blocked because Special profile deployment is not allowed. Please try logging into an account that is not a Special profile. You can try logging out and logging back into the current account, or try logging into a different account. ).
image

Copy link

github-actions bot commented Jun 6, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Morrigan-Ship
Copy link
Author

WslLogs-2024-06-06_19-38-08.zip
This is log file of WSL

Copy link

github-actions bot commented Jun 6, 2024

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
Detected appx version: 2.2.4.0
Found no WSL traces in the logs

@Morrigan-Ship
Copy link
Author

The log file doesn't contain any WSL traces

:/

@OneBlue
Copy link
Collaborator

OneBlue commented Jun 6, 2024

Thank you @Morrigan-Ship. Just to double check, do you see the same issue with the 2.1.5 MSI ?

Also, which type of Windows user account are you using for this ?

@Morrigan-Ship
Copy link
Author

Morrigan-Ship commented Jun 6, 2024

Also, which type of Windows user account are you using for this

no its normal and default profile windows

I researched this issue and found that Windows in the background has changed my Windows user type from local to temporary for reasons I don't know.
This happened automatically by Windows
And this incident caused all uwp programs to crash
The solution should probably be changed from the registry from this path under the values ​​of flags, state

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

I tested it and it didn't work, but there are several types of user profiles in Windows:
temporary profile
special profile
roaming profile
mandatory profile
system profile that can be set via flags in the registry
Default User Profile

you can search:
https://www.google.com/search?q=windows+problem+%22special+profile%22+temporary

also you can read this topic feedback that i was created, and microsoft never fixed it :/

https://feedbackportal.microsoft.com/feedback/idea/b32e1a59-4015-ef11-989a-6045bd796e5a

system properties > Advanced > User Profiles > when i click on User Profiles button it will take many time to start new windows form about it and when it open:
User Status is: Temporary
image

Another evidence that proves that I am right is this:

@Morrigan-Ship
Copy link
Author

Just to double check, do you see the same issue with the 2.1.5 MSI

same error

@zcobol
Copy link

zcobol commented Jun 7, 2024

@Morrigan-Ship in an elevated shell run Remove-AppxPackage --AllUsers --Package your_package_name and force uninstalling the MSIX for all users.

@Morrigan-Ship
Copy link
Author

Morrigan-Ship commented Jun 7, 2024

Remove-AppxPackage --AllUsers --Package your_package_name

command runned as Administrator:
Remove-AppxPackage -AllUsers -Package MicrosoftCorporationII.WindowsSubsystemForLinux_2.2.4.0_x64__8wekyb3d8bbwe

error:

Remove-AppxPackage : The deployment operation was blocked because Special profile deployment is not allowed. Please try logging into an account that is not a Special profile. You can try
logging out and logging back into the current account, or try logging into a different account.
The package deployment operation is blocked by the "Allow deployment operations in special profiles" policy.
At line:1 char:1
 Remove-AppxPackage -AllUsers -Package MicrosoftCorporationII.WindowsS ...
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-AppxPackage], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

@Morrigan-Ship
Copy link
Author

wsl wslinfo --wsl-version
The specified user does not have a valid profile.

@elsaco
Copy link

elsaco commented Jun 7, 2024

Open the Group Policy editor (gpedit.msc) and check Allow deployment in special profiles setting:

gpedit_appx_info

@Morrigan-Ship
Copy link
Author

Open the Group Policy editor (gpedit.msc) and check Allow deployment in special profiles setting:

not fixed !
i was report this problem last month to microsoft.
its windows core problem.

@johannesprinz
Copy link

Workaround:
Run your commands from a Command Prompt or Windows PowerShell terminal. For me wsl --uninstall Ubuntu-24.04 was failing from a PowerShell Core terminal but works from the other two. I got the hint of the issue when adding the --force flag which lead me to this post and thank you @Morrigan-Ship on your comment. Made me try the same command from another shell. Defo a PowerShell core issue!.

@Morrigan-Ship
Copy link
Author

Workaround:
Run your commands from a Command Prompt or Windows PowerShell terminal

its not related to WSL
this problem is 'Windows User State'
its special temporary problem its a bug that changed my user state
i changed my password and restart and fixed

when user in special mode or temporary mode or state no uwp apps will not work even Settings.
WSL is an UWP app

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

5 participants