winget-cli: 0x8a15000f : Data required by the source is missing

Brief description of your issue

Receive error message 0x8a15000f : Data required by the source is missing when doing pretty much anything with Winget.

Steps to reproduce

winget upgrade --all --verbose-logs

Expected behavior

winget downloads the package, and the sources are reachable

Actual behavior

C:\Users\xx> winget source list
Name    Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache

C:\Users\xx> winget search Windows.PowerShell
Failed when searching source; results will not be included: winget
No package found matching input criteria.

C:\Users\xx> winget upgrade --all --verbose-logs
Failed when searching source: winget
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing

Environment

Windows: Windows.Desktop v10.0.19045.2604
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 1
  • Comments: 26 (2 by maintainers)

Commits related to this issue

Most upvoted comments

For me, the fix for 0x8a15000f was to run the following command in PowerShell:

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe

It’s a bug in the old version. You can fix by updating it. You can use this script below:

function Install-WinGet {
  $tempFolderName = 'WinGetInstall'
  $tempFolder = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath $tempFolderName
  New-Item $tempFolder -ItemType Directory -ErrorAction SilentlyContinue | Out-Null

  $apiLatestUrl = if ($Prerelease) { 'https://api.github.com/repos/microsoft/winget-cli/releases?per_page=1' } else { 'https://api.github.com/repos/microsoft/winget-cli/releases/latest' }
  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  $WebClient = New-Object System.Net.WebClient

  function Get-LatestUrl	{
		((Invoke-WebRequest $apiLatestUrl -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -match '^Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle$' }).browser_download_url
  }

  function Get-LatestHash {
    $shaUrl = ((Invoke-WebRequest $apiLatestUrl -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -match '^Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt$' }).browser_download_url
    $shaFile = Join-Path -Path $tempFolder -ChildPath 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt'
    $WebClient.DownloadFile($shaUrl, $shaFile)
    Get-Content $shaFile
  }
  $desktopAppInstaller = @{
    fileName = 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
    url      = $(Get-LatestUrl)
    hash     = $(Get-LatestHash)
  }
  $vcLibsUwp = @{
    fileName = 'Microsoft.VCLibs.x64.14.00.Desktop.appx'
    url      = 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
    hash     = '9BFDE6CFCC530EF073AB4BC9C4817575F63BE1251DD75AAA58CB89299697A569'
  }
  $uiLibsUwp = @{
    fileName = 'Microsoft.UI.Xaml.2.7.zip'
    url      = 'https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.0'
    hash     = '422FD24B231E87A842C4DAEABC6A335112E0D35B86FAC91F5CE7CF327E36A591'
  }
  $dependencies = @($desktopAppInstaller, $vcLibsUwp, $uiLibsUwp)
  Write-Host '--> Checking dependencies'
  foreach ($dependency in $dependencies) {
    $dependency.file = Join-Path -Path $tempFolder -ChildPath $dependency.fileName
    if (-Not ((Test-Path -Path $dependency.file -PathType Leaf) -And $dependency.hash -eq $(Get-FileHash $dependency.file).Hash)) {
      Write-Host @"
    - Downloading:
      $($dependency.url)
"@
      try {
        $WebClient.DownloadFile($dependency.url, $dependency.file)
      }
      catch {
        #Pass the exception as an inner exception
        throw [System.Net.WebException]::new("Error downloading $($dependency.url).", $_.Exception)
      }
      if (-not ($dependency.hash -eq $(Get-FileHash $dependency.file).Hash)) {
        throw [System.Activities.VersionMismatchException]::new('Dependency hash does not match the downloaded file')
      }
    }
  }

  if (-Not (Test-Path (Join-Path -Path $tempFolder -ChildPath \Microsoft.UI.Xaml.2.7\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx)))	{
    Expand-Archive -Path $uiLibsUwp.file -DestinationPath ($tempFolder + '\Microsoft.UI.Xaml.2.7') -Force
  }
  $uiLibsUwp.file = (Join-Path -Path $tempFolder -ChildPath \Microsoft.UI.Xaml.2.7\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx)
  Add-AppxPackage -Path $($desktopAppInstaller.file) -DependencyPath $($vcLibsUwp.file), $($uiLibsUwp.file)
  Remove-Item $tempFolder -recurse -force
}
Write-Host -ForegroundColor Green "--> Updating Winget`n"
Install-Winget

Tried all of the above fixes without any luck. (Fresh Win11 Pro install)

Only thing that worked for me was the following: Add-AppPackage -path "https://cdn.winget.microsoft.com/cache/source.msix."

Afterwards the error was resolved and I was able to use winget.

It’s a bug in the old version. You can fix by updating it. You can use this script below:

function Install-WinGet {
  $tempFolderName = 'WinGetInstall'
  $tempFolder = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath $tempFolderName
  New-Item $tempFolder -ItemType Directory -ErrorAction SilentlyContinue | Out-Null

  $apiLatestUrl = if ($Prerelease) { 'https://api.github.com/repos/microsoft/winget-cli/releases?per_page=1' } else { 'https://api.github.com/repos/microsoft/winget-cli/releases/latest' }
  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  $WebClient = New-Object System.Net.WebClient

  function Get-LatestUrl	{
		((Invoke-WebRequest $apiLatestUrl -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -match '^Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle$' }).browser_download_url
  }

  function Get-LatestHash {
    $shaUrl = ((Invoke-WebRequest $apiLatestUrl -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -match '^Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt$' }).browser_download_url
    $shaFile = Join-Path -Path $tempFolder -ChildPath 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt'
    $WebClient.DownloadFile($shaUrl, $shaFile)
    Get-Content $shaFile
  }
  $desktopAppInstaller = @{
    fileName = 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
    url      = $(Get-LatestUrl)
    hash     = $(Get-LatestHash)
  }
  $vcLibsUwp = @{
    fileName = 'Microsoft.VCLibs.x64.14.00.Desktop.appx'
    url      = 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
    hash     = '9BFDE6CFCC530EF073AB4BC9C4817575F63BE1251DD75AAA58CB89299697A569'
  }
  $uiLibsUwp = @{
    fileName = 'Microsoft.UI.Xaml.2.7.zip'
    url      = 'https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.0'
    hash     = '422FD24B231E87A842C4DAEABC6A335112E0D35B86FAC91F5CE7CF327E36A591'
  }
  $dependencies = @($desktopAppInstaller, $vcLibsUwp, $uiLibsUwp)
  Write-Host '--> Checking dependencies'
  foreach ($dependency in $dependencies) {
    $dependency.file = Join-Path -Path $tempFolder -ChildPath $dependency.fileName
    if (-Not ((Test-Path -Path $dependency.file -PathType Leaf) -And $dependency.hash -eq $(Get-FileHash $dependency.file).Hash)) {
      Write-Host @"
    - Downloading:
      $($dependency.url)
"@
      try {
        $WebClient.DownloadFile($dependency.url, $dependency.file)
      }
      catch {
        #Pass the exception as an inner exception
        throw [System.Net.WebException]::new("Error downloading $($dependency.url).", $_.Exception)
      }
      if (-not ($dependency.hash -eq $(Get-FileHash $dependency.file).Hash)) {
        throw [System.Activities.VersionMismatchException]::new('Dependency hash does not match the downloaded file')
      }
    }
  }

  if (-Not (Test-Path (Join-Path -Path $tempFolder -ChildPath \Microsoft.UI.Xaml.2.7\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx)))	{
    Expand-Archive -Path $uiLibsUwp.file -DestinationPath ($tempFolder + '\Microsoft.UI.Xaml.2.7') -Force
  }
  $uiLibsUwp.file = (Join-Path -Path $tempFolder -ChildPath \Microsoft.UI.Xaml.2.7\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx)
  Add-AppxPackage -Path $($desktopAppInstaller.file) -DependencyPath $($vcLibsUwp.file), $($uiLibsUwp.file)
  Remove-Item $tempFolder -recurse -force
}
Write-Host -ForegroundColor Green "--> Updating Winget`n"
Install-Winget

This helps me a lot, the problem solved!!

Had the same issue on a fresh install of Windows 11. The installation from CDN fixed it for me.

Only thing that worked for me was the following: Add-AppPackage -path "https://cdn.winget.microsoft.com/cache/source.msix."

Could it be that the issue is linked to doing an offline installation? (I did connect my WiFi only after the installation, so that I could set up a local account.)

For me, the fix for 0x8a15000f was to run the following command in PowerShell:

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe

I have an error when running that command image

I have the same issue, if I am building a golden image through packer. I have set of winget commands as a part of install-sw.ps1 script. If it runs unattended as a part of the packer build, it fails with same error. If i finish the build just before the script runs and execute it in real RDP session, it works.

So the context of real login vs. winrm login seems to be the right lead. I do not have the workaround 😦

Have, same issue here. As a hint to reproduce: Running the commands in administrative shell (as scheduled task when logged in as a “normal” user) I get the errors. When logging in with Athe local adminstrative account I am able to winget upgrade (nothing else) successfully. After relogging in as the “normal” user the task runs fine. It seems it has something to to with anything in the user context, what is set after a “real” login of the admin…