Getting the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" while module installation by npm
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:[email protected]:8080 npm config set https-proxy https://username:[email protected]: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
cc @indutny
/cc @nodejs/crypto, @nodejs/platform-windows (windows xp sp3 sets off red flags for me)
Npm folks might also be interested. cc @othiym23 @zkat @iarna
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 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?
Relevant PR: https://github.com/nodejs/node/pull/2991
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.
@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:
- Start "Visual Studio Command prompt (2010)"
- Execute "set path=c:\python27;c:\python27\lib;%path%"
- Execute "python --version" to check and get the result "Python 2.7.10"
- Then execute "vcbuild.bat release x86" and get nothing.
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. On Sep 25, 2015 8:20 AM, "SergeKornilov" [email protected] wrote:
@indutny https://github.com/indutny It something goes wrong when I try to build node.js. I follow installation guide:
- Start "Visual Studio Command prompt (2010)"
- Execute "set path=c:\python27;c:\python27\lib;%path%"
- Execute "python --version" to check and get the result "Python 2.7.10"
- Then execute "vcbuild.bat release x86" and get nothing.
What's wrong here? obsolet version of VS?
— Reply to this email directly or view it on GitHub https://github.com/nodejs/node/issues/2979#issuecomment-143139330.
What can I do to clearify the situation and get more verbous output from vcbuild?
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.
VS 2010 support was dropped a long time ago. You need at least VS 2013.
In Node? When?
Unless Windows SDK includes a compiler, its version is not relevant.
Windows SDk 7 and 7.1 do include a compiler.
In Node? When?
In 370e82142456cbfced954c7d73360660b7fd81cb.
Windows SDk 7 and 7.1 do include a compiler.
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.