Skip to content

Failed in attempting to update the source: winget  #1826

Closed

Description

@shivangswain

Brief description of your issue

Winget hasn't been able to access the winget source to fetch updates and new packages. I have tried resetting the sources, changing internet connections, checking Windows Firewall, etc but none of these resulted in any improvement.

Steps to reproduce

> winget upgrade

Failed in attempting to update the source: winget
Failed when searching source; results will not be included: winget
No installed package found matching input criteria.

> winget source update

Updating all sources...
Updating source: msstore...
Done
Updating source: winget...
Cancelled

Expected behavior

For winget to be able to access its repo, update its sources and then upgrade my installed applications.

Actual behavior

Whatever these logs tell us:

> winget upgrade
WinGet-2022-01-01-11-39-54.319.log

> winget source update
WinGet-2022-01-01-11-41-02.453.log

Environment

> winget --info

Windows Package Manager (Preview) v1.2.3411-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.376
Package: Microsoft.DesktopAppInstaller v1.17.3411.0

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

Activity

  1. ghost added
    Needs-Triage
    on Jan 1, 2022
  2. added
    Issue-Bug
    and removed
    Needs-Triage
    on Jan 3, 2022
  3. github-account1111 commented on Apr 11, 2022

    @github-account1111

    I'm getting the same error but it seems to still be able to retrieve the upgrades:

    > winget upgrade
    Failed in attempting to update the source: winget
    Name               Id                 Version          Available        Source
    ------------------------------------------------------------------------------
    Microsoft OneDrive Microsoft.OneDrive 21.220.1024.0005 22.033.0213.0002 winget
    1 upgrades available.
    
    > winget search powertoys
    Failed in attempting to update the source: winget
    Name                Id                  Version Source
    --------------------------------------------------------
    Microsoft PowerToys XP89DCGQ3K6VLD      Unknown msstore
    PowerToys (Preview) Microsoft.PowerToys 0.57.2  winget
    

    That said, source update still gets cancelled:

    > winget source update
    Updating all sources...
    Updating source: msstore...
    Done
    Updating source: winget...
      ██████████████████████████████  3.44 MB / 3.44 MB
    Cancelled
    
    > winget --info
    Windows Package Manager v1.2.10271
    Copyright (c) Microsoft Corporation. All rights reserved.
    
    Windows: Windows.Desktop v10.0.22000.593
    Package: Microsoft.DesktopAppInstaller v1.17.10271.0
    

    winget source reset doesn't fix this.

  4. github-account1111 commented on Apr 21, 2022

    @github-account1111

    Now winget won't retrieve updates at all.
    It's pretty much useless now.

    Is no one else experiencing this?

  5. horihel commented on May 17, 2022

    @horihel

    I'm getting this exact behaviour when I try to run this command through powershell remoting (or winrm).

    I'm trying to use winget to provision a Vagrantbox and this problem pretty much makes this impossible.

  6. horihel commented on May 30, 2022

    @horihel

    I've checked and yes, my vagrant-boxes indeed use the MSIXbundle.

    Interestingly, i can make it work by using "powershell_elevated_interactive: true" with the vagrant:shell provisioner. This parameter forces the shell process into the interactive session of the "vagrant" user (which has to be logged in of course). winget seems to be happy with this.

    Any winget invocations after that (at least during initial provisioning) work - even in non-interactive sessions. Probably because they don't need to update source any more.

  7. jdimeo commented on Jun 7, 2022

    @jdimeo

    Something's definitely broken with winget recently.... getting this error now on multiple PCs in my org when we didn't used to (including my own when running from an elevated PowerShell terminal). Not sure I have much else to add to this ticket besides "me too".

  8. davetapley commented on Jun 16, 2022

    @davetapley

    Same here, trying to install Powershell per these docs.

    winget search Microsoft.PowerShell
    Failed in attempting to update the source: winget
    Failed when searching source; results will not be included: winget
    No package found matching input criteria.
    
    winget install --id Microsoft.Powershell --source winget
    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
    

    Also I assume this is weird:

    winget source update
    Updating all sources...
    Updating source: msstore...
    Done
    Updating source: winget...
      ██████████████████████████████  0%
    Cancelled
    

    From the logs:

    
    2022-06-16 15:43:50.989 [REPO] Source add/update failed, waiting a bit and retrying: winget
    2022-06-16 15:43:53.161 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
    2022-06-16 15:43:53.161 [CORE] Downloading to path: C:\Users\alert\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
    2022-06-16 15:43:53.161 [CORE] Started applying motw to C:\Users\alert\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
    2022-06-16 15:43:53.162 [CORE] Finished applying motw
    2022-06-16 15:43:53.162 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/source.msix
    2022-06-16 15:43:53.556 [CORE] Download completed.
    2022-06-16 15:43:53.557 [CORE] Starting AddPackage operation #1: file:///C:/Users/alert/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix SkipSmartScreen: 1
    2022-06-16 15:43:53.557 [CORE] Begin waiting for operation #1
    2022-06-16 15:43:53.557 [CORE] Begin blocking for operation #1
    2022-06-16 15:43:53.651 [CORE] Deployment operation #1: A specified logon session does not exist. It may already have been terminated.
    
    
    2022-06-16 15:43:53.651 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFC72A7657A: (caller: 00007FFC72A76C09) Exception(2) tid(2b0c) 80070520 A specified logon session does not exist. It may already have been terminated.
    
        Msg:[Operation failed: A specified logon session does not exist. It may already have been terminated.
    
    ] 
    
    2022-06-16 15:43:53.656 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(516)\WindowsPackageManager.dll!00007FFC72BCFA23: (caller: 00007FFC729DB9AD) LogHr(2) tid(2b0c) 80070520 A specified logon session does not exist. It may already have been terminated.
    
        Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFC72A7657A: (caller: 00007FFC72A76C09) Exception(2) tid(2b0c) 80070520 A specified logon session does not exist. It may already have been terminated.
    
        Msg:[Operation failed: A specified logon session does not exist. It may already have been terminated.
    
    ] 
    ] 
    
  9. yourfate commented on Nov 5, 2022

    @yourfate

    I have the same Problem, also with the weird fail in the logs mentioning that D:\a\_work\1\s\external\pkg\... path.

    I get this whenever I try to intall or update anything at all.

    The log from running winget source update:

    2022-11-05 12:24:47.488 [CORE] WinGet, version [1.3.2691], activity [{D89A021F-2E42-4585-AC41-8EBE5B870E73}]
    2022-11-05 12:24:47.488 [CORE] OS: Windows.Desktop v10.0.19044.2130
    2022-11-05 12:24:47.488 [CORE] Command line Args: winget  source update
    2022-11-05 12:24:47.488 [CORE] Package: Microsoft.DesktopAppInstaller v1.18.2691.0
    2022-11-05 12:24:47.488 [CORE] IsCOMCall:0; Caller: winget-cli
    2022-11-05 12:24:47.494 [CLI ] WinGet invoked with arguments: 'source' 'update'
    2022-11-05 12:24:47.494 [CLI ] Found subcommand: source
    2022-11-05 12:24:47.494 [CLI ] Found subcommand: update
    2022-11-05 12:24:47.494 [CLI ] Leaf command to execute: root:source:update
    2022-11-05 12:24:47.494 [CLI ] Executing command: update
    2022-11-05 12:24:47.498 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
    2022-11-05 12:24:47.512 [REPO] Named source requested, found: msstore
    2022-11-05 12:24:47.513 [REPO] Named source to be updated, found: msstore
    2022-11-05 12:24:47.613 [REPO] Named source requested, found: winget
    2022-11-05 12:24:47.614 [REPO] Named source to be updated, found: winget
    2022-11-05 12:24:47.730 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(311)\WindowsPackageManager.dll!00007FF8035B65C7: (caller: 00007FF80361F80F) Exception(1) tid(3e70) 8051100F 
    2022-11-05 12:24:47.730 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(53)\WindowsPackageManager.dll!00007FF80372F321: (caller: 00007FF803612D1C) LogHr(1) tid(3e70) 8051100F     Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(311)\WindowsPackageManager.dll!00007FF8035B65C7: (caller: 00007FF80361F80F) Exception(1) tid(3e70) 8051100F ] 
    
    2022-11-05 12:24:47.730 [REPO] Source add/update failed, waiting a bit and retrying: winget
    2022-11-05 12:24:49.744 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(311)\WindowsPackageManager.dll!00007FF8035B65C7: (caller: 00007FF80361F80F) Exception(2) tid(3e70) 8051100F 
    2022-11-05 12:24:49.744 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(634)\WindowsPackageManager.dll!00007FF80372EF51: (caller: 00007FF80353B8F3) LogHr(2) tid(3e70) 8051100F     Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\MsixInfo.cpp(311)\WindowsPackageManager.dll!00007FF8035B65C7: (caller: 00007FF80361F80F) Exception(2) tid(3e70) 8051100F ] 
    
    2022-11-05 12:24:49.744 [REPO] Failed to update source: winget
    2022-11-05 12:24:49.970 [CLI ] Leaf command succeeded: root:source:update
    
    

    An emtpy file named D:\a did exist at some point, but I deleted it, which didn't change anything.

    The sources seem correct:

    winget source list
    Name    Argument
    -----------------------------------------------------
    msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
    winget  https://cdn.winget.microsoft.com/cache
    
  10. lameth007 commented on Nov 5, 2022

    @lameth007

    Same issue here , started 2 days ago. No changes to the system. I see a lot of people commenting, but does anyone know why this is happening?

  11. Hitmanforrent commented on Nov 5, 2022

    @Hitmanforrent

    I have also been having this issue lately

    Windows: Windows.Desktop v10.0.22621.755
    System Architecture: X64
    Package: Microsoft.DesktopAppInstaller v1.19.2161.0
    
    Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
    
  12. 33 remaining items

  13. byte2pixel commented on Apr 8, 2024

    @byte2pixel

    Ok solution for me was:

    • Open the Microsoft Store
    • Click Library
    • Scroll through and find App Installer
    • Double click App Installer
    • It opens the apps page and interestingly enough the "open" or "install/update" button was not there for a second
    • A second later it started to download/update but it said there was an error
    • I clicked "details" and it basically said it couldn't update while the app was open.
    • I closed the micrsoft store and terminal windows
    • I reopened microsoft store
    • clicked library
    • Now at the top it shows App Installer and says there is an update available.
    • Click the update button.
    • It will drop down into the list with the rest of the apps and say it was updated moments ago.
    • open terminal again and try winget command and it works now.
  14. Frxhb commented on Apr 8, 2024

    @Frxhb

    ALL This is what helped me:

    After your fresh Windows installation (via usb flash drive, MECM...) run the following script:

    $winget = $null
    $DesktopAppInstaller = "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe"
    $SystemContext = Resolve-Path "$DesktopAppInstaller"
    if ($SystemContext) { $SystemContext = $SystemContext[-1].Path }
    $UserContext = Get-Command winget.exe -ErrorAction SilentlyContinue
    if ($UserContext) { $winget = $UserContext.Source }
    elseif (Test-Path "$SystemContext\AppInstallerCLI.exe") { $winget = "$SystemContext\AppInstallerCLI.exe" }
    elseif (Test-Path "$SystemContext\winget.exe") { $winget = "$SystemContext\winget.exe" }
    else { return $false }
    
    Start-Process -FilePath $winget -ArgumentList "install --id '9NBLGGH4NNS1' --silent --accept-package-agreements --accept-source-agreements --source msstore --scope machine"

    Now WinGet should work...

  15. pierrecorsini commented on May 15, 2024

    @pierrecorsini

    Ok solution for me was:

    • Open the Microsoft Store
    • Click Library
    • Scroll through and find App Installer
    • Double click App Installer

    Updating the App Installe simply worked in my case !..

  16. modified the milestones: , 1.8 Client on Jun 11, 2024
  17. denelon commented on Jun 11, 2024

    @denelon
    Collaborator

    We've addressed the various reported issues related to the CDN and source updates. In the vast majority of cases, the solution is to update WinGet to the latest stable version. In other cases, network issues were the culprit.

    Users can upgrade the App Installer via the Microsoft Store, run Repair-WinGetPackageManager -Latest -Force using the Microsoft.WinGet.Client PowerShell module, or follow the manual instructions on Microsoft Learn for bootstrapping the WIndows Sandbox. https://learn.microsoft.com/windows/package-manager/winget/#install-winget-on-windows-sandbox

  18. huyz commented on Jun 12, 2024

    @huyz

    We've addressed the various reported issues related to the CDN and source updates

    Apparently not from all countries. I still always have to VPN

  19. Frxhb commented on Jun 13, 2024

    @Frxhb

    Users can upgrade the App Installer via the Microsoft Store, run Repair-WinGetPackageManager -Latest -Force using the Microsoft.WinGet.Client PowerShell module, or follow the manual instructions on Microsoft Learn for bootstrapping the WIndows Sandbox. https://learn.microsoft.com/windows/package-manager/winget/#install-winget-on-windows-sandbox

    When running:

    Repair-WinGetPackageManager -Latest -Force

    I receive:

     Name                           Version          Source           Summary                                   
    ----                           -------          ------           -------                                   
    nuget                          2.8.5.208        https://onege... NuGet provider for the OneGet meta-pack...
    Repair-WinGetPackageManager : Es wurde kein Parameter gefunden, der dem Parameternamen "Force" entspricht.
    In Zeile:8 Zeichen:37
    + Repair-WinGetPackageManager -Latest -Force
    

    Which means:

     Repair-WinGetPackageManager : No parameter was found that corresponds to the parameter name "Force".
    In line:8 characters:37
    + Repair-WinGetPackageManager -Latest -Force 
    

    When running without parameter or just with -Latest, I receive:

     PS C:\Users\Administrator> Repair-WinGetPackageManager
    -1
    
    PS C:\Users\Administrator> Repair-WinGetPackageManager -Latest
    -1 
    
  20. fawwazanvilen commented on Jul 3, 2024

    @fawwazanvilen

    Ok solution for me was:

    • Open the Microsoft Store
    • Click Library
    • Scroll through and find App Installer
    • Double click App Installer
    • It opens the apps page and interestingly enough the "open" or "install/update" button was not there for a second
    • A second later it started to download/update but it said there was an error
    • I clicked "details" and it basically said it couldn't update while the app was open.
    • I closed the micrsoft store and terminal windows
    • I reopened microsoft store
    • clicked library
    • Now at the top it shows App Installer and says there is an update available.
    • Click the update button.
    • It will drop down into the list with the rest of the apps and say it was updated moments ago.
    • open terminal again and try winget command and it works now.

    I can't believe this worked for me oh my god

  21. conor-joplin commented on Jul 8, 2024

    @conor-joplin

    I hit this error today. For me, simply running winget upgrade Microsoft.AppInstaller, then closing the shell, then re-opening and running winget source update fixed the issue.

  22. MaksimZadar commented on Jul 23, 2024

    @MaksimZadar

    Hey guys not sure if this helps, but I was missing a dependency package which is needed in newer versions of winget. I ran this command: winget install Microsoft.UI.Xaml.2.8 then winget upgrade Microsoft.AppInstaller --accept-package-agreements --accept-source-agreements --force and that updated successfully. After that running winget source update worked perfectly!

  23. stephaneerard commented on Apr 11, 2025

    @stephaneerard

    The name of the app has changed. It is no "Microsoft.AppInstaller" but something else.

    This worked 👍

     winget install -s msstore --id 9NBLGGH4NNS1 --force --accept-package-agreements --accept-source-agreements

    Do not forget the --force flag or will do nothing

  24. lxwulf commented on Apr 11, 2025

    @lxwulf

    The name of the app has changed. It is no "Microsoft.AppInstaller" but something else.

    This worked 👍

    winget install -s msstore --id 9NBLGGH4NNS1 --force --accept-package-agreements --accept-source-agreements
    Do not forget the --force flag or will do nothing

    Stéphane Erard (@stephaneerard) This got me nuts, thank you very much!

  25. konradw-dev commented on Oct 30, 2025

    @konradw-dev

    Ok solution for me was:

    • Open the Microsoft Store
    • Click Library
    • Scroll through and find App Installer
    • Double click App Installer
    • It opens the apps page and interestingly enough the "open" or "install/update" button was not there for a second
    • A second later it started to download/update but it said there was an error
    • I clicked "details" and it basically said it couldn't update while the app was open.
    • I closed the micrsoft store and terminal windows
    • I reopened microsoft store
    • clicked library
    • Now at the top it shows App Installer and says there is an update available.
    • Click the update button.
    • It will drop down into the list with the rest of the apps and say it was updated moments ago.
    • open terminal again and try winget command and it works now.

    Still a solution to this problem in 2025. smh. I did have to completely reboot (and in the interest of full disclosure, enter my Bitlocker key--hopefully unrelated) after the Microsoft Store update, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-SourceIssue-Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions