Weatherlights / Winget-AutoUpdate-Intune

WAUaaS daily updates apps as system and notify users. WAUaaS brings you WAU in a service like pattern that can be deployed and configured by Microsoft Intune (or other MDM solutions).
MIT License
116 stars 6 forks source link

[Bug]: WAU cannot verify app update state #33

Closed MichalDCS closed 2 weeks ago

MichalDCS commented 1 month ago

The problem

After successful app update (WinGet shows success), WAU fails to verify the update (shows a false error message). The issue is because there is a bug in one of the WAU functions:

Function Confirm-Installation ($AppName, $AppVer){

    #Set json export file
    $JsonFile = "$WorkingDir\Config\InstalledApps.json"

    #Get installed apps and version in json file
    & $Winget export -s winget -o $JsonFile --include-versions | Out-Null

The function tries to write to the Config directory, but it does not exist. Hence, it cannot download a list of apps to verify if the update was successful.

The original WAU project has already corrected the function in the current update: `Function Confirm-Installation ($AppName, $AppVer) {

#Set json export file
$JsonFile = "$env:TEMP\InstalledApps.json"

#Get installed apps and version in json file
& $Winget export -s winget -o $JsonFile --include-versions | `Out-Null``

Any chance we could update this function, or just update the WAU in the package to a newer version? Currently I'm solving the issue by creating the Config directory manually.

What version of WAU has the issue?

1.17.8

What version of Windows are you using (ex. Windows 11 22H2)?

Windows 11 22H2

What version of winget are you using?

1.22.11132.0

Log information

| 
   / 
   - 
   \ 
   | 
   / 
   - 
   \ 
   | 

Successfully installed
00:09:42 - -> A Pending Reboot lingers and probably prohibited Audacity 3.2.1 from upgrading...
-> ...an install for Audacity 3.2.1 is NOT executed!

Additional information

The log snipped shows an error, but the app is actually successfully updated. If there is no pending reboot, the log shows a different error (I believe it was something like: `Successfully installed

Update failed` Definitely a false error, but in some cases it makes WAU try to reinstall the app (since the update failed), so potentially can cause issues.

github-actions[bot] commented 4 weeks ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.