Help requested - Inconsistent behaviour between hosts #6214
Unanswered
alba02119451
asked this question in
Q&A
Replies: 1 comment
-
|
My first suggestion would be to look at the logs I would suspect a network issue, given the 404 error. You could try changing the downloader setting.
The sources being the same doesn't say much, since they're just the default ones. For the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I'm facing an issue where the same command has different effects on different hosts. Since I don't think it's an actual bug but an issue on my end I'm posting here, but I'm happy to move this elsewhere if it is wrong. Below, I will explain the setup and issue, then I will list everything that I have tried, and finally some suspicions/notes. I would like some pointers to help me suss out what the exact issue is, or an outright solution if you happen to have one.
The setup
I have a small collection of Windows 11 24H2 VMs with winget installed. They all have some packages in common, but some machines are also a bit more specialized. We provisioned these machines using Ansible, which orchestrates the software installation via winget. We wanted to expand our toolset by creating an Ansible role that uses winget to automatically update all installed packages. This proved to be a lot easier in principle than in practice.
The issue
While all the hosts were created at the same time, using the same VM template, and started out with the same software, a few months of manual updates may have caused some issues with updates, as these are inconsistent between machines. For example, on one machine, I can download the
Microsoft.VCRedist.2015+.x64package without issue:However, on two other machines, it yields a 404 error:
I also have this issue with
RedHat.Podman,KeePassXCTeam.KeePassXC(dependent on the VCRedist package), andMicrosoft.Powershell, but not withNotepad++.Notepad++andPostman.Postman.What I've done/tried so far
Updating winget
My first observation was that winget was out of date on the machines that were causing these issues. The current stable release is 1.28.240. On one machine it was 1.28.220, and on the other it was 1.12.470. I have no clue how such an old client came on one of them, but alas. I suspect this is either the culprit or another symptom of the underlying problem. So, naturally, I ensured that winget was up-to-date on all machines. Another notable fact is that
winget upgrade wingetandwinget upgrade Microsoft.AppInstallerdid not work, both of them returned that there were no updates available. Downloading the newest version at https://aka.ms/getwinget and installing it did overwrite/update winget though. However, this did not change the resultUpdating and resetting my sources
So, winget itself wasn't able to see new updates, leading me to believe there was something wrong with the repositories/sources itself. So I used
winget source update, which didn't help. I also triedwinget source resetwith and without the--forceflag to no avail. Strangely, checking the sources withwinget source listproduces the same output on a working and non-working host:So, likely it's not a source issue either.
Elevated v/s non-elevated prompt
I did come across this issue and several similar ones that suggested that the issue may arise from trying to update with elevated rights. I was sadly unable to find a way to "lower" my rights in Ansible, but I did test the download of that package on a working host with a normal and administrator prompt, and the download succeeded in both cases.
Changing scope
In my search I did discover the --scope tag. This also did not help, as the example package is installed only under the machine scope, and running with that scope simply results in the same error. I did get an error for the windows terminal programme under the user scope though:
I am unsure if this is caused by the same issue.
Suspicions & notes
As stated, I suspect that the fact that winget wasn't updated is either (part of) the cause or a symptom, and the fact that it was two completely different outdated versions is very weird.
There does not seem to be a common theme between the packages that it can and cannot download. Some come from github, some come from external sources, some are 3rd party packages, some are Microsoft packages. I cannot find any reason or rhyme to why some work and some don't.
All machines are part of the same subnet, so the network causing issues is very unlikely.
So, as you can see, I've done a decent amount of searching and looking, but I just cannot find an explanation as to why this is happening or something to fix it. Is there anyone here who may have some tips, or recognizes this issue? If there is any more info I can provide, don't hestitate to let me know. Any help is appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions