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
158 stars 8 forks source link

[Bug]: The update process fails although the package was successfully updated. #34

Closed ne-tlw closed 2 months ago

ne-tlw commented 5 months ago

The problem

The log file documents that the package has been successfully installed. In the next line, the installation is marked as failed and a new installation of the package (instead of the update) is attempted. Here are three examples. The issue occurs with packages of all kind. Three examples attached. Actually, the update has been finished successfully.

08:12:23 - Updating KeePassXC from 2.7.7 to 2.7.8...
08:12:23 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'KeePassXCTeam.KeePassXC'   ##########
08:12:23 - -> Running: Winget upgrade --id KeePassXCTeam.KeePassXC --accept-package-agreements --accept-source-agreements -h
Successfully installed
08:13:18 - -> An upgrade for KeePassXC failed, now trying an install instead...
08:13:18 - -> Running: Winget install --id KeePassXCTeam.KeePassXC --accept-package-agreements --accept-source-agreements --force -h
Successfully installed
08:13:34 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'KeePassXCTeam.KeePassXC'   ##########
08:13:34 - KeePassXC update failed.
08:08:15 - Updating TeamViewer from 15.53.6 to 15.53.7...
08:08:15 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'TeamViewer.TeamViewer'   ##########
08:08:15 - -> Running: Winget upgrade --id TeamViewer.TeamViewer --accept-package-agreements --accept-source-agreements -h
Successfully installed
08:09:29 - -> An upgrade for TeamViewer failed, now trying an install instead...
08:09:29 - -> Running: Winget install --id TeamViewer.TeamViewer --accept-package-agreements --accept-source-agreements --force -h
Successfully installed
08:10:47 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'TeamViewer.TeamViewer'   ##########
08:10:47 - TeamViewer update failed.
08:10:48 - Updating Microsoft Edge WebView2-Laufzeit from 124.0.2478.80 to 124.0.2478.97...
08:10:48 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'Microsoft.EdgeWebView2Runtime'   ##########
08:10:48 - -> Running: Winget upgrade --id Microsoft.EdgeWebView2Runtime --accept-package-agreements --accept-source-agreements -h
08:10:52 - -> An upgrade for Microsoft Edge WebView2-Laufzeit failed, now trying an install instead...
08:10:52 - -> Running: Winget install --id Microsoft.EdgeWebView2Runtime --accept-package-agreements --accept-source-agreements --force -h
Successfully installed
08:12:03 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'Microsoft.EdgeWebView2Runtime'   ##########
08:12:03 - Microsoft Edge WebView2-Laufzeit update failed.

What version of WAU has the issue?

1,17.8

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

Windows 10 22H2

What version of winget are you using?

v1.7.11261

Log information

No response

Additional information

No response

github-actions[bot] commented 4 months ago

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

SmithingJon commented 4 months ago

I am also experiencing this issue.

SmithingJon commented 4 months ago

Think I figured out why:

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

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

In the install command and on my systems the 'Config' folder doesn't exist. I added the config folder and now the Confirm-Installation function works as expected.

image

ne-tlw commented 4 months ago

Confirmed that config folder does not exist after installing Winget-AutoUpdate-Intune (MSI).

ne-tlw commented 4 months ago

My workaround is to create the missing folder on all clients via intune using a powerhell script:

New-Item -Path "$($ENV:ProgramData)\Winget-AutoUpdate" -Name "config" -ItemType "directory" -force

Would be great if the package cloud be updated accordingly.

Weatherlights commented 3 months ago

Can you check if the issue is resolved now? With WAU 1.20.0 which is included in WAUaaS 1.05.0000 the function Confirm-Installation does no longer write to the config folder but the temporary folder.

github-actions[bot] commented 2 months ago

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

github-actions[bot] commented 2 months ago

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