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

Cannot add new source in winget #3927

Open
KaiHuaDou opened this issue Nov 26, 2023 · 12 comments
Open

Cannot add new source in winget #3927

KaiHuaDou opened this issue Nov 26, 2023 · 12 comments
Labels
Command-Source Issue related to WinGet Source Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@KaiHuaDou
Copy link

KaiHuaDou commented Nov 26, 2023

Brief description of your issue

I try to use a mirror winget source.
So I first delete the source winget.

winget source remove winget

It runs well. Then I run command

winget source add winget https://mirrors.ustc.edu.cn/winget-source

It download all of 4.62MB datas, then when the add process bar shows, it says

执行此命令时发生意外错误:
Operation failed: 从  (Microsoft.Winget.Source_8wekyb3d8bbwe.msix)  使用程序包 Microsoft.Winget.Source_2023.1126.430.462_neutral__8wekyb3d8bbwe 中的目标卷 C: 执行的部署 Add 操作失败,错误为 0x8007065E。有关诊断应用部署问题的帮助,请参阅 http://go.microsoft.com/fwlink/?LinkId=235160。
0x8007065e

The error code is not contains in neither the link provide or the winget help page.

According to the error message, it may be an MSIX installation error. So I installed a few more MSIX packages,but get no problems.

Then I update my winget to preview version, the bug stills.

Steps to reproduce

Run these commands:

winget source remove winget
winget source add winget https://mirrors.ustc.edu.cn/winget-source

Expected behavior

The new source is added.

Actual behavior

The new source is not added.

Environment

I update it to preview to check if problem still

Windows 程序包管理器(预览) v1.7.3172-preview
版权所有 (C) Microsoft Corporation。保留所有权利。

Windows: Windows.Desktop v10.0.19045.3516
系统体系结构: X64
软件包: Microsoft.DesktopAppInstaller v1.22.3172.0

Winget 目录
-------------------------------------------------------------------------------------------------------------------
日志                   %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
用户设置               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
可移植链接目录(用户)   %LOCALAPPDATA%\Microsoft\WinGet\Links
可移植链接目录(计算机) C:\Program Files\WinGet\Links
可移植包根目录(用户)   D:/Program Files/Packages
可移植包根目录         C:\Program Files\WinGet\Packages
可移植包根目录 (x86)   C:\Program Files (x86)\WinGet\Packages
安装程序下载           %USERPROFILE%\Downloads

链接
----------------------------------------------------------------------------
隐私声明             https://aka.ms/winget-privacy
许可协议             https://aka.ms/winget-license
第三方声明           https://aka.ms/winget-3rdPartyNotice
主页                 https://aka.ms/winget
Windows 应用商店条款 https://www.microsoft.com/en-us/storedocs/terms-of-sale

管理员设置                                状态
------------------------------------------------
LocalManifestFiles                        已禁用
BypassCertificatePinningForMicrosoftStore 已禁用
InstallerHashOverride                     已启用
LocalArchiveMalwareScanOverride           已禁用
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Nov 26, 2023
@stephengillie stephengillie added Issue-Bug It either shouldn't be doing this or needs an investigation. Command-Source Issue related to WinGet Source and removed Needs-Triage Issue need to be triaged labels Nov 27, 2023
@denelon
Copy link
Contributor

denelon commented Nov 29, 2023

What do you get for winget source list or winget source export after attempting to add the source?

I didn't see the type being specified in the command. If this isn't a REST source, you would need to specify the type.

@KaiHuaDou
Copy link
Author

It should be a REST source since it mirrors the official winget source. Since adding the source failed, there is only "msstore" in the source list.

C:\Users\Administrator>winget source remove winget
正在删除源: winget...
完成

C:\Users\Administrator>winget source add winget https://mirrors.ustc.edu.cn/winget-source
正在添加源:
  winget -> https://mirrors.ustc.edu.cn/winget-source
                                  0%
执行此命令时发生意外错误:
Operation failed: 从  (Microsoft.Winget.Source_8wekyb3d8bbwe.msix)  使用程序包 Microsoft.Winget.Source_2023.1130.903.262_neutral__8wekyb3d8bbwe 中的目标卷 C: 执行的部署 Add 操作失败,错误为 0x8007065E。有关诊断应用部署问题的帮助,请参阅 http://go.microsoft.com/fwlink/?LinkId=235160。
0x8007065e : ͵ݲ֧֡

C:\Users\Administrator>winget source list
名称    参数
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0

C:\Users\Administrator>winget source export
{"Arg":"https://storeedgefd.dsx.mp.microsoft.com/v9.0","Data":"","Identifier":"StoreEdgeFD","Name":"msstore","Type":"Microsoft.Rest"}

@denelon
Copy link
Contributor

denelon commented Dec 4, 2023

If you run winget source reset --force as an administrator it should add the default source back, and it's not a REST source it's a PreIndexed package.

@KaiHuaDou
Copy link
Author

The default source is not avaliable in my network.
I run the command with the type:

C:\Windows\System32# winget source add -t Microsoft.PreIndexed.Package -n ustc https://mirrors.ustc.edu.cn/winget-source
正在添加源:
  ustc -> https://mirrors.ustc.edu.cn/winget-source
                                  0%
执行此命令时发生意外错误:
Operation failed: 从  (Microsoft.Winget.Source_8wekyb3d8bbwe.msix)  使用程序包 Microsoft.Winget.Source_2023.1207.1045.227_neutral__8wekyb3d8bbwe 中的目标卷 C: 执行的部署 Add 操作失败,错误为 0x8007065E。有关诊断应用部署问题的帮助,请参阅 http://go.microsoft.com/fwlink/?LinkId=235160。
0x8007065e : ͵ݲ֧֡

the error still.

@Trenly
Copy link
Contributor

Trenly commented Mar 6, 2024

@KaiHuaDou - Do you still see this issue on the latest release of WinGet? It seems to be resolved for me

PS C:\WINDOWS\system32> winget source add -t Microsoft.PreIndexed.Package -n ustc https://mirrors.ustc.edu.cn/winget-source
Adding source:
  ustc -> https://mirrors.ustc.edu.cn/winget-source
  ██████████████████████████████  100%
Done
PS C:\WINDOWS\system32> winget source list
Name    Argument
-----------------------------------------------------
ustc    https://mirrors.ustc.edu.cn/winget-source
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache
PS C:\WINDOWS\system32> winget -v
v1.7.10582

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback Issue needs attention from issue or PR author label Mar 6, 2024
@KaiHuaDou
Copy link
Author

KaiHuaDou commented Mar 7, 2024

It might be my problem.

D:\> winget source add -t Microsoft.PreIndexed.Package -n ustc https://mirrors.ustc.edu.cn/winget-source
正在添加源:
  ustc -> https://mirrors.ustc.edu.cn/winget-source
                                  0%
执行此命令时发生意外错误:
Operation failed: 从  (Microsoft.Winget.Source_8wekyb3d8bbwe.msix)  使用程序包 Microsoft.Winget.Source_2024.307.919.35_neutral__8wekyb3d8bbwe 中的目标卷 C: 执行的部署 Add 操作失败,错误为 0x8007065E。有关诊断应用部署问题的帮助,请参阅 http://go.microsoft.com/fwlink/?LinkId=2351600x8007065e : ������͵����ݲ���֧�֡�
D:\> winget -v
v1.7.10582

Also, I should run the command twice to get this result, it always produce a 0x80072f7d(which always means network problem in msix) at first, then produce 0x8007065E and the message of failure.

D:\> winget source add -t Microsoft.PreIndexed.Package -n ustc https://mirrors.ustc.edu.cn/winget-source
正在添加源:
  ustc -> https://mirrors.ustc.edu.cn/winget-source
执行此命令时发生意外错误:
0x80072f7d : unknown error

Also, reset winget settings and run Import-Module Appx -usewindowspowershell does not help it at all.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention Issue needs attention from Microsoft and removed Needs-Author-Feedback Issue needs attention from issue or PR author labels Mar 7, 2024
@Trenly
Copy link
Contributor

Trenly commented Mar 7, 2024

Is it possible there is a firewall or network rule preventing connection to USTC? Have you tried using a VPN at all?

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback Issue needs attention from issue or PR author label Mar 7, 2024
@KaiHuaDou
Copy link
Author

The network is very well, I can even download source.msix by myself and install it.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Author-Feedback Issue needs attention from issue or PR author label Mar 7, 2024
@Trenly
Copy link
Contributor

Trenly commented Mar 7, 2024

Interesting. Have you by any chance tried changing the Winget Downloader Setting to see if that makes any difference?

@KaiHuaDou
Copy link
Author

This is the log, it seems is the security channel problem: WinGet-2024-03-07-23-16-34.026.log

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Attention Issue needs attention from Microsoft label Mar 7, 2024
@KaiHuaDou
Copy link
Author

I try to set the downloader to wininet and do, fails again.
I think it might be a MSIX installation problem, because winget downloads source.msix and try to addit to somewhere.

@Trenly
Copy link
Contributor

Trenly commented Mar 7, 2024

Secure Channel Support Error generally occurs when there is no common TLS version between the source IP and destination IP.

I see in a separate issue someone checked which TLS options were enabled on their computer which resolved a similar issue for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Source Issue related to WinGet Source Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

4 participants