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

Error 2 on install via Windows Package Manager #893

Closed
2 of 3 tasks
denelon opened this issue Apr 1, 2021 · 12 comments
Closed
2 of 3 tasks

Error 2 on install via Windows Package Manager #893

denelon opened this issue Apr 1, 2021 · 12 comments

Comments

@denelon
Copy link

denelon commented Apr 1, 2021

Prerequisites

Description

An Issue was reported in the Windows Package Manager project related to install errors:
microsoft/winget-cli#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:
microsoft/winget-cli#500 (comment)

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.

@hovancik
Copy link
Owner

hovancik commented Apr 2, 2021

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

@denelon
Copy link
Author

denelon commented Apr 2, 2021

@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.

@hovancik
Copy link
Owner

hovancik commented Apr 3, 2021

@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: electron-userland/electron-builder#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

@mohamedGamalAbuGalala
Copy link

mohamedGamalAbuGalala commented Apr 3, 2021

@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

@hovancik
Copy link
Owner

hovancik commented Apr 4, 2021

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.

@denelon
Copy link
Author

denelon commented Apr 5, 2021

@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"
],

@mohamedGamalAbuGalala
Copy link

@hovancik

Yes, I run the installer as Administrator.

@hovancik
Copy link
Owner

hovancik commented Apr 6, 2021

@denelon I guess it should be x64

@kapsiR
Copy link

kapsiR commented Apr 6, 2021

@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
Copy link

kapsiR commented May 28, 2021

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.

@hovancik
Copy link
Owner

hovancik commented Apr 1, 2023

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 hovancik closed this as completed Apr 1, 2023
@kapsiR
Copy link

kapsiR commented Apr 3, 2023

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

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants