microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.35k stars 1.45k forks source link

Winget not work if used in a Network with CISCO Umbrella #2109

Open Mannshoch opened 2 years ago

Mannshoch commented 2 years ago

Brief description of your issue

Discussion: https://github.com/microsoft/winget-cli/discussions/1903#discussion-3855105

If I run winget list it spins shortly and then the command line turns blue, without any output. grafik

If I remove this source Winget works. https://winget.azureedge.net/cache

I suppose a problem with a pinned Certificate

Steps to reproduce

Use Cisco Umbrella, or Is suppose a kind of SSL MITM

Expected behavior

Best case: SSL Certificate Error. We suppose a Man-in-the-middle attack If you wish to procceed type "yes"

Second best: SSL Certificate Error. We suppose a Man-in-the-middle attack If you wish to procceed enter "winget settings" and add "SSL": {"AllowMITM":TRUE}

Worse case: Windwos Dialog Popup: Error XXXXX do you want proceed? 😉

Actual behavior

Command prompt turns blue

Environment

Windows-Paket-Manager v1.2.10271
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.19044.1586
Paket: Microsoft.DesktopAppInstaller v1.17.10271.0

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

Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung              https://aka.ms/winget-privacy
Lizenzvereinbarung                https://aka.ms/winget-license
Hinweise von Drittanbietern       https://aka.ms/winget-3rdPartyNotice
Startseite                        https://aka.ms/winget
Windows Store Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale
denelon commented 2 years ago

@Mannshoch,

Could you provide verbose logs to help us understand what is happening?

winget list --verbose-logs

Mannshoch commented 2 years ago

In the directory %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\ there is no subdirectory LocalState.

PS C:\Programdata\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe> winget list --verbose-logs
  /
PS C:\Programdata\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe> ls

    Verzeichnis: C:\Programdata\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        23.03.2022     08:31                S-1-5-21-1275210071-1220945662-839522115-159835
d-----        08.08.2019     11:45                S-1-5-21-1275210071-1220945662-839522115-97329
d-----        07.08.2019     08:07                S-1-5-21-1864736595-4157607759-1558103699-1001
d-----        08.08.2019     09:03                S-1-5-21-3540339057-15633570-4212308159-1009
d-----        18.03.2022     08:44                S-1-5-21-3540339057-15633570-4212308159-1026

PS C:\Programdata\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe>
jedieaston commented 2 years ago

That's ProgramData.

Try looking in C:\Users\\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\

Mannshoch commented 2 years ago
2022-04-21 17:15:18.498 [CORE] WinGet, version [1.2.10271], activity [{3567FA99-D2A5-4D38-B3C0-C6D2E196DD67}]
2022-04-21 17:15:18.498 [CORE] OS: Windows.Desktop v10.0.19044.1586
2022-04-21 17:15:18.498 [CORE] Command line Args: "C:\Users\admin\AppData\Local\Microsoft\WindowsApps\winget.exe" list --verbose-logs
2022-04-21 17:15:18.498 [CORE] Package: Microsoft.DesktopAppInstaller v1.17.10271.0
2022-04-21 17:15:18.498 [CORE] IsCOMCall:0; Caller: winget-cli
2022-04-21 17:15:18.514 [CLI ] WinGet invoked with arguments: 'list' '--verbose-logs'
2022-04-21 17:15:18.514 [CLI ] Found subcommand: list
2022-04-21 17:15:18.514 [CLI ] Leaf command to execute: root:list
2022-04-21 17:15:18.514 [CLI ] Executing command: list
2022-04-21 17:15:18.518 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-04-21 17:15:18.519 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-04-21 17:15:18.519 [YAML] Detected UTF-8
2022-04-21 17:15:18.520 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2022-04-21 17:15:18.520 [REPO] Default source requested, multiple sources available, adding all to source references.
2022-04-21 17:15:18.520 [REPO] Adding to source references msstore
2022-04-21 17:15:18.521 [REPO] Adding to source references winget
2022-04-21 17:15:18.521 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-04-21 17:15:18.521 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-04-21 17:15:18.521 [YAML] Detected UTF-8
2022-04-21 17:15:18.521 [REPO] Source past auto update time [5 mins]; it has been at least 547 mins
2022-04-21 17:15:18.521 [CORE] Setting action: Set, Type: Standard, Name: sources_metadata
2022-04-21 17:15:18.523 [REPO] Source past auto update time [5 mins]; it has been at least 27509235 mins
denelon commented 2 years ago

Does winget source reset do anything, or is that also blocked?

Mannshoch commented 2 years ago

Winget source reset --force work without problem. Without force it not work.