You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Getting the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" while module installation by npm #2979
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:
changed the title [-]Getting the error "Assertion failed (wrap->ssl_) != (nullprt), file src\tls_wrap.cc, line 320" while module installation by npm[/-][+]Getting the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" while module installation by npm[/+]on Sep 21, 2015
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 uv_close(). There is lots of endgames and everything for cancelling the request. Could it be the case that the uv_close_cb is not invoked on next libuv tick on Windows?
a question about Windows and uv_close(). There is lots of endgames and everything for cancelling the request. Could it be the case that the uv_close_cb is not invoked on next libuv tick on Windows?
Yes, AFAIK cancellation could take a bit, so the uv_close callback is not guaranteed to run exactly on the next tick.
I have the same problem in Win XP.
I try install a express with command line npm install express -g and I get the msg ""Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320"
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.
Activity
ChALkeR commentedon Sep 21, 2015
cc @indutny
rvagg commentedon Sep 21, 2015
/cc @nodejs/crypto, @nodejs/platform-windows (
windows xp sp3sets off red flags for me)thefourtheye commentedon Sep 21, 2015
Npm folks might also be interested. cc @othiym23 @zkat @iarna
[-]Getting the error "Assertion failed (wrap->ssl_) != (nullprt), file src\tls_wrap.cc, line 320" while module installation by npm[/-][+]Getting the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" while module installation by npm[/+]indutny commentedon Sep 21, 2015
Will look at it today...
indutny commentedon Sep 21, 2015
I think it may be related to the Windows XP indeed. Checking the libuv code with this regards.
indutny commentedon Sep 21, 2015
Hm... looks like I was wrong about it, the order of callbacks should be correct even on XP. Continuing the search.
indutny commentedon Sep 21, 2015
I think it may be a windows-specific thing. May I ask you to give a try to the following patch:
Hopefully, it will fix the problem
@saghul a question about Windows and
uv_close(). There is lots of endgames and everything for cancelling the request. Could it be the case that theuv_close_cbis not invoked on next libuv tick on Windows?tls: use parent handle's close callback
indutny commentedon Sep 21, 2015
Relevant PR: #2991
saghul commentedon Sep 22, 2015
Yes, AFAIK cancellation could take a bit, so the uv_close callback is not guaranteed to run exactly on the next tick.
indutny commentedon Sep 24, 2015
@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.
SergeKornilov commentedon Sep 25, 2015
@indutny It something goes wrong when I try to build node.js. I follow installation guide:
What's wrong here? obsolet version of VS?
indutny commentedon Sep 25, 2015
cc @nodejs/release how do we do builds for Windows?
24 remaining items
ChALkeR commentedon Oct 7, 2015
@indutny Am I correct that the problem could be observed only on windows platform?
indutny commentedon Oct 7, 2015
@ChALkeR so far it looks like this
veneMarcos commentedon Oct 7, 2015
I have the same problem in Win XP.
I try install a express with command line npm install express -g and I get the msg ""Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320"
veneMarcos commentedon Oct 8, 2015
Where do I put this code?
ChALkeR commentedon Oct 8, 2015
@veneMarcos
tls_wrap.ccis here: https://github.com/nodejs/node/blob/master/src/tls_wrap.cc , but I'm not exactly sure why are you trying to find it. The patch is against_tls_wrap.js, which could be found here: https://github.com/nodejs/node/blob/master/lib/_tls_wrap.js .wwwork commentedon Oct 12, 2015
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.
I think it because I using proxy in my local arean network.
node --version
v4.1.2
tls: use parent handle's close callback
indutny commentedon Oct 12, 2015
Please give it a try to node.js 4.2.0 . The problem should be fixed there.
SergeKornilov commentedon Oct 13, 2015
Thank you very much! 4.2.0 really works great!
veneMarcos commentedon Oct 13, 2015
Thank you, this version 4.2.0 works fine.
indutny commentedon Oct 13, 2015
Whoa, looks like it was a good call to include that fix into release. Thank you!
mypuem commentedon Apr 11, 2016
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".
bnoordhuis commentedon Apr 11, 2016
@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.
tls: use parent handle's close callback