microsoft / microsoft/winget-cli

Not enable to install package when %temp% set to RAMDisk

Open
#5,484 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Brief description of your issue

the same problem with #4520 , I open this new issue because

  1. the extraction is not failed actually
  2. the problem is still exist with the latest version (v1.10.390)

as the log provided below, after downloaded and extracted archive successfully, it threw std::exception: weakly_canonical: 函数不正确。
I've narrowed down the issue inside the VerifyAndSetNestedInstaller function.
Here is a similar problem on the internet: https://github.com/TianZerL/Anime4KCPP/issues/69
This commit fixed above problem: https://github.com/TianZerL/Anime4KCPP/commit/a900a62abcf70ab9b26a4da44bac38c572ad2bbc

code screenshots

Image

Image

Image

Image

Steps to reproduce

Install ImDisk Toolkit and setup RAMdisk
winget install any package not managed by msstore

Expected behavior

packaged installed successful

Actual behavior
2025-05-27 22:09:58.442 [CORE] WinGet, version [1.10.390], activity [{00F2D4C2-5C85-4AB9-9713-8BF4A1B78C33}]
2025-05-27 22:09:58.443 [CORE] OS: Windows.Desktop v10.0.22631.5335
2025-05-27 22:09:58.443 [CORE] Command line Args: "C:\Users\zhuxx\AppData\Local\Microsoft\WindowsApps\winget.exe" install ffmpeg
2025-05-27 22:09:58.443 [CORE] Package: Microsoft.DesktopAppInstaller v1.25.390.0
2025-05-27 22:09:58.443 [CORE] IsCOMCall:0; Caller: winget-cli
2025-05-27 22:09:58.461 [CLI ] WinGet invoked with arguments: 'install' 'ffmpeg'
2025-05-27 22:09:58.461 [CLI ] Found subcommand: install
2025-05-27 22:09:58.461 [CLI ] Leaf command to execute: root:install
2025-05-27 22:09:58.469 [CLI ] Executing command: install
2025-05-27 22:09:58.476 [REPO] Default source requested, multiple sources available, adding all to source references.
2025-05-27 22:09:58.476 [REPO] Adding to source references msstore
2025-05-27 22:09:58.476 [CORE] Default proxy is not set
2025-05-27 22:09:58.476 [REPO] REST HTTP Client helper does not use proxy
2025-05-27 22:09:58.476 [REPO] Adding to source references winget
2025-05-27 22:09:58.477 [CLI ] Created authentication arguments. Mode: silentPreferred, Account: 
2025-05-27 22:09:58.489 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2025-05-27 22:09:58.490 [CORE] Found matching extension.
2025-05-27 22:09:58.493 [REPO] Source `winget` after auto update time [15 mins]; it has been at least 1198 mins
2025-05-27 22:09:58.498 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2025-05-27 22:09:58.498 [CORE] Found matching extension.
2025-05-27 22:09:58.845 [CORE] Downloading to path: X:\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2025-05-27 22:09:58.845 [CORE] Started applying motw to X:\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2025-05-27 22:09:58.848 [CORE] Finished applying motw
2025-05-27 22:09:58.848 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source2.msix
2025-05-27 22:10:00.295 [CORE] Download hash: 1bf89ad8b27718a8d6a0eb71b9f62716a2d5e949947933f8d427c6e272641837
2025-05-27 22:10:00.295 [CORE] Download completed.
2025-05-27 22:10:00.423 [CORE] Started trust validation of msix at: X:\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2025-05-27 22:10:00.470 [CORE] Result for certificate chain validation of Microsoft origin: 0
2025-05-27 22:10:00.524 [CORE] Result for trust info validation of the msix: 0
2025-05-27 22:10:00.524 [CORE] Starting AddPackage operation #0: file:///X:/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix Options:  { SkipReputationCheck = 1, ExpectedDigests = {} }
2025-05-27 22:10:00.527 [CORE] Begin waiting for operation #0
2025-05-27 22:10:00.528 [CORE] Begin blocking for operation #0
2025-05-27 22:10:02.313 [CORE] Successfully completed #0
2025-05-27 22:10:02.324 [REPO] Multiple sources available, creating aggregated source.
2025-05-27 22:10:02.324 [REPO] Adding to aggregated source: msstore
2025-05-27 22:10:02.324 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2025-05-27 22:10:03.532 [REPO] Response status: 200
2025-05-27 22:10:03.532 [REPO] Authentication node not found. Assuming authentication type none.
2025-05-27 22:10:03.532 [REPO] Adding to aggregated source: winget
2025-05-27 22:10:03.539 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2025-05-27 22:10:03.539 [CORE] Found matching extension.
2025-05-27 22:10:03.570 [REPO] Opening database for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2025.527.1457.20_neutral__8wekyb3d8bbwe\Public\index.db'
2025-05-27 22:10:03.570 [SQL ] Opening SQLite connection #1: 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2025.527.1457.20_neutral__8wekyb3d8bbwe\Public\index.db' [1, 40]
2025-05-27 22:10:03.571 [REPO] Opened SQLite Index with version [2.0], last write [2025-05-27 21:56:10.000]
2025-05-27 22:10:03.605 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2025-05-27 22:10:03.605 [SQL ] Opening SQLite connection #2: ':memory:' [6, 0]
2025-05-27 22:10:03.609 [REPO] Reading MSI UpgradeCodes
2025-05-27 22:10:04.042 [REPO] Reading MSI UpgradeCodes
2025-05-27 22:10:04.768 [SQL ] Opening SQLite connection #3: ':memory:' [6, 0]
2025-05-27 22:10:05.035 [REPO] Opening database for ReadWrite at 'C:\Users\zhuxx\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db'
2025-05-27 22:10:05.035 [SQL ] Opening SQLite connection #4: 'C:\Users\zhuxx\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db' [2, 0]
2025-05-27 22:10:05.037 [REPO] Opened SQLite Index with version [1.5], last write [2025-05-11 01:12:44.000]
2025-05-27 22:10:05.041 [REPO] Sending http POST request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch
2025-05-27 22:10:06.182 [REPO] Response status: 200
2025-05-27 22:10:06.186 [REPO] Opening database for ReadWrite at 'C:\Users\zhuxx\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2025-05-27 22:10:06.186 [SQL ] Opening SQLite connection #5: 'C:\Users\zhuxx\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db' [2, 0]
2025-05-27 22:10:06.188 [REPO] Opened SQLite Index with version [1.3], last write [2025-05-27 02:11:57.000]
2025-05-27 22:10:06.194 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/packages/Gyan.FFmpeg/8325d6bc/versionData.mszyml
2025-05-27 22:10:06.716 [CORE] Download hash: 8325d6bce664f5a2d6680704296e76544556488ec79794d67dd8c294d8bcdf5d
2025-05-27 22:10:06.716 [CORE] Download completed.
2025-05-27 22:10:06.783 [REPO] Found multiple results for Id [Gyan.FFmpeg] in tracking catalog for: winget
2025-05-27 22:10:06.784 [CLI ] Found one app. App id: Gyan.FFmpeg App name: FFmpeg
2025-05-27 22:10:06.791 [REPO] Attempting to open pinning database: C:\Users\zhuxx\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db
2025-05-27 22:10:06.791 [REPO] ... opening existing pinning database
2025-05-27 22:10:06.791 [REPO] Opening database for Read at 'C:\Users\zhuxx\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2025-05-27 22:10:06.791 [SQL ] Opening SQLite connection #6: 'C:\Users\zhuxx\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db' [1, 0]
2025-05-27 22:10:06.793 [REPO] Opened Pinning Index with version [1.0], last write [2023-09-25 12:54:36.000]
2025-05-27 22:10:06.793 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/g/Gyan/FFmpeg/7.1.1/414d
2025-05-27 22:10:07.051 [CORE] Download hash: ff6da3cea331662a98671ccaf1290da69f0f80e074e8d2e19a83e7ed08c6155b
2025-05-27 22:10:07.051 [CORE] Download completed.
2025-05-27 22:10:07.053 [CLI ] Manifest fields: Name [FFmpeg], Version [7.1.1]
2025-05-27 22:10:07.077 [CLI ] Generated temp download path: X:\Temp\WinGet\Gyan.FFmpeg.7.1.1\d760e1b3574402ed18b4865851f87d87e73965a982e6453212df8621fed1c508
2025-05-27 22:10:07.077 [CLI ] Installer download headers: 
2025-05-27 22:10:07.078 [CORE] Downloading to path: X:\Temp\WinGet\Gyan.FFmpeg.7.1.1\d760e1b3574402ed18b4865851f87d87e73965a982e6453212df8621fed1c508
2025-05-27 22:10:07.078 [CORE] DeliveryOptimization downloading from url: https://github.com/GyanD/codexffmpeg/releases/download/7.1.1/ffmpeg-7.1.1-full_build.zip
2025-05-27 22:11:52.490 [CORE] Download completed.
2025-05-27 22:11:52.761 [CORE] Started applying motw to X:\Temp\WinGet\Gyan.FFmpeg.7.1.1\d760e1b3574402ed18b4865851f87d87e73965a982e6453212df8621fed1c508 with zone: 3
2025-05-27 22:11:52.763 [CORE] Finished applying motw
2025-05-27 22:11:52.763 [CLI ] Installer hash verified
2025-05-27 22:11:52.763 [CORE] Started applying motw to X:\Temp\WinGet\Gyan.FFmpeg.7.1.1\d760e1b3574402ed18b4865851f87d87e73965a982e6453212df8621fed1c508 with zone: 2
2025-05-27 22:11:52.772 [CORE] Finished applying motw
2025-05-27 22:11:52.773 [CLI ] Successfully renamed downloaded installer. Path: X:\Temp\WinGet\Gyan.FFmpeg.7.1.1\ffmpeg-7.1.1-full_build.zip
2025-05-27 22:11:52.885 [CLI ] Extracting archive to: X:\Temp\WinGet\Gyan.FFmpeg.7.1.1\extracted
2025-05-27 22:12:10.609 [CLI ] Successfully extracted archive
2025-05-27 22:12:10.611 [CLI ] Caught std::exception: weakly_canonical: 函数不正确。: "X:\Temp\WinGet\Gyan.FFmpeg.7.1.1\extracted\ffmpeg-7.1.1-full_build\bin\ffmpeg.exe"
Environment
Windows 程序包管理器 v1.10.390
版权所有 (C) Microsoft Corporation。保留所有权利。

Windows: Windows.Desktop v10.0.22631.5335
系统体系结构: X64
软件包: Microsoft.DesktopAppInstaller v1.25.390.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
可移植包根目录(用户)   %LOCALAPPDATA%\Microsoft\WinGet\Packages
可移植包根目录         C:\Program Files\WinGet\Packages
可移植包根目录 (x86)   C:\Program Files (x86)\WinGet\Packages
安装程序下载           F:\Downloads
配置模块               %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

链接
----------------------------------------------------------------------------
隐私声明             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           已禁用
ProxyCommandLineOptions                   已禁用
DefaultProxy                              已禁用

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 in src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp at VerifyAndSetNestedInstaller, then reproduce the install with %temp% on an ImDisk RAMDisk using the provided FFmpeg example. Compare the behavior with the cited related issue and commit; done means archive-based package installation completes successfully without the weakly_canonical exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.