-
Notifications
You must be signed in to change notification settings - Fork 30k
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
[Feature request] [Windows] Unable to run Node.js in safe mode #22054
Comments
IIRC I have seen couple of instances of the same but can't recollect what module is wanting to check for the network. Do you have diagnostic tools in your system to be able to capture a stack trace of the failure? the intent is to see the instigator, and make an opinion on the feasibility of the feature request based on that. thanks! |
Can you explain what do you mean by "diagnostic tools"? Is it a program I need to download, or is it a builtin Windows feature? I found this link https://www.microsoft.com/en-us/download/details.aspx?id=26798 Also, forgot to mention: Node.js terminates with exit code
|
sorry for being dumb on |
So I installed WinDbg and reproduced the error. Here is what I could get: The program stops twice, then it loops on the second "non-continuable exception". WinDbg log
|
Somewhat related to this issue: nodejs/help#1240. From the comments mentioned here I guess node js requires network stack to be working properly. My hard guess is that, Safe Mode starts only with basic drivers but not with network drivers. I don't have windows machine, but I'm sure we have option like Safe Mode with Networking, can you check if the code works in this specific mode? I guess it should do. |
Re: targos Thanks for doing the test. I'm not familiar with windows system calls, but I hope someone from node/windows team is able to determine how easy/hard it will be to resolve this issue based on the information you provided. Re: antsmartian The point of this feature request is to allow Node.js to start without network drivers. For example, network drivers may be loaded lazily in case the script uses some of the network modules (http, http2, https...), or there should be a command line option to prevent loading network drivers. If the script uses only Starting the application in safe mode with networking, though it may solve this problem (untested), it doesn't solve the general problem. What if there are no network drivers installed in the system? It will break Node.js, but, in general, if the script doesn't use network or any network modules, loading drivers should not be mandatory. |
This behavior caused by libuv. |
@bounc3-paradise-on-e - this feature is implemented through libuv/libuv#2205 , and is made available in node through #26707 which is available in v10.16.0 , v11.13.0 onwards. Can you pls check if it is working at your end and revert ? thanks. |
It's not clear if this needs to remain open. There's been no further activity on it so I'm going to go ahead and close it but I'm adding it to the Futures project board so that it doesn't get lost |
Made a script for cleaning up disk and unlocking locked files. The script is written in JavaScript and intended to be run using Node.js in Windows safe mode.
When run the script in windows normal mode, it works. However, when run the script in windows safe mode, get the error:
After googling found out that windows safe mode disables network drivers and Node.js won't start if network drivers are disabled.
Is there a reason to terminate Node.js if there are no network drivers enabled? The script is supposed to use only
fs
andpath
module in order tounlink
some files andrmdir
directories. Network is really irrelevant and terminating the Node.js process because of missing drivers doesn't really make sense to me.But, this is total guess, I'm not sure if missing drivers cause it or whatever, that's what I found on google and stack overflow.
To make it clear: the feature request is to allow Node.js to run in windows safe mode, without requiring any irrelevant configuration to be present (like network drivers, if that is the cause). Would like to hear your opinion.
The text was updated successfully, but these errors were encountered: