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

(inkscape) Due to the bug in vendor installer, package should uninstall prior to update #550

Closed
AdmiringWorm opened this issue Jan 30, 2017 · 28 comments

Comments

@AdmiringWorm
Copy link
Member

Upgrading the inkscape package is currently impossible due to a bug in the installer making it return error code 1638 if a previous version of the software is already installed.

See:
http://disq.us/p/1f03dr0
https://bugs.launchpad.net/inkscape/+bug/1653574

@AdmiringWorm
Copy link
Member Author

Current workaround for this is to uninstall the software before upgrading

@opello
Copy link
Contributor

opello commented Feb 17, 2017

When I choco install inkscape after not rolling back and then uninstalling manually from the Control Panel I saw the MSI installer dialog with a progress bar during the installation. Based on the log it's using /passive and not /quiet.

@Spongman
Copy link

chocolatey should check to see if the previous version is installed and uninstall it before installing the new version.

@HolisticDeveloper
Copy link

Agreed with @Spongman, as long as the package doesn't use the Win32_Product WMI class to check if it is installed -- I know this can cause some perf issues that I've seen with the Skype package, for example. See https://chocolatey.org/packages/skype#comment-2630543885.

@majkinetor majkinetor changed the title (inkscape) Upgrade impossible due to bug in installer (inkscape) Due to the bug in vendor installer, package should uninstall prior to update Aug 1, 2017
@Spongman
Copy link

Was this fixed? I believe it's still a bug. Do you want me to re-submit?

@AdmiringWorm
Copy link
Member Author

No, it haven't been fixed. It was closed because there haven't been activity on this issue for a long time.
We can re-open it though, when/if there is anyone that is interested in fixing this issue.

@Spongman
Copy link

Seems like a strange reason to close a bug. Surely if it's still a bug it should stay open...

@AdmiringWorm
Copy link
Member Author

not really, when an issue have been open without any activity for so long as this one have, there is unlikely that this issue will be fixed even if it is kept open.
As such, for what reason is there to keep it open?

With that said, we won't deny a PR that fixes this issue even when it have been closed.
There is just no reason to have a issue that have gone stale around anymore.

@AdmiringWorm
Copy link
Member Author

AdmiringWorm commented Oct 11, 2017

Oh, and just to have it said.
This isn't really a bug in the package, but rather a bug in the installer.

EDIT:
Which is why this issue has been labelled with an Enhancement label instead of a bug one.

@majkinetor
Copy link
Contributor

majkinetor commented Oct 11, 2017

We opted for closing stale issues to reduce information overload. We maintain over 200 packages here and there needs to be some triage. PR is ofc. welcome any time.

@jtcmedia
Copy link
Contributor

jtcmedia commented Nov 2, 2017

I'm working on a solution for this and have it working except due to the length of time of doing the uninstall, it looks like choco times out or perhaps the uninstall is causing these access is denied errors:

You have InkScape v0.92.1 installed. Version 0.92.2 is available based on your source(s).
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 (5) Access is denied: [\\?\C:\ProgramData\chocolatey\lib-bkp\InkScape]
This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 (5) Access is denied: [\\?\C:\ProgramData\chocolatey\lib-bkp\InkScape]
Maximum tries of 3 reached. Throwing error.

It does end up upgrading ok. But is there a way to give it extra time?

@AdmiringWorm
Copy link
Member Author

I'm thinking it is the upgrade that isn't completely done, when the package is complete.

Other than detecting if the process is running, or using sleep, I don't believe there is any way to give it extra time.

Since you're looking into this, I'll re-open the issue.

@AdmiringWorm AdmiringWorm reopened this Nov 3, 2017
@majkinetor
Copy link
Contributor

You can execute it in a background job and give it timeout.

@majkinetor
Copy link
Contributor

Closing this again as there is no feedbacak.

@AdmiringWorm
Copy link
Member Author

Re-Opening this issue, as it was reported again on the disqus channel

@AdmiringWorm AdmiringWorm reopened this Mar 26, 2018
@majkinetor
Copy link
Contributor

Its an upstream problem nevertheless.

@jtcmedia
Copy link
Contributor

Ya, sorry I gave up on this. Added a band-aid solution but was getting this error: Capture.png

@ferventcoder
Copy link
Contributor

@jtcmedia in the chocolateyInstall.ps1 script, check for the software being installed and uninstall it, not the Chocolatey package. I think that's where you are seeing those errors.

Also, our first friendly exit code in the wild showed up in that disqus comment (http://disq.us/p/1r9378g):

ERROR: Running ["C:\WINDOWS\System32\msiexec.exe" /i "C:\Users...\AppData\Local\Temp\chocolatey\InkScape\0.92.3\inkscape-0.92.3-x64.msi" /passive /norestart ] was not successful. Exit code was '1638'. Exit code indicates the following: This MSI requires uninstall prior to installing a different version. Please ask the package maintainer(s) to add a check in the chocolateyInstall.ps1 script and uninstall if the software is installed. This is most likely an issue with the 'InkScape' package and not with Chocolatey itself. Please follow up with the package maintainer(s) directly.

@ferventcoder
Copy link
Contributor

The issue was chocolatey/choco#1526. If you have suggestions on better messages here, feel free to log tickets. We are likely to adjust those a bit for 0.10.10 for more clarity.

@jtcmedia
Copy link
Contributor

Thanks @ferventcoder. I've submitted PR #996 that should fix it.

@AdmiringWorm
Copy link
Member Author

This issue have now been fixed in the repository, and will be available when the next version of InkScape is available.

@nielsvdp
Copy link

This seems to happen again. I'm trying to upgrade from InkScape v0.92.3.20180702 to v0.92.4 and get the following log with the same error code (1638)
ChocolateyGui.20190121.log

The installation failure happens at the end of the log. The Dutch part just says there's another version already installed and how to remove it (Windows Control Panel etc).

@AdmiringWorm
Copy link
Member Author

@nielsvdp what Windows version are you running? I'm thinking it may be an older version of windows which is causing your issue (can't say for sure yet though)

@AdmiringWorm
Copy link
Member Author

Just verified that the removal of the old program doesn't work on older versions of windows.

Re-Opening this issue, and am working on a fix now.

@AdmiringWorm AdmiringWorm reopened this Jan 21, 2019
@AdmiringWorm
Copy link
Member Author

or rather, I submitted it as a new issue #1207

@nielsvdp
Copy link

@AdmiringWorm I use Windows 10 1803. Sorry if I missed anything, it's my first time posting an issue.

I originally used ChocolateyGui to upgrade. Now I tried using regular choco from PowerShell and it uninstalled and installed InkScape fine. The uninstallation just took a while.

@AdmiringWorm
Copy link
Member Author

hmm, that's odd. Well, I found it didn't work on older versions of windows, so it could be the same issue as when running through ChocolateyGUI

@AdmiringWorm
Copy link
Member Author

@nielsvdp hmm, after my changes the issue is still happening in ChocolateyGUI. This leads me to think that there may be a bug in their program, instead of the package (although there was a compatibility issue with it).

As such, I recommend that you open up an issue over at their repository: https://github.com/chocolatey/ChocolateyGUI/issues

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

Successfully merging a pull request may close this issue.

8 participants