Closed felipecrs closed 2 years ago
Can you run that command with --verbose-logs
and post the log file?
Also: does winget source reset --force
fix it? I kind of doubt it, but it seems to be able to recover from other weirdness.
Unfortunately, no logs are shown, and the command does not help either.
➜ winget source reset --force
This command requires administrator privileges to execute.
➜ gsudo winget source reset --force
Resetting all sources...Done
➜ winget upgrade
Failed in attempting to update the source: winget
The `msstore` source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires current machine's geographic region to be sent to function properly.
Do you agree to all the source agreements terms?
[Y] Yes [N] No: y
No installed package found matching input criteria.
➜ winget upgrade Microsoft.Teams --verbose-logs
Failed in attempting to update the source: winget
No applicable update found.
--verbose-logs
dumps them to %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
, you'll have to find the file from that command and post it.
Oops, got it.
I'm not sure what exactly is wrong with your system, but winget is failing to deploy the latest source file. Here are some things that might help you recover:
🪟 + i
) > Apps > Installed Apps
b. Search for Windows Package Manager Source (winget)
c. Click the 3 dots on the right > Advanced Options
d. Reset
the package (you could try Repair but Reset is a bigger hammer and there is no data to lose)
e. This will attempt to re-register the package with the system and hopefully make things happy again.Uninstall
right there.
b. Or winget source remove winget
a. This will attempt to actually remove the existing source package from your system.I agree that there is potentially something that we could do here to recover in a more automated fashion, although it would most likely be automating the removal to hopefully enable a new installation to just work. If that doesn't do it we would probably need to understand what was actually wrong to be able to mitigate.
Thank you very very much for the detailed suggestions, but unfortunately none worked. :(
Ops:
a.:
b:
➜ gsudo winget source remove winget
Removing source: winget...
An unexpected error occurred while executing the command:
Operation failed: Deployment Remove operation with target volume C: on Package Microsoft.Winget.Source_2021.1027.1909.482_neutral__8wekyb3d8bbwe from: (Microsoft.Winget.Source_2021.1027.1909.482_neutral__8wekyb3d8bbwe) failed with error 0x80070057. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
0x80070057 : The parameter is incorrect.
Reset-AppxPackage Microsoft.Winget.Source_2021.1027.1909.482_neutral__8wekyb3d8bbwe
This didn't help either (there was no output from this command).
Ok, looks like you are in uncharted territories of broken. I would suggest filing feedback using https://aka.ms/appdepuif and performing any one (or all) of these actions during the repro recording step. That will collect logs from the appropriate area given the issues you are having. And also crashing Settings is a nice find, that should never happen. The owning team should see those crashes already, no extra steps required.
It might be possible to figure out how to help you from the logs but I have doubts if you can't even remove the package.
Oh no!
So I think I really messed up with my Windows installation. I will try some recover methods...
Update: reinstalling Windows on top of the existing installation (with the Media Creatin Tool) didn't help. dism
and sfc
commands neither. I will close this issue because I believe the only solution in my case will be a clean install.
Regardless, thank you very much for the help!
Just for completeness, I also tried to WSReset.exe
and a forEach
PowerShell snippet to restore the default Windows Appx packages. None worked.
So I ended up by doing a clean install (and of course it's working now).
Lesson taken: never make registry changes without a backup.
I just managed to fix this by installing the pre-release from https://github.com/microsoft/winget-cli/releases
why the bug issue is closed without fixing it? clean installing windows os isn't a reasonable solution.
I closed the issue because in my case, other parts of Windows (apart from Winget) were also broken as mentioned here. Is it your case as well?
yap. it's still the same in my case
So, I think in this sense, this bug isn't much of Winget's concern but rather Windows itself. As mentioned in https://github.com/microsoft/winget-cli/issues/1656#issuecomment-955080920, perhaps the best would be to report in the Windows Feedback Hub.
Did you guys make some changes to C:\Windows\Temp folder ?
Running winget source update --name winget
on your device will download the winget
source file to C:\Users\%USERNAME%\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
and not to C:\Windows\Temp
.
If you're having issues deploying the latest source file, it's likely an issue on your end; try seeing if you can repair your current installation of Windows by installing Windows on top of your current installation.
Ah I see what you mean.
It saves a few temporary files to C:\Windows\Temp
but the actual source file is saved to C:\Users\%USERNAME%\AppData\Local\Temp\WinGet
and then provisioned via Add-AppxPackage
.
In my case I was using the 1.4 preview version reinstalling the latest 1.3.x stable version fixed the issue.
Did you guys make some changes to C:\Windows\Temp folder ?
Running
winget source update --name winget
on your device will download thewinget
source file toC:\Users\%USERNAME%\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
and not toC:\Windows\Temp
.If you're having issues deploying the latest source file, it's likely an issue on your end; try seeing if you can repair your current installation of Windows by installing Windows on top of your current installation.
Thanks man, it worked for me! I had the same error as OP
I've run first: "winget source update --name winget" and then "winget install --id GitHub.cli"
Thanks again.
winget source update --name winget
gets me
winget source update --name winget
gets me
Exactly the same here!
Also, when running winget upgrade --all
I get the warning; Failed in attempting to update the source: winget
and then upates 3 of the 7 upgrades available. But without actually installing them. When running the command again, the same packages will be downloaded and installed again.
Same things have happened on my main Windows 10 and on another machine with recently installed Windows 11 onboard.
For the people dropping by:
winget source reset --force
winget upgrade
And chose 'Y' if you agree to the terms.
For the people dropping by:
winget source reset --force winget upgrade
And chose 'Y' if you agree to the terms.
For the people dropping by:
winget source reset --force winget upgrade
And chose 'Y' if you agree to the terms.
This affects 4 (out of 4 tested) different systems here, Windows 10 and Windows 11, so feels like a server-side issue to me.
Me and a colleague are also affected. +1 for the server-side issue guess.
I turned on VPN and winget upgrade
and winget source reset --force
executed successfully. I tried a US and Japanese IP, both worked.
I have the same issue. (EU)
I'm in France, so EU too.
Considering the fact that this issue seems to be isolated to EU (and perhaps other regions), but US and Japan areoperational, I have a temporary workaround.
Use this to find an IP address from US, then add a line in your hosts
file (%WINDIR%\System32\drivers\etc\hosts
). For example, this is what I added
152.195.19.95 cdn.winget.microsoft.com
After this, run winget source update
and it should properly update.
UPDATE:
Well, that worked once, but now it seems all IP addresses are returning the same result. My guess is they're all down for "maintenance" 😄
Considering the fact that this issue seems to be isolated to EU (and perhaps other regions), but US and Japan areoperational, I have a temporary workaround.
Use this to find an IP address from US, then add a line in your
hosts
file (%WINDIR%\System32\drivers\etc\hosts
). For example, this is what I added152.195.19.95 cdn.winget.microsoft.com
After this, run
winget source update
and it should properly update.UPDATE:
Well, that worked once, but now it seems all IP addresses are returning the same result. My guess is they're all down for "maintenance" 😄
I concur:
Same issue as well, almost reinstalled OS
Bruh, I just reinstalled windows for nothing :(
Bruh, I just reinstalled windows for nothing :(
you should've read the thread, that was clearly pointing at a server-side issue 😜
Bruh, I just reinstalled windows for nothing :(
you should've read the thread, that was clearly pointing at a server-side issue 😜
I reinstalled before reading the thread, backed all my stuff up tho so I'm fine
same issue
tried all methods. It seems most of the servers are down. msstore working fine.
I can confirm that nothing works in Europe. I even added US IP but it didn't change anything. Maybe a VPN works.
Japan here. Currently having this problem as well. November 5th, 10:30 JST
Guys, just in case you don't know and you really depend on winget for whatever reason: you can manually clone the winget-pkgs repository and use winget install -m path/to/manifest/folder you want to install.
Same issue here in the US.
Same issue, Eastern Coast USA
Same issue, Tripoli Lebanon
The only workaround right now is the msstore.
I have the same problem (Israel)
Same issue, Vietnam.
Same issue, Sweden.
Brief description of your issue
I don't know exactly when this started to happen, but I'm pretty sure that it was after I ran some cleanup with CCleaner and BCUninstaller when I had some issues to uninstall a few of my programs.
Now, every time I try to run
winget install
orwinget upgrade
it fails with this error. Wheninstall
, it fails but continues anyway.I know this was probably my fault, but still, I think it would help the community to share what to do when it happens, or better yet: to allow
winget
to recover itself when such things happens.I tried to do some things already, such as upgrading, downgrading (the winget cli), but none helped. I also tried to uninstall the "App Installer" but I could not find a way to do it, so that I could try to reinstall.
I also noticed that a previous issue was opened for this, but the solution mentioned isn't working for me: https://github.com/microsoft/winget-cli/issues/1066
Steps to reproduce
I'm not sure. But I would be happy to provide any information required.
Expected behavior
To not fail with this error.
Actual behavior
Environment