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

Node v11.0 windows installation opting into chocolatey+boxstarter results in infinite reboots #23838

Closed
roa-nyx opened this issue Oct 23, 2018 · 52 comments
Labels
addons Issues and PRs related to native addons. install Issues and PRs related to the installers. windows Issues and PRs related to the Windows platform.

Comments

@roa-nyx
Copy link

roa-nyx commented Oct 23, 2018

  • Version: v11.0
  • Platform: Windows 7
  • Subsystem:

Apologies if this is the wrong place to report this. But I just tried the windows installer for Node v11.0. There was an option to install build-tooling using chocolatey and boxstarter. It warned me that there would be reboots. After it rebooted over 20 times I kind of figured it was in a permanent reboot cycle so I stopped it. I am on an AD so I'm wondering if maybe there is some conflicting policy or antivirus at work that may be interfering with this process.

I'll try to update this task when I have time to try this on my home machine.

Not sure what more I can provide in the way of a test case..

@vsemozhetbyt vsemozhetbyt added windows Issues and PRs related to the Windows platform. install Issues and PRs related to the installers. labels Oct 23, 2018
@refack refack added the addons Issues and PRs related to native addons. label Oct 23, 2018
@Trott
Copy link
Member

Trott commented Oct 24, 2018

@nodejs/platform-windows

@nullivex
Copy link

I stopped the startup script to prevent a loop. However, it rebooted my computer without warning. This is a bug for sure.

@nullivex
Copy link

nullivex commented Oct 24, 2018

Back on my computer now. I was able to work around this on Windows 10 64bit. The annoying part where it forces the computer off and looks like a Virus is definitely true and should be fixed, it also didn't give me a chance to save any programs (sort of a force restart it seems). Also, I didn't get a chance to choose about installing boxstarter is that a problem?

Anyway, in order to work around this I did the following steps.

  1. Open the start menu
  2. Type "Startup Tasks"
  3. Open "Startup Tasks"
  4. Scroll to the bottom and disable "boxstarter-post-restart.bat"

Hope this helps.

@roa-nyx
Copy link
Author

roa-nyx commented Oct 25, 2018

For me I just needed to quickly focus on the window that was about to reboot, and hit Ctrl+C. Knocked it right out. I don't feel comfortable having done that as I don't know if it was in the middle of some sensitive work. Node appears to be working without issue for the time being, but I worried I may be in an inconsistent state.

@nullivex
Copy link

nullivex commented Oct 25, 2018

@klick-barakgall Yea, I ran the installer and went off to multitask and when I saw power shell pop up it was not until I saw chocolatey that I felt safe that I had not just downloaded a malicious version of the Node installer (my script was running quickly and I couldnt see that it was going to reboot before it was gone) :octocat:

@Trott
Copy link
Member

Trott commented Oct 25, 2018

Surprised no one from @nodejs/platform-windows chimed in yet. Let's try @nodejs/build.

@digitalinfinity
Copy link
Contributor

@joaocgreis can you take a look please? infinite reboots are bad 😞

@joaocgreis
Copy link
Member

@klick-barakgall can you see in the console what is being installed when it reboots? This is probably some corner case with some package, can you take a look at the log files in C:\ProgramData\chocolatey\logs or upload them here?

@roa-nyx
Copy link
Author

roa-nyx commented Oct 25, 2018

@redwebs
Copy link

redwebs commented Oct 26, 2018

I installed Node 11 on a Dell laptop with 64 bit Windows 10 and unfortunately choose the Boxstarter install option. I thought the note just said you will have to restart your command window. I saw nothing about computer restarts. Node installed just fine but the Powershell Script rebooted 4 times before I noticed it was in a loop to install a script to keep Windows update from changing things. Since the reboot happens quickly you have to be ready to click on the Powershell window and hit Ctrl-C quickly. You are then prompted to type the text "ENTER" to exit the script.

I then got a Windows message "You must restart your computer to turn off User Account Control". I didn't want UAC turned off but restarted anyway and everything seemed to work and UAC was on.

I did have one program that syncs my Outlook address book with Google contacts that started up with a library error "Cannot open registry Interface{00063001-0000-0000-C000-000000000046}\TypeLib." After several attempts to fix this (including spelunking into the dreaded Windows Registry) I had success by running the repair option on Office installer. (Under Add or Remove Programs).

I doubt Boxstarter works and I don't even want to see that name for while.

@aarsilv
Copy link

aarsilv commented Oct 26, 2018

This happened to me too on my Windows 10 machine. Once rebooting quickly X-out of the boxstarter script. Then press Ctrl+Shift+Esc to open up task manager and select the "Startup" tab where you can right click and disable boxstarter-post-restart.bat.

@alexfung888
Copy link

alexfung888 commented Oct 29, 2018

Me too. Reboots forever. Created dozens of install scripts under BuildPackages, every one of them reads:

choco upgrade -y python2
choco upgrade -y visualstudio2017buildtools
choco upgrade -y visualstudio2017-workload-vctools

I guess python2 is never installed properly. When using nodejs, I get in gyp errors with pythrons all the time, but it seems ok to ignore them, except that it now keeps rebooting the machine (and needs me to type password too).

I also get a strange directory called regid.1991-06.com.microsoft with two .swidtag files inside.

To exit the loop, control break and type

cleanup-Boxstarter

to undo its other temp changes (disable UAC, disable Windows update, etc).

PS: I got the problem with LTS Node 10. I think it has nothing to do with Node version, just the way it is using boxstarter to install tools.

@alexfung888
Copy link

alexfung888 commented Oct 29, 2018

and if I bypass install tools with Nodejs, the installer told me to follow the steps at

https://github.com/nodejs/node-gyp#on-windows

unfortunately it won't work. It seems windows-build-tools only support nodejs v4..9. maybe that's also why chocolatey failed.

error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9". Got "10.12.0"
error Found incompatible module

and installing it with --ignore-engines crashed the whole Windows.

@MikaelSoderstrom
Copy link

MikaelSoderstrom commented Oct 30, 2018

I then got a Windows message "You must restart your computer to turn off User Account Control". I didn't want UAC turned off but restarted anyway and everything seemed to work and UAC was on.

I just got UAC turned off myself and had to activate it manually. This is really, really bad.

@aesqe
Copy link

aesqe commented Oct 30, 2018

Same here.

After the 3rd or 4th restart, the script had finally managed to install Python and Build Tools (that's just a guess at this point).

But after the next restart, it looked like it was going to begin the whole process again so I stopped the script and removed the startup task.

And I've just noticed that my UAC is off.

@jmmobley

This comment has been minimized.

@jasnell
Copy link
Member

jasnell commented Oct 30, 2018

Ping @nodejs/build @nodejs/platform-windows ... @joaocgreis @richardlau ... please take a look. Looks like #22645 is causing some issues for some users.

@refack
Copy link
Contributor

refack commented Oct 30, 2018

Maybe to people at Microsoft can help with perspective on their end? @yodurr, @crutkas and @bitcrazed & @gep13

@joaocgreis
Copy link
Member

@klick-barakgall the logs don't show anything that may be causing the reboots, only that installing Chocolatey and Boxstarter succeeded and it is probably rebooting installing our script. Can you see at what point the script reboots? What appears on the console, what is being installed? A picture or a video of your screen might help if you can't read it in time.

@joaocgreis
Copy link
Member

@klick-barakgall can you also upload the log from C:\Users\YOUR_USERNAME\AppData\Local\Boxstarter?

@roa-nyx
Copy link
Author

roa-nyx commented Oct 30, 2018

Apologies @joaocgreis this happened on installation on a work machine and it will probably be a while before I can start messing around with (jeopardizing) my NodeJS install and give myself enough time to recover from any potentially bad state. I'm sorry I just don't want to risk destabilizing my dev environment any further at this time.

That being said here is the next log you've requested:
boxstarter.log

@joaocgreis
Copy link
Member

For everyone having this issue, if the computer reboots more than 20 times please upload your log from C:\Users\YOUR_USERNAME\AppData\Local\Boxstarter\boxstarter.log and describe as well as possible what appears in the console before the reboot. Screenshots, photos or videos would be helpful. Please note that the script will always start from the beginning after a reboot, but it will notice previous packages are already installed and skip them. There is only an issue if the script is always rebooting at the same point, and finding out what it is doing at that point is key to solving this issue.

@klick-barakgall in the log file I see that it run for almost 50 minutes and rebooted 7 times. Then it finished successfully, looks like everything was installed in the end. So, whatever was causing the reboots happened after our script run. I understand you don't want to disturb your machine, but perhaps someone else with the same issue can help.

@alexfung888
Copy link

alexfung888 commented Oct 31, 2018

boxstarter.zip
everytime it waits for some WMI to stop, and build a new package and reboot without prompt.

All the C:\ProgramData\Boxstarter\BuildPackages*.tmp\tools directories have the same ps1 file:

choco upgrade -y python2
choco upgrade -y visualstudio2017buildtools
choco upgrade -y visualstudio2017-workload-vctools

from control panel, I have python 2.7.15 and vs build tools 2017 installed on that date. I don't find anything called workload vctools.

@gep13
re the list of info you asked for:

  • OS: w10 Enterprise 1809 build 17763.55
  • PS: 5.1.17763.1
  • .Net: 3.5 and 4.7
  • NodeJS: was 8.11.1, installing 10.12.0
  • Windows Update: enabled and up to date.

@gep13
Copy link

gep13 commented Oct 31, 2018

I am part of the Chocolatey Development Team, and I help oversee both the Chocolatey and Boxstarter projects. While it looks like there is definitely an issue in here that needs to be resolved, let me start by saying that this does work. I have just created a fresh VM with nothing on it, and performed the installation of NodeJS, including the additional components, and it worked as expected. During that process there was a single reboot.

I captured this in a video which I have uploaded here:

https://youtu.be/gwFpXXIJTvs

In order to try to figure out what is going on, it would be good to try to figure out if there is some commonality between the people that have reported problems. Things that I am thinking about are:

  • Operating System
  • PowerShell Version
  • What, if any, .Net Frameworks are installed
  • Any previous versions of NodeJS installed
  • Are Windows updates enabled?
  • Are Windows Updates up to date?

There was an issue which I documented here:

chocolatey/boxstarter#357 (comment)

Where the installation of the packages in the NodeJS installation was inadvertently causing a call to the Install-WindowsUpdate cmdlet, which if your machine wasn't up to date with Windows Update would potentially cause multiple reboots of the machine. Not from the installation of the package themselves, but rather from the Windows Updates that were being installed. This issue has been addressed and should no longer happen.

Regarding the disabling of UAC, the original author of Boxstarter added some information about why disabling of UAC is required in the context of Boxstarter here:

chocolatey/boxstarter#358 (comment)

At the end of the Boxstarter execution, the UAC status will be returned to what it was before it started. You can see that in the video I linked to:

image

Cancelling the Boxstarter execution obviously prevents this from being re-enabled.

As I mentioned, if we could start collating what is different/similar between the machines where there is a problem, and those where there aren't, it would help to try to get to the bottom of the problem.

Adding @pauby @flcdrg @mwallner @ferventcoder

@ferventcoder
Copy link
Contributor

Howdy folks - I filed a PR to make folks aware of the behavior upon installation - #24000

@Aprillion
Copy link

FYI, I was able to get into a similar state (with Node 10, not just 11) and got a powershell prompt with Please provide your password so that Boxstarter may automatically log you on. (I had no idea what is boxstarter, it was a day later after an unfinished Node install)... That definitely looked "like a virus" as mentioned previously until I checked it wasn't (but I manually uninstalled choco and had to check my UAC status).

So I hope any future fix will make it into Node 10 as well, not just to master.

@adi518
Copy link

adi518 commented Nov 9, 2018

Experienced something similar. I opt'ed in (v11.1.0). It ran the script, rebooted, ran its post-reboot script and rebooted again, this time to a black screen. I don't know if it rebooted several times because I wasn't even seeing the Windows loader and the screen remain black without flashing or anything. Hitting the reset button few times didn't help it, so I ended cold-booting and then Windows finally came up. Then, another script pop, it tried to install few redistributables, but the actual resources were missing so it failed those parts. No idea how to verify the integrity of this entire bizarre process. Plus, I have no idea if it left my OS pristine or changed things like permissions and so.

PS,
At some point in the script, it logs "disabling automatic windows updates...". Wat??

Edit: It seems I had an issue with my keyboard, so the part where the screen went black seems like a local issue. Anyway, this cleared a lot of things for me: chocolatey/boxstarter#357 (comment)

@MarioAnes
Copy link

FYI, I was able to get into a similar state (with Node 10, not just 11) and got a powershell prompt with Please provide your password so that Boxstarter may automatically log you on. (I had no idea what is boxstarter, it was a day later after an unfinished Node install)... That definitely looked "like a virus" as mentioned previously until I checked it wasn't (but I manually uninstalled choco and had to check my UAC status).

So I hope any future fix will make it into Node 10 as well, not just to master.

Yup, same here. I figured since it's LTS, it was safe to install. I also had Chocolatey already installed on my machine before installing Node 10

@StoilovskiMile
Copy link

choco upgrade -y python2
choco upgrade -y visualstudio2017buildtools
choco upgrade -y visualstudio2017-workload-vctools

Sugested by Alex888 works like a charm, I've previosly turned UAC off

refack added a commit to refack/node that referenced this issue Nov 18, 2018
This reverts:
	Revision: 257a5e9
	win: add prompt to tools installation script

	Revision: e9a2915
	win: clarify Boxstarter behavior on install tools

	Revision: 3b895d1
	win,msi: display license notes before installing tools

	Revision: cf284c8
	win,msi: install Boxstarter from elevated shell

	Revision: 2b7e18d
	win,msi: highlight installation of 3rd-party tools

	Revision: ebf36cd
	win,msi: install tools for native modules

PR-URL: nodejs#24344
Refs: nodejs#22645
Refs: nodejs#23987
Refs: nodejs/Release#369
Refs: nodejs#23838
Refs: nodejs/security-wg#439
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@Snowbell92
Copy link

Snowbell92 commented Nov 18, 2018

ran into the same thing today using Node 10. I had everything except python (I have python 3 installed). aborted the process in the middle, uninstalled node and now I am manually installing dependencies (following the steps written in node-gyp repo).

@soapnrope
Copy link

I got a bit different problem regarding the installation.

I aborted the installation process because of semi unexpected reboots. UAC and Windows Update reminded disabled. Re-ran the node setup and let the boxstarter script do its thing hoping that it would re enables UAC/updates.

As you can see in the screenshot bellow, the automatic update should be re-enabled, but it actually failed(fails) to do that and now its "Managed by your organization". Group policy is looks messed up. By no means I'm in active directory, so it shouldn't be like this.
image

How can I revert this? aka Make Windows Updates as they where with defaults settings.

@mrkeyboard
Copy link

mrkeyboard commented Nov 25, 2018

After the first sudden restart, I found I was logged out of all websites on Chrome. Soon after the second restart came and I had to stop it. I removed everything I could find related to Chocolatey and Boxstarter. Checking that automatic installation was a mistake, it's unnecessarily aggressive and intrusive.

Edit: I used Windows Restore to make sure everything is back to normal. I suggest anyone experiencing similar issues to do the same

joaocgreis added a commit to JaneaSystems/node that referenced this issue Nov 27, 2018
Use Chocolatey directly in the tools installation script.

Fixes: nodejs#23838
rvagg pushed a commit that referenced this issue Nov 28, 2018
This reverts:
	Revision: 257a5e9
	win: add prompt to tools installation script

	Revision: e9a2915
	win: clarify Boxstarter behavior on install tools

	Revision: 3b895d1
	win,msi: display license notes before installing tools

	Revision: cf284c8
	win,msi: install Boxstarter from elevated shell

	Revision: 2b7e18d
	win,msi: highlight installation of 3rd-party tools

	Revision: ebf36cd
	win,msi: install tools for native modules

PR-URL: #24344
Refs: #22645
Refs: #23987
Refs: nodejs/Release#369
Refs: #23838
Refs: nodejs/security-wg#439
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@moloughl
Copy link

For everyone having this issue, if the computer reboots more than 20 times please upload your log from C:\Users\YOUR_USERNAME\AppData\Local\Boxstarter\boxstarter.log and describe as well as possible what appears in the console before the reboot. Screenshots, photos or videos would be helpful. Please note that the script will always start from the beginning after a reboot, but it will notice previous packages are already installed and skip them. There is only an issue if the script is always rebooting at the same point, and finding out what it is doing at that point is key to solving this issue.

@joaocgreis
Here is the log file boxstarter.log
Here is a screenshot just before a reboot took place.
screenshot
It rebooted every few minutes for a great many times until I eventually aborted.

MylesBorins pushed a commit that referenced this issue Nov 29, 2018
This reverts:
	Revision: 257a5e9
	win: add prompt to tools installation script

	Revision: e9a2915
	win: clarify Boxstarter behavior on install tools

	Revision: 3b895d1
	win,msi: display license notes before installing tools

	Revision: cf284c8
	win,msi: install Boxstarter from elevated shell

	Revision: 2b7e18d
	win,msi: highlight installation of 3rd-party tools

	Revision: ebf36cd
	win,msi: install tools for native modules

PR-URL: #24344
Refs: #22645
Refs: #23987
Refs: nodejs/Release#369
Refs: #23838
Refs: nodejs/security-wg#439
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@joaocgreis
Copy link
Member

@moloughl thanks for the log file, indeed something is in the registry always making the computer reboot.

We are changing this feature in #24677 to not perform any automatic reboot.

BridgeAR pushed a commit that referenced this issue Dec 6, 2018
Use Chocolatey directly in the tools installation script.

PR-URL: #24677
Fixes: #23838
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
BridgeAR pushed a commit that referenced this issue Dec 7, 2018
Use Chocolatey directly in the tools installation script.

PR-URL: #24677
Fixes: #23838
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
BridgeAR pushed a commit that referenced this issue Dec 7, 2018
Use Chocolatey directly in the tools installation script.

PR-URL: #24677
Fixes: #23838
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
refack pushed a commit to refack/node that referenced this issue Jan 14, 2019
Use Chocolatey directly in the tools installation script.

PR-URL: nodejs#24677
Fixes: nodejs#23838
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addons Issues and PRs related to native addons. install Issues and PRs related to the installers. windows Issues and PRs related to the Windows platform.
Projects
None yet