Skip to content
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

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 this issue Jan 18, 2024 · 6 comments

Comments

@DennisBergemann
Copy link

DennisBergemann commented Jan 18, 2024

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
Copy link
Member

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
Copy link
Author

DennisBergemann commented Mar 8, 2024

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:

  • i created an task in windows to do the same as when i would do it manually (in the name of the same user)
  • i added update source command in factory before asking for new version

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
Copy link

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
Copy link
Author

DennisBergemann commented May 14, 2024

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
Copy link
Member

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
Copy link

ChristianOe commented Oct 23, 2024

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)"
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants