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

Repair-WinGetPackageManager does not detect provisioned but not registered state #4603

Open
JohnMcPMS opened this issue Jul 1, 2024 · 1 comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. PowerShell Issue related to WinGet PowerShell Module or cmdlet

Comments

@JohnMcPMS
Copy link
Member

Brief description of your issue

Repair-WinGetPackageManager does not detect the state where the package has been provisioned for the machine but not registered for the user. This may lead to a failure if the provisioning step does an async registration that does not complete before we attempt to check for the registration side effects.

Detecting this state is complicated by the fact that there is no obvious way to use the PS commands to find a staged package without elevation. If we are running elevated, we can add -AllUsers to the existing check as a fix. If not, we either need to request changes to Get-AppxPackage or find another mechanism.

Steps to reproduce

Provision the package, then remove it for the user. Note that the repair state machine will detect this as "not installed" rather than "not registered".

Expected behavior

The repair state machine registers the package.

Actual behavior

The repair state machine determines "not installed", leading to unnecessary downloads or an error if the provisioning of the previous state didn't register for the user in time.

Environment

Latest PS module: 1.8.1791
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jul 1, 2024
@JohnMcPMS JohnMcPMS added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Jul 1, 2024
Copy link

github-actions bot commented Jul 1, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

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. Thank you!

Open similar issues:

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

@denelon denelon added the PowerShell Issue related to WinGet PowerShell Module or cmdlet label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. PowerShell Issue related to WinGet PowerShell Module or cmdlet
Projects
None yet
Development

No branches or pull requests

2 participants