winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

ZIP extraction fails when %temp% is set to a RAMDisk

Open ben20471 opened this issue 1 year ago • 2 comments

Brief description of your issue

Note: I will use git-cola.git-cola as an example package for this issue, but this works with any other package that uses a zip archive during install

I use a RAMDisk to put temporary files on it, and whenever I attempt to install a program that uses a zip file (regardless of the contents being a portable package or an exe installer), the extraction always fails. The problem started to appear when I started to put temporary file on the said RAMDisk, without updating winget or anything else.

Steps to reproduce

  1. Download the ImDisk Toolkit and install it to the default location
  2. Open C:\Program Files\ImDisk\RamDiskUI.exe
  3. Create a RAMDisk of any size big enough for the download
  4. Set both %temp% and %tmp% to any folder under the RAMDisk
  5. Restart
  6. Use winget install git-cola.git-cola

Expected behavior

Silently extracts the zip and successfully installs package

Actual behavior

The package installation fails with the following error: weakly_canonical: Fonction incorrecte.: "R:\Temp\WinGet\git-cola.git-cola.4.6.1\extracted\git-cola-4.6.1.exe"

Environment

Using winget --info:

Gestionnaire de package Windows v1.7.11261
Copyright (c) Microsoft Corporation. Tous droits réservés.

Windows: Windows.Desktop v10.0.19045.4474
Architecture du système : X64
Package : Microsoft.DesktopAppInstaller v1.22.11261.0

Répertoires Winget
-----------------------------------------------------------------------------------------------------------------------------------------
Journaux                                     %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Paramètres utilisateurs                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Répertoire des liens portables (utilisateur) %LOCALAPPDATA%\Microsoft\WinGet\Links
Répertoire des liens portables (ordinateur)  C:\Program Files\WinGet\Links
Racine de package portable (utilisateur)     %LOCALAPPDATA%\Microsoft\WinGet\Packages
Racine du package portable                   C:\Program Files\WinGet\Packages
Racine de package portable (x86)             C:\Program Files (x86)\WinGet\Packages
Téléchargements du programme d’installation  %USERPROFILE%\Downloads

Liens
---------------------------------------------------------------------------------------------
Déclaration de confidentialité        https://aka.ms/winget-privacy
Contrat de licence                    https://aka.ms/winget-license
Avis de tiers                         https://aka.ms/winget-3rdPartyNotice
Page d’accueil                        https://aka.ms/winget
Conditions générales du Windows Store https://www.microsoft.com/en-us/storedocs/terms-of-sale

Paramètre administrateur                  État
---------------------------------------------------
LocalManifestFiles                        Activé
BypassCertificatePinningForMicrosoftStore Désactivé
InstallerHashOverride                     Désactivé
LocalArchiveMalwareScanOverride           Désactivé

Temporary folders environment variables:
TEMP                           R:\Temp
TMP                            R:\Temp

ben20471 avatar May 31 '24 12:05 ben20471

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar May 31 '24 12:05 github-actions[bot]

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Just checked, this issue provides a different error. Additionally, while the error in the issue mentioned by the bot is happening before the download even starts, the error mentioned in my issue happens only after downloading and extracting.

ben20471 avatar May 31 '24 12:05 ben20471

I also have the same problem. I have a problem with the command below. winget install Schniz.fnm

weakly_canonical: �߸��� ����Դϴ�.: "R:\Temp\WinGet\Schniz.fnm.1.37.1\extracted\fnm.exe"

joyfuI avatar Jul 13 '24 12:07 joyfuI

We've switched to a different library for expanding compressed files in WinGet 1.8 and WinGet 1.9 preview. Is this still happening on the latest versions of WinGet?

denelon avatar Jul 29 '24 20:07 denelon

I still get the error.

> winget -v v1.8.1911

> winget install Schniz.fnm 찾음 Fast Node Manager [Schniz.fnm] 버전 1.37.1 이 응용 프로그램의 라이선스는 그 소유자가 사용자에게 부여했습니다. Microsoft는 타사 패키지에 대한 책임을 지지 않고 라이선스를 부여하지도 않습니다. 다운로드 중 https://github.com/Schniz/fnm/releases/download/v1.37.1/fnm-windows.zip ██████████████████████████████ 3.04 MB / 3.04 MB 설치 관리자 해시를 확인했습니다. 보관 파일을 추출하는 중... 보관 파일을 추출했습니다. 명령을 실행하는 동안 예기치 않은 오류가 발생했습니다. weakly_canonical: �߸��� ����Դϴ�.: "R:\Temp\WinGet\Schniz.fnm.1.37.1\extracted\fnm.exe"

joyfuI avatar Jul 30 '24 13:07 joyfuI

I also happen to use ImDisk to create my ramdisk T:\, where I set my TEMP directory. Half the time when trying to install utilities using winget I get that weakly_canonical error.

iroedius avatar Sep 15 '24 09:09 iroedius

running the v1.9.25200 version winget same issue occurred

rexkyng avatar Nov 25 '24 13:11 rexkyng

v1.10.340 error is still existed

ocmrzr avatar Mar 11 '25 14:03 ocmrzr