-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 export
failing with Element not found
error
#4545
Comments
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! Closed similar issues:
|
Can you try running the export command outside of DSC? I'm almost certain this is an issue caused by WinGet being run in system context, so knowing if it works outside of a DSC script will help determine the root cause |
@Trenly it runs fine outside of DSC on the same machine. This same DSC config is working well on 350+ other machines, so running winget in system context is working well elsewhere. I can re-image the machine and likely resolve the issue for us, but I wanted to keep it around in case there is additional data that could be useful in getting to a root cause. |
Any updates on action we can take here to continue the investigation? This has started occurring on more machines after they are working fine for some time (weeks). Our only mitigation at this point is to reimage them, after which |
Is this still happening with WinGet 1.8? |
@denelon we have not run into this since upgrading to |
I have two systems, deployed with the same OS and tools. One is failing unless I run as the user, if I run as 'system' i get an error. The other works fine. I checked the local security policy, couldn't find any differences. Same AV etc... The only potential difference, is one has HyperV instaleld right now.
System 2 -
|
Brief description of your issue
We are using WinGet to install applications machine wide with Powershell DSC, and one of the test scripts is failing during the execution of
winget export
with this error:This is not a widespread issue and has only happened on one machine at this point, but it does reproduce 100% of the time on this machine. Note that winget is running under SYSTEM context.
Steps to reproduce
DSC runs (under SYSTEM context)
winget.exe export --include-versions --no-vt --accept-source-agreements --disable-interactivity --output exportedApps.json
during the test portion of a script resource, and that always fails with anElement not found
error.Expected behavior
The current list of installed applications is written to
exportedApps.json
Actual behavior
The export fails and no file is written.
Environment
The text was updated successfully, but these errors were encountered: