stretchly icon indicating copy to clipboard operation
stretchly copied to clipboard

Error 2 on install via Windows Package Manager

Open denelon opened this issue 4 years ago • 10 comments

Prerequisites

Description

An Issue was reported in the Windows Package Manager project related to install errors: https://github.com/microsoft/winget-cli/issues/500

Operating system: Windows: Windows.Desktop v10.0.19042.746

Steps to Reproduce

  1. winget install Stretchly

Expected behavior: The Package should be installed.

Actual behavior: Installer Failed With Exit Code 2

Reproduces how often: 100% on the users machine. I did not encounter the error on my machine.

Additional Information

Comment with logged output: https://github.com/microsoft/winget-cli/issues/500#issuecomment-772331319

Debug information

You can find extra debugging information and location of Logs file on Preferences -> About page, after you hit Cmd/Ctrl+D shortcut.

Please, review information provided there and paste relevant parts here.

If you have changed any settings, please, provide the preferences file. Logs will be a big help, as well.

denelon avatar Apr 01 '21 15:04 denelon

Looks like winget issue to me, I am not sure how can I help...

hovancik avatar Apr 02 '21 13:04 hovancik

@hovancik can you help shed light on what error 2 is? Maybe that would help us to troubleshoot. I'm not able to reproduce this error in my environment, but @kapsiR is.

denelon avatar Apr 02 '21 15:04 denelon

@denelon I am using electron-builder to create the installers without any real knowledge what it does under the hood :)

But I think it uses NSIS installer, which has this on their website https://nsis.sourceforge.io/Docs/AppendixD.html#errorlevels

2 - Installation aborted by script

Which means that Windows Package Manager aborted?

Putting that as search query on the internets brought me to: https://github.com/electron-userland/electron-builder/issues/4057

People say 22.9.1 should fix that which I used to release 1.4 so not sure... https://github.com/hovancik/stretchly/blob/v1.4.0/package.json#L44

People who has the issue, should try regular installer to say if that fails as well...

Also, should this be x86 ? https://github.com/microsoft/winget-pkgs/blob/master/manifests/s/Stretchly/Stretchly/1.4.0/Stretchly.Stretchly.yaml#L14

hovancik avatar Apr 03 '21 12:04 hovancik

@hovancik same issue using choco install, web installer, and offline installer (tried 1.4)

image

Update: v1.3 worked with choco

Update: I successfully upgraded v1.3 to 1.4 using choco, I don't know why it didn't work in the first place 🤔 Anyway it worked

mohamedGamalAbuGalala avatar Apr 03 '21 17:04 mohamedGamalAbuGalala

Did you run installer as Administrator? I don't use Windows as my OS but seen that as an issue before. Not sure how those installers like choco and winget works in that sense.

hovancik avatar Apr 04 '21 13:04 hovancik

@hovancik

Also, should this be x86 ? https://github.com/microsoft/winget-pkgs/blob/master/manifests/s/Stretchly/Stretchly/1.4.0/Stretchly.Stretchly.yaml#L14

I'm not sure which architecture the packages is built for. We support several Architectures: "Architecture": { "type": "string", "enum": [ "x86", "x64", "arm", "arm64", "neutral" ],

denelon avatar Apr 05 '21 17:04 denelon

@hovancik

Yes, I run the installer as Administrator.

mohamedGamalAbuGalala avatar Apr 05 '21 20:04 mohamedGamalAbuGalala

@denelon I guess it should be x64

hovancik avatar Apr 06 '21 05:04 hovancik

@hovancik @denelon Yes, the installer (without using winget) works, even when I use the /S flag. (I already mentioned that in this winget comment)

@denelon May there be an issue with the integrity level in combination with winget and specific installers?

kapsiR avatar Apr 06 '21 07:04 kapsiR

I just wanted to note here too that the installation now works when using an elevated prompt. If you try to install it from an user prompt, the installation fails while trying to write to C:\Windows\TEMP due to the lack of permissions.

kapsiR avatar May 28 '21 20:05 kapsiR

I'll close this as I have no idea how winget works and I am not contributing to the package that is there. I hope that maybe all works now as this issue is pretty old.

hovancik avatar Apr 01 '23 18:04 hovancik

@hovancik Just to let anyone know here, this has been fixed in the winget cli - should be this one here:
https://github.com/microsoft/winget-pkgs/issues/29148

grafik

kapsiR avatar Apr 03 '23 11:04 kapsiR