-
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
Getting the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" while module installation by npm #2979
Comments
cc @indutny |
/cc @nodejs/crypto, @nodejs/platform-windows ( |
Will look at it today... |
I think it may be related to the Windows XP indeed. Checking the libuv code with this regards. |
Hm... looks like I was wrong about it, the order of callbacks should be correct even on XP. Continuing the search. |
I think it may be a windows-specific thing. May I ask you to give a try to the following patch: diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index 1bff757..fc9696f 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -296,7 +296,11 @@ proxiedMethods.forEach(function(name) {
tls_wrap.TLSWrap.prototype.close = function closeProxy(cb) {
if (this._parentWrap && this._parentWrap._handle === this._parent) {
- setImmediate(cb);
+ if (this._parentWrap._handle)
+ this._parentWrap.once('close', cb);
+ else
+ setImmediate(cb);
+
return this._parentWrap.destroy();
}
return this._parent.close(cb); Hopefully, it will fix the problem @saghul a question about Windows and |
When closing the child TLSWrap handle - wait for the proper parent's handle close callback invocation. `uv_close_cb` may be invoked much later than the next libuv tick, depending on the platform. Fix: nodejs#2979
Relevant PR: #2991 |
Yes, AFAIK cancellation could take a bit, so the uv_close callback is not guaranteed to run exactly on the next tick. |
@SergeKornilov may I ask you to test this patch? I have really good expectations from it. Let me know if you need some help with building this thing. |
@indutny It something goes wrong when I try to build node.js. I follow installation guide:
What's wrong here? obsolet version of VS? |
cc @nodejs/release how do we do builds for Windows? |
@nodejs/build ^^ |
I always do it from cmd.exe, give it a shot.
|
VS 2010 support was dropped a long time ago. You need at least VS 2013. |
What is about Windows SDK 7.1? |
Unless Windows SDK includes a compiler, its version is not relevant. |
In Node? When?
Windows SDk 7 and 7.1 do include a compiler. |
In 370e821.
That's interesting. Is it an alternative to VS then? Anyway, I'm not sure how or if node would work with it, as vcbuild.bat looks for environment variables set by VS. |
Thanks, I didn't know that! In libuv we support VS >= 2008 :-)
Not really. AFAIK Windows SDK >= 8 no longer includes any compiler. IIRC you could compile stuff for x64 with VS 2012 express + the SDK. |
Here, on an another computer with Windows SDK 7.1 and Python 2.7 only: So, I guess the following (from Installation)
is not actual now at least for 4.x version. |
@SergeKornilov : edit vcbuild.bat and remove (or comment with REM) the first line. Eg:
|
Well, here it is (last lines of the output):
|
I haven't tried this myself, but as far as I know VS2013 can only be installed on Windows 7 or later (or the corresponding server editions, Windows Server 2008 R2 or later). And since building Node requires VS2013 or VS2015, that disqualifies XP as a build machine. |
As far as I can see I need Windows 7 with VS2013, only then I can build node targeted it for XP, right? |
Correct. You might as well go to the latest and greatest and use VS2015. You'll need Windows 7 SP1 minimum. Looking at your output above, there also seems to be a bug in vcbuild.bat. For one thing, I can see that it contains two labels named the same (:exit). Hopefully this only causes problems on XP. Please let us know if you still have problems on later OS versions. |
As a side thought, I wonder if the VS 2013 minimum requirement also applies to compiling native modules. If that is the case, it would mean that Node on XP is seriously limited. |
Ok. I'll try to build node on Win7 a bit later... I have only to install VS 2013. Merlin's beard! I just wanted to install cheerio module via npm 😃. |
I am using windows 10. I also having that issue. |
@janaka1379 we probably have one! May I ask you to give a try to that patch? |
Any update? @janaka1379 did you try using the patch? (#2991) Edited: I think fedor meant this patch |
I am seeing this issue too when testing my platform that worked on previous node versions. I will attempt to build with this patch and let you know. |
The latest version of node.js (4.1.2) has the same problem. |
@SergeKornilov of course it does, I haven't landed the patch yet. |
@indutny Am I correct that the problem could be observed only on windows platform? |
@ChALkeR so far it looks like this |
I have the same problem in Win XP. |
Where do I put this code?
|
@veneMarcos |
I get the same error on win xp, when I've run npm install npm --proxy http://191.168.1.1:3128 --without-ssl --insecure install string. node --version |
When closing the child TLSWrap handle - wait for the proper parent's handle close callback invocation. `uv_close_cb` may be invoked much later than the next libuv tick, depending on the platform. The only platform that currently seem to defer `uv_close_cb` is Windows XP. This behavior was not observed on other Windows systems, and is not possible on Unixes. Fix: #2979 PR-URL: #2991 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Please give it a try to node.js 4.2.0 . The problem should be fixed there. |
Thank you very much! 4.2.0 really works great! |
Thank you, this version 4.2.0 works fine. |
Whoa, looks like it was a good call to include that fix into release. Thank you! |
I'm seeing this issue in node 4.4 running on win 7 and ubuntu 14.04.4 LTS. The error is printed when an ssl socket is closed. I'm only using the built in modules http, https, crypto. My code runs fine without the https module. Sorry if I've posted in the wrong place but this is the only reference I can find to this error. The error message is "Assertion failed: (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 319". |
@mypuem If you still get that with the latest v4.x release (v4.4.2 at the time of writing), can you file a new issue and include steps to reproduce? The test case should preferably not depend on any third-party modules. |
I get the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" trying to install any module by npm via proxy, for example, request or cheerio:
npm config set proxy http://username:password@proxy.company.com:8080
npm config set https-proxy https://username:password@proxy.company.com:8080
npm install cheerio
//
Thus, request module is not installed at all, and cheerio module is installed without dependencies.
//
npm --version
2.14.3
node --version
v4.1.0
OS: windows xp sp3
The text was updated successfully, but these errors were encountered: