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

Winget - The process has no package identity. At line:1 char:1 #1370

Closed
jlapchuk opened this issue Aug 14, 2021 · 22 comments
Closed

Winget - The process has no package identity. At line:1 char:1 #1370

jlapchuk opened this issue Aug 14, 2021 · 22 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@jlapchuk
Copy link

Brief description of your issue

When attempting to run winget in Powershell, I receive the following error:

ResourceUnavailable: Program 'winget.exe' failed to run: The process has no package identity.At line:1 char:1
+ winget
+ ~~~~~~.

Screenshot 2021-08-14 111603

Environment

[winget --info]
Windows Package Manager version: N/A
Windows: Windows.Desktop version: N/A
Package: Microsoft.DesktopAppInstaller version: 1.12.11692.0
@ghost ghost added the Needs-Triage Issue need to be triaged label Aug 14, 2021
@KevinLaMS KevinLaMS added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Aug 16, 2021
@KevinLaMS
Copy link
Contributor

@jlapchuk Would you mind filing a FeedBack hub issue? This will get us a logs. Initially it sounds like winget is not installed correctly.

@jlapchuk
Copy link
Author

Ok, I just submitted it through feedback hub. I've tried remove App Installer and reinstalling again, but that doesn't fix the issue.

@rbarbrow
Copy link

@jlapchuk have you updated the microsoft store that worked for me

@jlapchuk
Copy link
Author

Yeah, I tried that, even tried removing and reinstalling the Microsoft Store app using PowerShell, but still no luck.

@denelon
Copy link
Contributor

denelon commented Aug 19, 2021

@jlapchuk what version of App Installer do you have?

@jlapchuk
Copy link
Author

I have v1.12.11692.0 installed.

image

@denelon
Copy link
Contributor

denelon commented Aug 19, 2021

Do you have the App Execution Alias enabled?

@jlapchuk
Copy link
Author

Yeah, I checked that as well, turning it off/on again doesn't clear the error.

image

@denelon
Copy link
Contributor

denelon commented Aug 19, 2021

@Karl-WE I seem to remember you had some luck identifying scenarios where the package manager doesn't work. I hope I'm remembering correctly. Does this look familiar?

@jlapchuk what version of Windows is this running on?

@denelon
Copy link
Contributor

denelon commented Aug 19, 2021

@jlapchuk it could also be the path. #210

@jlapchuk
Copy link
Author

I'm running Windows 10 Enterprise 21H1 (OS Build 19043.1165)
I tried adding to the system's PATH variable, but that didn't work either.

image

image

@Karl-WE
Copy link
Contributor

Karl-WE commented Aug 19, 2021

@denelon thanks for asking. I does not look familiar to issues I have reported. eventually remote related to #640 ?

@jlapchuk can describe if you have installed the winget appx from github manually?
The user that executed the appx package is member of the administrators group of the machine?
Did you receive an UAC message on launching the appx?
Do you have more than one user on this machine?
Is it AD joined or AAD joined?

@jlapchuk
Copy link
Author

@Karl-WE I signed up for Windows Package Manager Insider program (http://aka.ms/winget-InsiderProgram). I ran the command in the email (ms-windows-store://pdp/?productid=9nblggh4nns1) and logged in to the Microsoft Store using the same account that received the invitation email.

The account I'm logged in as in Windows, is a local admin on the system, and UAC is enabled. The only other account on the system, is my secondary Admin account I use to manage other resources on our domain. The system is joined to my company's on-prem AD and not AAD joined.

@Karl-WE
Copy link
Contributor

Karl-WE commented Aug 19, 2021

Thanks for the quick reply. Despite it is still said enrollment to the insider program is not necessary. Please run the appx from winget github using an account that has local admin rights. winget might work correctly on this account.

Currently the usage on Windows device having more than one local user profile might give a bit of headache.

setup, Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle:

if you have any PowerShell or instances of Windows Terminal open including VSC or ISE please close them before running the msix.

Does it work now?

Mind that outside the Insider program you might need update the msix manually.

@jlapchuk
Copy link
Author

So, I should switch to logging in to Windows using my personal Microsoft account? Not using my company AD login, correct?

@denelon
Copy link
Contributor

denelon commented Aug 19, 2021

@jlapchuk If I'm understanding what @Karl-WE suggested, you need to make sure the account you're logged into Windows with is also a local administrator on the machine.

The only impact of an MSA account is related to which version the MSIX for the App Installer is going to be delivered from the Microsoft Store. If your MSA is logged into the Microsoft Store and it's part of the insiders program, then you will get the version with the Windows Package Manager. In either case, if you install the one from the GitHub Releases here it will have the Windows Package Manager. The version you reported above does indeed contain the Windows Package Manager. That's also why the App Execution Alias was available for you to toggle.

I'd really love to get to the bottom of this one. I've been having a very hard time reproducing this on my end to make sure we can fix it and write tests to ensure it doesn't get broken again. I'm not sure if it's an issue with the MSIX registration from the store, or if it has something to do with the accounts on the machine. MSIX packages get registered for the user that was logged into the machine, which is why I believe the local admin question came up. Hopefully this all gets cleared up when the App Installer including the Windows Package Manager is default for all Windows 10 (1809+) builds.

@Karl-WE
Copy link
Contributor

Karl-WE commented Aug 19, 2021

Yes

  1. login with your MSA first which has local admin rights.
  2. check the Store for updates (click on get updates). The store has a long standing issue that it might not download all pending updates.
  3. follow the instructions in the notes above (close everything PowerShell) install the appx from winget in the link above.
  4. open PowerShell with same account and user rights and again PowerShell with elevated rights via Win+X menu. In both Winget should be available.
  5. It might be missing on your domain account in this case repeat all steps. MSIX is a per user installation.

@jlapchuk
Copy link
Author

Gotcha. Yeah, the account I'm logged into Windows with (my AD login), is a local admin on the machine, and it's the account that installs the MSIX bundle I downloaded from the release page on Github. It's under this account where I get the errors referring to 'package identity.'

I'll try logging in to my system as my personal Microsoft account, and try reinstalling the MSIX bundle again that way.

@Karl-WE
Copy link
Contributor

Karl-WE commented Aug 19, 2021

@jlapchuk in this case try to follow Demetrius instructions first before following mine

@denelon
" I'm not sure if it's an issue with the MSIX registration from the store, or if it has something to do with the accounts on the machine. MSIX packages get registered for the user that was logged into the machine, which is why I believe the local admin question came up. Hopefully this all gets cleared up when the App Installer including the Windows Package Manager is default for all Windows 10 (1809+) builds."

I believe the problem is the store itself. As noted in different issue the Store has a lasting problem to update apps in the background. There are dozends of items in the feedback hub. I am still investigating if this is solved with Windows 11. But the issue on W10 exist since 1803 minimum.

@jlapchuk
Copy link
Author

I was able to resolve my issue and get winget running, though, I'm not exactly sure of root cause, I think it had something to do with permissions on the Microsoft.DesktopInstaller folders in C:\Program Files\WindowsApps. Everything looked OK, but I discovered whenever I tried to delete them, I'd get 'Access Denied', even though I'm a local admin on the system.

image

I was able to take full ownership by running TAKEOWN /R, but Windows still wouldn't allow me to delete. It wasn't until I ran PowerShell as local SYSTEM, psexec -s -i powershell.exe, that I was finally able to delete them. I then reinstalled Desktop App Installer from the appx package on the Releases page

Add-AppxPackage -Path "C:\Users\{Username}\Desktop\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"

And viola! :)

image

@Masamune3210
Copy link

Just a heads up, you aren't supposed to have r/w permissions on the WindowsApps folder or it's contents. It's managed by TrustedInstaller through the Windows Store and things like PowerShell or system settings app

@denelon
Copy link
Contributor

denelon commented Oct 1, 2021

We've flighted the latest 1.1 candidate: https://github.com/microsoft/winget-cli/releases/tag/v1.1.12653

We have also updated our troubleshooting guide.

I'm going to go ahead and close this issue since it appears this issue is resolved.

@denelon denelon closed this as completed Oct 1, 2021
@denelon denelon added this to the v1.2-Client milestone Oct 1, 2021
@denelon denelon added this to WinGet Oct 1, 2021
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.
Projects
Archived in project
Development

No branches or pull requests

6 participants