Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install failed: An internal error occurred with error 0x800700B7 #1097

Closed
AskAlice opened this issue Jun 3, 2021 · 20 comments
Closed

Install failed: An internal error occurred with error 0x800700B7 #1097

AskAlice opened this issue Jun 3, 2021 · 20 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@AskAlice
Copy link

AskAlice commented Jun 3, 2021

Brief description of your issue

winget install wingetcreate fails

Steps to reproduce

not really sure. All i did was run winget install wingetcreate

Found Windows Package Manager Manifest Creator [Microsoft.WingetCreate]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
  ██████████████████████████████  96%
Install failed: An internal error occurred with error 0x800700B7. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
0x800700b7 : Cannot create a file when that file already exists.

Expected behavior

it didn't fail.

Actual behavior

it failed.

 💖❯  winget install wingetcreate       
Found Windows Package Manager Manifest Creator [Microsoft.WingetCreate]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
  ██████████████████████████████  96%
Install failed: An internal error occurred with error 0x800700B7. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
0x800700b7 : Cannot create a file when that file already exists.
 💖❯  Get-Command wingetcreate
Get-Command : The term 'wingetcreate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-Command wingetcreate
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (wingetcreate:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

Environment

Windows Package Manager Manifest Creator version? (wingetcreate.exe -?)
n/a
Any other software?
Windows 10 Build 21390.1
@denelon
Copy link
Contributor

denelon commented Jun 3, 2021

@AskAlice can you share the output from winget --info. I'm wondering what version of the client you have.

@denelon denelon transferred this issue from microsoft/winget-create Jun 3, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Jun 3, 2021
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback Issue needs attention from issue or PR author and removed Needs-Triage Issue need to be triaged labels Jun 3, 2021
@iDolmatov
Copy link

What about similar commands?
winget list --id wingetcreate
winget upgrade wingetcreate
winget uninstall wingetcreate

@denelon
Copy link
Contributor

denelon commented Jun 3, 2021

@iDolmatov winget list doesn't support "filtering" by manifest metadata yet. There is a feature on the backlog.

@iDolmatov
Copy link

iDolmatov commented Jun 3, 2021

@iDolmatov winget list doesn't support "filtering" by manifest metadata yet. There is a feature on the backlog.

image

If the application is missing or removed, then this is how:

PS C:\Users\Dolma> winget uninstall wingetcreate
Найдено Windows Package Manager Manifest Creator [Microsoft.WingetCreate]
Запуск удаления пакета...
██████████████████████████████ 100%
Удалено
PS C:\Users\Dolma> winget list --id wingetcreate
Не найдены установленные пакеты, соответствующие введенным условиям.

@denelon
Copy link
Contributor

denelon commented Jun 3, 2021

@iDolmatov I stand corrected and very happy!

I think the team may have forgotten to update the status on the feature 😃. I'll go double check and update if it's complete.

@AskAlice
Copy link
Author

AskAlice commented Jun 3, 2021

 💖❯  winget --info
Windows Package Manager v1.0.11451
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.21390.1
Package: Microsoft.DesktopAppInstaller v1.11.11451.0

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

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
 💖❯  winget uninstall wingetcreate
No installed package found matching input criteria.

@ghost ghost added Needs-Attention Issue needs attention from Microsoft and removed Needs-Author-Feedback Issue needs attention from issue or PR author labels Jun 3, 2021
@denelon denelon removed the Needs-Attention Issue needs attention from Microsoft label Jun 3, 2021
@denelon
Copy link
Contributor

denelon commented Jun 3, 2021

@AskAlice OK, so you are on the current version. What do you get from winget list wingetcreate? On my machine with the tool installed, I see:

PS C:\Users\denelon> winget list wingetcreate
Name                                     Id                     Version
-----------------------------------------------------------------------
Windows Package Manager Manifest Creator Microsoft.WingetCreate 0.1.0.1

@AskAlice
Copy link
Author

AskAlice commented Jun 3, 2021

 💖❯  winget list wingetcreate
No installed package found matching input criteria.

@AskAlice
Copy link
Author

AskAlice commented Jun 3, 2021

2021-06-03 17:37:44.168 [CORE] Subkey 'Software\Policies\Microsoft\Windows\AppInstaller' was not found
2021-06-03 17:37:44.168 [CORE] Setting action: Get, Type: UserFile, Name: settings.json
2021-06-03 17:37:44.175 [CORE] Setting action: Get, Type: UserFile, Name: settings.json.backup
2021-06-03 17:37:44.182 [CORE] Valid settings file not found. Using default values.
2021-06-03 17:37:44.182 [CORE] WinGet, version [1.0.11451], activity [{01DC6B3F-6071-4D6A-BD19-95EC43294C55}]
2021-06-03 17:37:44.183 [CORE] OS: Windows.Desktop v10.0.21390.1
2021-06-03 17:37:44.183 [CORE] Command line Args: "C:\Users\alice\AppData\Local\Microsoft\WindowsApps\winget.exe" install wingetcreate
2021-06-03 17:37:44.183 [CORE] Package: Microsoft.DesktopAppInstaller v1.11.11451.0
2021-06-03 17:37:44.187 [CLI ] WinGet invoked with arguments: 'install' 'wingetcreate'
2021-06-03 17:37:44.188 [CLI ] Found subcommand: install
2021-06-03 17:37:44.188 [CLI ] Leaf command to execute: root:install
2021-06-03 17:37:44.188 [CLI ] Executing command: install
2021-06-03 17:37:44.188 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2021-06-03 17:37:44.193 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2021-06-03 17:37:44.193 [REPO] Default source requested, only 1 source available, using the only source: winget
2021-06-03 17:37:44.193 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2021-06-03 17:37:44.193 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2021-06-03 17:37:44.193 [REPO] Named source requested, found: winget
2021-06-03 17:37:44.207 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2021-06-03 17:37:44.207 [CORE] Found matching extension.
2021-06-03 17:37:44.240 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2021.603.2323.258_neutral__8wekyb3d8bbwe\Public\index.db'
2021-06-03 17:37:44.240 [SQL ] Opening SQLite connection: 'file:/C:/Program Files/WindowsApps/Microsoft.Winget.Source_2021.603.2323.258_neutral__8wekyb3d8bbwe/Public/index.db?immutable=1' [1, 40]
2021-06-03 17:37:44.241 [REPO] Opened SQLite Index with version [1.3], last write [2021-06-03 16:23:18.000]
2021-06-03 17:37:44.294 [CLI ] Found one app. App id: Microsoft.WingetCreate App name: Windows Package Manager Manifest Creator
2021-06-03 17:37:44.296 [REPO] Downloading manifest
2021-06-03 17:37:44.296 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/m/Microsoft/WingetCreate/0.1.0.1/d664-Microsoft.WingetCreate.yaml
2021-06-03 17:37:44.559 [CORE] Download hash: 9ee911b968d22ad12ab1a59944d0ec2ab3d7063c6bd36b15b77a35abd2f3e25c
2021-06-03 17:37:44.559 [CORE] Download completed.
2021-06-03 17:37:44.560 [CLI ] Manifest fields: Name [Windows Package Manager Manifest Creator], Version [0.1.0.1]
2021-06-03 17:37:44.562 [CLI ] Starting installer selection.
2021-06-03 17:37:44.562 [CLI ] Completed installer selection.
2021-06-03 17:37:46.781 [CLI ] Installer hash verified
2021-06-03 17:37:46.781 [CORE] Starting AddPackage operation #0: https://github.com/microsoft/winget-create/releases/download/v0.1.0.1-preview/Microsoft.WindowsPackageManagerManifestCreator_0.1.0.1_8wekyb3d8bbwe.msixbundleSkipSmartScreen: 1
2021-06-03 17:37:46.784 [CORE] Begin waiting for deployment #0
2021-06-03 17:37:46.784 [CORE] Begin blocking for deployment #0
2021-06-03 17:37:56.590 [CORE] Deployment failed #0: An internal error occurred with error 0x800700B7. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
2021-06-03 17:37:56.590 [FAIL] C:\BA\311\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(50)\AppInstallerCLI.exe!00007FF6FC64D949: (caller: 00007FF6FC64E0C9) Exception(1) tid(ec54) 800700B7 Cannot create a file when that file already exists.

    Msg:[Install failed: An internal error occurred with error 0x800700B7. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.] 

2021-06-03 17:37:56.591 [CLI ] MSIX installer failed: 2147942583
2021-06-03 17:37:56.591 [CLI ] Terminating context: 0x800700b7 at C:\BA\311\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:168

hopefully C:\BA\311\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:168 you can find the source for in private microsoft repos, or maybe the C:\BA\311\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(50)

It is possible some of the ACLs in my microsoft store package folders are messed up. Regardless this is an unhelpful error as I can't figure out where in the filesystem it's failing. I was hoping winget would have circumvented all of the ridiculousness that is UWP and microsoft store, I guess I was wrong.

Perhaps there is a way of using process hacker to figure out the last file it tries to access before it hits this fault?

@denelon
Copy link
Contributor

denelon commented Jun 4, 2021

@AskAlice thank you so much for the logs! I'll share this with both teams to see if we can figure out what is happening. Can you download and double-click the wingetcreate installer from the GitHub release page, or di you get the same error?

@AskAlice
Copy link
Author

AskAlice commented Jun 4, 2021

@AskAlice thank you so much for the logs! I'll share this with both teams to see if we can figure out what is happening. Can you download and double-click the wingetcreate installer from the GitHub release page, or di you get the same error?

The MSIX fails,

and the binary runs here but fails due to deps

 💖❯  .\wingetcreate.exe
The required library C:\Program Files\dotnet\host\fxr\3.1.13\hostfxr.dll does not support single-file apps.
  _ To run this application, you need to install a newer version of .NET Core.

  - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=win10-x64&apphost_version=5.0.5

@palenshus
Copy link
Contributor

Thanks! Regarding running the exe directly, you do need to have the .NET 5 runtime installed. Per microsoft/winget-create#38 we do plan to release another standalone exe which is entirely self-contained. In the meantime you should be able to install .NET to get unblocked.

Hopefully your MSIX install issue will be figured out soon too!

@AskAlice
Copy link
Author

AskAlice commented Jun 4, 2021

Thanks! Regarding running the exe directly, you do need to have the .NET 5 runtime installed. Per microsoft/winget-create#38 we do plan to release another standalone exe which is entirely self-contained. In the meantime you should be able to install .NET to get unblocked.

Hopefully your MSIX install issue will be figured out soon too!

Yeah i got the .net 5 and it works directly.

The MSIX issue has been plaguing my windows install for some time. I realize this may not be an issue with winget-cli directly, but rather the AppInstallerCommonCore or AppInstallerCLICore, which are not open source to my knowledge. I have considered reinstalling but I would love to have this fixed. I have tried using a SYSTEM elevated shell to run icacls to reset the ACLs on certain microsoft store package directories with little success. If the error told me which file it failed to edit that would be super useful.

@Guiorgy
Copy link

Guiorgy commented Jun 5, 2021

PS > winget upgrade
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x800700b7 : Cannot create a file when that file already exists.

Tried manually updating .Net 5 (as Windows update was failing with 0x80070643), and still no luck.
A subsequent reboot of Windows solved the issue!

@AskAlice
Copy link
Author

AskAlice commented Jun 5, 2021

PS > winget upgrade
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x800700b7 : Cannot create a file when that file already exists.

Tried manually updating .Net 5 (as Windows update was failing with 0x80070643), and still no luck.
A subsequent reboot of Windows solved the issue!

my issue persists through reboots

It doesn't happen with every package, i suspect only those that are appxpackages internally.

running winget upgrade shows a list of upgradeable packages for me.

 💖❯  winget install vim
Found Vim [vim.vim]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/vim/vim-win32-installer/releases/download/v8.2.2929/gvim_8.2.2929_x64.exe
  ██████████████████████████████  9.19 MB / 9.19 MB
Successfully verified installer hash
Starting package install...
Successfully installed

@Guiorgy
Copy link

Guiorgy commented Jun 6, 2021

@AskAlice, I did manually update to the latest .Net 5 SDK, Desktop Runtime, and Runtime before rebooting ¯\(ツ)

@AskAlice
Copy link
Author

AskAlice commented Jun 6, 2021

@AskAlice, I did manually update to the latest .Net 5 SDK, Desktop Runtime, and Runtime before rebooting ¯\(ツ)

I'm already on it

@adamsmith34
Copy link

Was getting 0x800700b7 : Cannot create a file when that file already exists. when issuing winget list or winget upgrade. Applied 21H1, rebooted. Resolved.

@AskAlice
Copy link
Author

AskAlice commented Jun 19, 2021

Was getting 0x800700b7 : Cannot create a file when that file already exists. when issuing winget list or winget upgrade. Applied 21H1, rebooted. Resolved.

I'm on the latest insider dev channel build so I can't easily switch over there lol :(

@denelon denelon added this to the v1.2-Client milestone Oct 1, 2021
@denelon denelon added this to To Do in Client-Bugs via automation Oct 1, 2021
@denelon denelon added this to To do in Client-Current via automation Oct 1, 2021
@denelon
Copy link
Contributor

denelon commented Oct 1, 2021

@AskAlice

We've published the v1.1 release candidate and updated our troubleshooting guide. We've also got a new release for the Windows Package Manager Manifest Creator https://github.com/microsoft/winget-create/releases/tag/v0.4.1.1-preview.

Can you confirm if this is still happening?

@denelon denelon closed this as completed Oct 1, 2021
Client-Bugs automation moved this from To Do to Done Oct 1, 2021
Client-Current automation moved this from To do to Done Oct 1, 2021
@denelon denelon removed this from Done in Client-Current Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
Development

No branches or pull requests

6 participants