MSEndpointMgr / IntuneAppFactory

Intune App Factory automates Win32 application packaging in Intune.
https://msendpointmgr.com/intune-app-factory
MIT License
36 stars 11 forks source link

No new versions are found for Winget apps if you don't even go to the VM and start Winget search #16

Open DennisBergemann opened 9 months ago

DennisBergemann commented 9 months ago

Hello @NickolajA

i have an weird issue, maybe you can tell me with your experience what i am doing wrong.

  1. Our Factory runs all 6hours
  2. with some days waiting, we realize that in winget normally new apps, but the factory found no new versions.
  3. Now when we go to our virtual machine (where the agent is for the factory) and we start one search like "winget search Google.Chrome" then the factory can find new updates for all winget apps when it starts.

any idea was causes this weird behaviour ?

Thank so very much

NickolajA commented 7 months ago

Uhm, that's a weird issue. I've not experienced it myself. The pipeline is running in the context of a given user, is that the same user that you're logging on to as well? I was thinking if there could be a per-user inconsistency or something weird with the Windows Package Manager versioning. But honestly, I feel pretty lost.

DennisBergemann commented 7 months ago

Hello @NickolajA ,

yes i know its weird. The pipeline is running in the context of the same user as i am logging in. I feels like some caching issue or anything.

What i tried:

nothing helped

i have to go manually to the vm open a powershell and: winget search google.chrome (as an example) if i do so, the next run of the factory will find new updates for all winget softwares.

I think this is not factory but winget related issue and i wonder if no more people have the same.

Would be great to hear some other voices

Thanks a lot

Edit: one interesting point my vm is win11

FW123456789 commented 5 months ago

Hi Dennis,

i am feeling i have the same or a similar issue. Intune App Factory does not use the latest version of an App from winget. For example PreForm is available in winget with version 3.36. but the Factory pipeline creates a package with version 3.34.

Any ideas what could be the problem here? i did not try to run winget search on the VM as i dont have access to it.

DennisBergemann commented 5 months ago

Hi @FW123456789 ,

please login to the machine with the same user as factory ( i have an extra user as example), then open powershell and search for any app like this

>> winget search google.chrome

now it will find new updates for all apps... (weird) One spookey point, i created a schedtask with the same user who did the same each week, but no luck. I had to do it by my self

My last Test i did now some days before is, i updated to the new winget from github. Hopefully this solves the issue, i will see...

here the link: https://github.com/microsoft/winget-cli/releases

from there you can use the msix to update your winget like me, mine was really old before

NickolajA commented 2 months ago

I started experiencing this last week, however my VM where running W10 21H2, so I upgraded it to W11 23H2 and the issue went away.

ChristianOe commented 4 days ago

Hello to all,

I have the same problem. I found out that Winget does not update the source list. I have implemented a workaround for this. Maybe this will help.

Install-Modules.ps1 - at the end:

# Update Winget Source Catalog
    try {
        Write-Output -InputObject "Attempting to update winget sources catalog"
        $UpdateSuccessful = $false
        [string[]]$WinGetStream = & "winget" "source" "update" | Out-String -Stream
        foreach ($RowItem in $WinGetStream) {
            if ($RowItem -eq "Done") {
                $UpdateSuccessful = $true
            }
        }

        If ($UpdateSuccessful){
            Write-Output -InputObject "Winget source update was successful"
        } else {
            Write-Warning "Winget source update was not successful"
            Write-Output -InputObject "$WinGetStream"
        }
    }
    catch [System.Exception] {
        Write-Warning -Message "An error occurred while attempting to update winget sources catalog. Error message: $($_.Exception.Message)"
    }