Closed JinYongWu closed 2 years ago
I havent checked nsis version... but my windows conda installers are intermittently failing for the last couple of weeks. I always use the latest and greatest conda constructor version on windows.
I am seeing some issues in the CI too, where some Windows jobs suddenly hang indefinitely. Python version doesn't seem to be a factor.
First time it hang was May 11th (commit be1b1f658d73b86835323e11a3dfb5d604495ee0), just one day after nsis 3.08
was made available on defaults
.
So yes, it looks like there are some sporadic problems where the installer might not run successfully (but sometimes it does?). I'd recommend pinning nsis to 3.01 in the meantime.
Yeah... that timeframe sounds about right. I figured out the problem I was seeing. I was substituting a custom default user path for windows and it was missing a trailing '\'. This reliably causes the 'intermittent' behavior (I know that sounds weird). This also explains when my users would type in an install path and leave out the trailing slash. If you use the menu to create a directory then it substitutes the backslash... but if you type in manually you can break it. I'm not super familiar with NSIS but this sounds like something it could/should check for and compensate. The really bad thing is... that if that trailing slash isn't there... no error message gets printed... the installer hard crashes. Took me a LONG time to figure out what was going on.
I'd recommend pinning nsis to 3.01 in the meantime.
This is good advice for people who don't need any of the new NSIS features though some users may need things like the
!uninstfinalize
command which is only available in >3.01.
I'll also add that I couldn't get a windows installer to complete without hanging when built against 3.08 while the installer built against 3.01 worked just fine (just to confirm the issue as described above).
Maybe related: actions/virtual-environments#4739 (comment)
I also tried to put "Unicode false" at the beginning of nsis script to use NSIS 3.08. I got similar errors caused by that some plugins were not loaded, i.e. UAC.dll.
For now I am going to issue some repodata patches so constructor only uses NSIS 3.01. Next release will hopefully address the problem.
I am taking another look at this issue and I can't manage to reproduce the problem in my VM. I am trying to use NSIS log builds to try and catch where the error is coming from, so the fact that I don't run into this issue with the log builds means that it could be a packaging problem?
Let's see if this fixes your problem temporarily, @JinYongWu:
conda create -n constructor-log-builds constructor nsis=3.08 --copy
. We need 'copy' so we can overwrite stuff safely.%CONDA_PREFIX%\NSIS
with the contents of the ZIP.constructor path/to/construct.yml
as usual.Other things to try:
nsExec.dll
, that means the problem lies with the nsExec::*
calls. This plugin allows us to run subprocesses without spawning a CMD window. If it crashes there, it might be either a problem with the launching itself, or with the collection of the output.nsis-3.*.zip
files in this page. If we manage to find a later version than 3.01 that works, we might narrow down which change is causing the error.Good news, I could reproduce the error, found the cause and provided a fix in #563!
If you need it fixed urgently, the patch can be as simple as changing this line:
To
- nsExec::ExecToLog $2
+ nsExec::Exec $2
This will reduce the verbosity of the Details panel, though. The PR introduces a method to minimize this side effect as much as possible.
Thanks!!!
What is the earliest version of Constructor which has this fix?
Checklist
What happened?
We created a customized Python toolkit installer using constructor, the installer worked well when using nsis 3.01. Recently we upgraded nsis to 3.08 which provides the capability to sign the uninstaller exe. After switched to nsis 3.08(with no any other additional changes), we experienced crashes during installation process. Here are the high level steps to observe the crashes:
Generate the customized Python toolkit installer using constructor (and nsis 3.08);
Install the generated installer for the first time, noticed that everything is installed correctly;
Uninstall the Python toolkit from "Add & Remove programs";
Run the installer again;
This time the installation window disappeared after a while, and checked the installation folder, there were just a few folders and the packages were not extracted, the subfolders and files are as below:
Checked the task manager, noticed that there are 3 conda processes running under Background processes - even the installation window disappeared;
Checked the windows Event Viewer, noticed that there were some faulting errors for the mentioned installer:
and information report:
If we only change the nsis to version 3.01, the installer generated with same configuration worked fine for above steps. We compared and made sure that the issue happened as soon as we only upgrade nsis package to 3.08.
Conda Info
No response
Conda Config
No response
Conda list
No response
Additional Context
No response