Closed iqbalrazi03 closed 8 months ago
Hello,
How did you install WingetUI? Which Windows version are you using?
Hi, I'm currently using Windows 11 Home version 22621.2715 . I install WingetUI through the installer.
I will study this
Hi, I have the same issue, but probably because of totally different root cause.
Would it help to check for the return code of winget.exe and/or print it into the logfile? Hopefully I am looking at the correct section of the code: def getSources(self) in winget.py ?
I have the situation that C:\Program Files\WingetUI\wingetui\PackageEngine/Managers\winget-cli_x64\winget.exe stopped working for a non-admin user. If I open command window as non-admin I get zero output and the following return code: C:>"C:\Program Files\WingetUI\wingetui\PackageEngine/Managers\winget-cli_x64\winget.exe" C:>echo %errorlevel% -1978335231
According to https://github.com/microsoft/winget-cli/blob/master/doc/windows/package-manager/winget/returnCodes.md it means APPINSTALLER_CLI_ERROR_INTERNAL_ERROR Internal Error
Please do. Thanks!
Will do
Additional information :-
I installed Chocolatey as a backup option to use in WingetUI, but the results are as same as using winget. On the other side, I tried using the command-line version of it, and it came out fine. The issue is the same as the winget problem that I mentioned above.
Although this somehow is a me-too posting, I observe the exact same behaviour as in the comment of HarryLime1120 above, I have the same $LASTEXITCODE in Powershell. Winget (2.2.0) worked in the beginning and did its updates but somehow lost it along the way. Initially, I didn't have the Windows-winget.exe installed (only the winget that ships with WingetUI) but installed the MS msixbundle when things were broken (hoping that it would fix it, which it didn't). I then even replaced the winget.exe in the WingetUI subfolder with the one that comes from Windows but that didn't change anything (but the files were not bitidentical beforehand). Starting the WingetUI-winget.exe as administrator in the command line works as well as starting WingetUI as administrator.
What is puzzling is, that starting the Windows-winget.exe as non-administrator does work and shows an update list but WingetUI (as non-administrator) does not show that update list I can see in the command line even with the experimental setting "use Windows winget" activated! I also disabled all other sources (Scoop, Choco etc.) but it didn't help.
I downgraded from 2.2.0 to 2.1.1 but that also didn't change anything. Using 2.2.0 seemingly broke something very fundamental.
Reinstalling the official Windows-winget msixbundle did not help either. Several reinstalls of WingetUI didn't change anything and all "reset settings" options within WingetUI didn't change the behaviour.
So the root causes are that the wingetUI-winget.exe as non-admin always returns with error and that wingetUI seems unable to properly connect to the Windows-winget.exe to obtain its update list from there. Neither WingetUI 2.2.0 nor 2.2.1 show an update list as non-administrator (no matter if using Windows-winget or WingetUI-winget).
there is a problem with the path used by WingetUI the correct path for Winget executable is "C:\Program Files\WingetUI\PackageManagers\winget-cli_x64\winget.exe", but this is the error I get: Strangely the path for Winget executable that is shown on the GUI is "C:\Program Files\WingetUI\wingetui\PackageEngine\Managers\winget-cli_x64\winget.exe" So it appears I have two Winget executables from WingetUI somehow
Winget-cli folders were moved but changes were not reflexted on the reset sources script.
Hi. Sorry to bother. Is there any updates on my issue? Not that I force you investigating my problem though. Thanks.
Please try this solution: https://github.com/marticliment/WingetUI/issues/1721
done. it's working now. thanks
I found damaged databases also in these additional (similar) folders:
C:\Users\<ADMIN-USER>\AppData\Local\Temp\WinGet\defaultState\
C:\Users\<NON-ADMIN-USER>\AppData\Local\Temp\WinGet\defaultState\
Deleting the second one from the non-admin user seems to have fixed it now for me. I will keep investigating, but the first look is very promising. Maybe HarryLime1120 can also check if it works for him?
Perfect!
The same fix works also on the Win11 machine! So watch out for the TEMP folder.
Perfect!
thanks a lot man! now I can rest easy
I can rest now too, I genuinely did not understand what was happening.
I probably had killed WingetUI via the task manager at some point and the remaining temp files created the problems.
forgot to mention before, my command prompt at that time are kinda broken, so maybe it was one of the factors.
@iqbalrazi03 It was not entirely clear to me, but is your problem now also fixed by the deletion of the temp folder?
@iqbalrazi03 It was not entirely clear to me, but is your problem now also fixed by the deletion of the temp folder?
yeah. don't know what happened, it just works.
I think then you can close this issue also @marticliment 💪 😄 👍
I found damaged databases also in these additional (similar) folders:
C:\Users\<ADMIN-USER>\AppData\Local\Temp\WinGet\defaultState\
C:\Users\<NON-ADMIN-USER>\AppData\Local\Temp\WinGet\defaultState\
Deleting the second one from the non-admin user seems to have fixed it now for me. I will keep investigating, but the first look is very promising. Maybe HarryLime1120 can also check if it works for him?
Hi @llvs, thanks for considering my situation! It did not work for me. In the end I deleted defaultState Directory both non-admin and admin, then \AppData\Local\Temp\WinGet\ both non-admin and admin.
But not a problem. I am currently running WingetUI from python source with a mod for german OS and WingetUI in experimental mode "system-winget".
@HarryLime1120, out of curiosity, is the mod you are using published online?
Interesting. But as the behavior is so similar with the same error code, you may want to check if there is even a third location where (temporary) WinGet\defaultState files are located.
@marticliment > @HarryLime1120, out of curiosity, is the mod you are using published online? Yes: in https://github.com/HarryLime1120/WingetUI/tree/system_winget_all_lang As discussed in https://github.com/marticliment/WingetUI/issues/1705 "[ENHANCEMENT] system winget - support all languages"
For this ticket: I created a version with logging. Code can be found here: https://github.com/HarryLime1120/WingetUI/tree/log_winget_return_code It creates this log entry: I have included a lookup from number to text. I used the defines from winget AppInstallerErrors.h
Out of the scope of this ticket (logging only), i did a quick experiment adding a dummy package in case of error: packages.append(UpgradablePackage(exitText,"ERROR", "?", "0", "winget", Winget)) This gives the user an instant indication that something is wrong instead of "Hooray! No updates were found!" For sure the experiment has side-effects, like the message box...
Maybe the folder ownership change to an admin user is relevant here: Related issue
Please confirm these before moving forward
Describe your issue
I'm a newbie on this package manager stuff. I'm trying to find something that can help me update all of my programs. I found WingetUI, and I also have some basic with winget. Updating my apps using the command-line winget works fine, but I can't update it using WingetUI.
Steps to reproduce the issue
No response
WingetUI Log
Package Managers Logs
Relevant information
No response
Screenshots and videos
No response