This post was most recently updated on April 15th, 2024.
4 min read.This article offers a couple of different ways to fix the “0x8a15000f” error that winget might throw at you in seemingly random situations. It’s a great tool especially for headless scenarios on Windows, but this was an odd one – and required an odd solution.
Background
Another day, another headache with a tool that usually “just works”.
I was trying to install kubectl using winget on a machine where I didn’t have a convenient desktop environment (don’t question it). To do this, I was running something like this:
winget install -e --id Kubernetes.kubectl
But I immediately ran into issues.
Problem
The error is partially localized. I’ll probably paste a few alternate translations at the bottom of the article, but the bottom line is that you’ll get an error like this:
0x8a15000f : Data required by the source is missing
This was odd.
Here’s a sample of the longer error message you might get:
Failed when searching source: winget
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
Failed when opening source(s); try the 'source reset' command if the problem persists.
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
Odd. Running winget sources didn’t return anything too out-of-the-ordinary for me, either:
winget source list
Name Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget https://cdn.winget.microsoft.com/cache
No matter, we’ll figure out a way to fix it.
Solution
Let’s get to it, then! Below, I’ve written some things you can try. As is somewhat usual with my guides and how-tos, it was the last step that worked for me – but I tried all the earlier steps for a good reason (someone somewhere said they should work), so I’m documenting them for you too.
Time needed: 15 minutes
How to fix winget when it’s throwing a “0x8a15000f : Data required by the source is missing”?
- Verify you can access the sources
Remember running winget sources list? Copy the source URLs and try accessing them in the browser. If you’re getting any error other than 404, you have a problem – your firewall might be blocking the download or Microsoft might be messing with their repositories.
If it’s the former, try another network, and if it’s the latter, wait. Or proceed to step 2. - Update your winget sources
This is an easy and quick thing to run to verify your sources should be kosher:
winget source update
This one will simply force winget to update information for all package sources it has. Didn’t work for me, but people online say it helped some of them. - Don’t run winget as an admin
Of course winget should work as an admin. But plenty of people complain it doesn’t, and they just get around that by running it as a normal user, non-elevated.
Might be worth it to give it a go. - Reset winget sources
Okay – this one is much more dramatic, so you might even want to avoid it. winget source reset will get rid of all other sources but the default and reset your winget and Microsoft Store configuration.
If you’re fine with that happening, run the following:winget source reset --force
Yet again, this didn’t fix the issue for me, but maybe it does for you. - Make sure winget is installed properly
This one was a bit odd – maybe winget is not installed properly? It should come preinstalled and preconfigured with defaults that “just work”. But that’s not how it sometimes seems to work.
Maybe winget is broken in PowerShell 7+? We can always try fixing that by installing it as an AppxPackage like this:Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe
If you’ll get an error like:Appx - Import-Module: Operation is not supported on this platform. (0x80131539)
That just means PowerShell is confused about its identity and according to Microsoft, you need to upgrade to Windows 11.
Of course, in reality, you just need to import the Appx module in compatibility mode. Run this first:Import-Module -Name Appx -UseWindowsPowerShell
And then try installing the Winget package again:Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe
And THEN try running:winget install -e --id Kubernetes.kubectl
References
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/import-module?view=powershell-7.3#-usewindowspowershell
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_windows_powershell_compatibility?view=powershell-7.3
And yes, the winget logo is designed by Bingbot. It got really inspired by the wings so I couldn’t force it to NOT produce some sort of bird design again and again.
Sample errors
Echec lors de la recherche de la source : winget.
Une erreur inattendue s'est produite lors de I'exécution de la commande
0x8a15000f : Data required by the source is missing
Aucun package n'a été trouvé parmi les sources de travail.
Failed when opening source(s); try the 'source reset' command if the problem persists.
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
无法打开源; 如果问题仍然存在,请尝试“source reset”命令。
执行此命令时发生意外错误:
0x8a15000f : Data required by the source is missing
- How to fix PowerToys FancyZones in Windows 11? - September 24, 2024
- How to export the whole SSL (or TLS) certificate chain based on the original using PowerShell? - September 17, 2024
- How to solve keyboard shortcuts not working in Google Chrome on Windows? - September 10, 2024