microsoft / microsoft/winget-cli

Incomplete diagnosis: `0x80070057` "The parameter is incorrect" in logs. Unable to troubleshoot problems

Open
#4,190 18 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

Many winget operations such as

  • winget source update
  • winget install
  • wsreset.exe
  • opening xbox
  • installing from ms store

result in this error.

-- Disclaimer --

A lot of registry tweaks and system alterations (including many user account control changes) have been done under my discretion. While "reinstalling windows" would definitely resolve this issue, I'd like to attempt to troubleshoot this and hopefully allow winget-cli devs to make more fail safes

Steps to reproduce

Unknown

Expected behavior

Logs should give more information on logs

Actual behavior

0x80070057 in the link gives the following description:

One or more arguments are not valid. If you check the AppXDeployment-Server event log and see the following event: "While installing the package, the system failed to register the windows.repositoryExtension extension due to the following error: The parameter is incorrect."
You may get this error if the manifest elements DisplayName or Description contain characters disallowed by Windows firewall such as |, due to which Windows fails to create the AppContainer profile for the package. Please remove these characters from the manifest and try installing the package.

This is certainly not my case

Environment
Windows Package Manager v1.6.3482
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.3155
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3482.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

Relevant logs
...
2024-02-21 12:17:03.089 [CORE] Begin waiting for operation #0
2024-02-21 12:17:03.089 [CORE] Begin blocking for operation #0
2024-02-21 12:17:03.705 [CORE] Deployment operation #0: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2024.221.1852.636_neutral__8wekyb3d8bbwe from:  (Microsoft.Winget.Source_8wekyb3d8bbwe.msix)  failed with error 0x80070057. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
2024-02-21 12:17:03.705 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFCF8AD0C60: (caller: 00007FFCF8AD129F) Exception(1) tid(2824) 80070057 The parameter is incorrect.
    Msg:[Operation failed: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2024.221.1852.636_neutral__8wekyb3d8bbwe from:  (Microsoft.Winget.Source_8wekyb3d8bbwe.msix)  failed with error 0x80070057. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.] 

2024-02-21 12:17:03.716 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(95)\WindowsPackageManager.dll!00007FFCF8C5066F: (caller: 00007FFCF8B005AC) LogHr(1) tid(2824) 80070057 The parameter is incorrect.
    Msg:[C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFCF8AD0C60: (caller: 00007FFCF8AD129F) Exception(1) tid(2824) 80070057 The parameter is incorrect.
    Msg:[Operation failed: Deployment Add operation with target volume C: on Package Microsoft.Winget.Source_2024.221.1852.636_neutral__8wekyb3d8bbwe from:  (Microsoft.Winget.Source_8wekyb3d8bbwe.msix)  failed with error 0x80070057. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.] 
]
...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the deployment failure in external/pkg/src/AppInstallerCommonCore/Deployment.cpp and its propagation through external/pkg/src/AppInstallerRepositoryCore/RepositorySource.cpp. Reproduce the reported winget operations if possible and compare their logs with the AppXDeployment-Server event log. Done means the logs provide a more specific, actionable diagnosis than the generic 0x80070057 message.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.