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
Requests after long delays halt on tls.js:182 #2304
http://pastebin.com/LLX6isjZ
(Not sure if the express part matters, but takes 30+ minutes to do a test to see if it fails as expected so this the least I got it cut down to to confirm the bug)
Just run this, and after about 30-60 minutes you should get
TypeError: Cannot read property 'CN' of undefined
at Object.checkServerIdentity (tls.js:182:37)
at TLSSocket.<anonymous> (_tls_wrap.js:1016:29)
at emitNone (events.js:67:13)
at TLSSocket.emit (events.js:166:7)
at TLSSocket._finishInit (_tls_wrap.js:566:8)
If you can figure out some sort of workaround without having to wait for an iojs update, that'd be really amazing too. I need this working fairly badly.
Maybe like a try { request } catch { //new-session-thing }? Dunno really.
I don't get what you mean. Are you asking if I'm resetting the request variable to something else elsewhere?
Nope, I'm not. It's just the one "request = require('request').defaults({jar: true, agent: agent})"
@sadtaco I wasn't sure if you was doing requests from a single js file, or not.
It is very odd that the problem is still happening for you, as it does not seem to be reproducible on my machine with these changes (and it is without them). I'm going to work on the test case, and will submit a PR as soon as I'll be able to reproduce it reliably.
Yeah, in a single file. Not really different from the test case I posted. Only difference is that it's triggered by an app.get('/...') instead of the setInterval.
Ah well, it's fine.
Activity
indutny commentedon Aug 5, 2015
Very interesting... I think I figured it out, will let you know once I'll test the change :)
Not sure if I will be able to provide a proper test case, though.
sadtaco commentedon Aug 6, 2015
If you can figure out some sort of workaround without having to wait for an iojs update, that'd be really amazing too. I need this working fairly badly.
Maybe like a try { request } catch { //new-session-thing }? Dunno really.
indutny commentedon Aug 6, 2015
The only workaround that I could think of at the moment is following:
This is the only way to disable session cache atm.
sadtaco commentedon Aug 6, 2015
I just tried that, at least I believe I set it up right.
to be exact. But I still got the same error.
indutny commentedon Aug 6, 2015
Here is some debugging data, just for reference:
indutny commentedon Aug 6, 2015
@sadtaco let me test it locally, perhaps I did a mistake there...
indutny commentedon Aug 6, 2015
@sadtaco appears to be fixing problem for me. Are you sure that you are reusing the
request.defaults({ ... })output everywhere?sadtaco commentedon Aug 6, 2015
I don't get what you mean. Are you asking if I'm resetting the request variable to something else elsewhere?
Nope, I'm not. It's just the one "request = require('request').defaults({jar: true, agent: agent})"
indutny commentedon Aug 6, 2015
@sadtaco I wasn't sure if you was doing requests from a single js file, or not.
It is very odd that the problem is still happening for you, as it does not seem to be reproducible on my machine with these changes (and it is without them). I'm going to work on the test case, and will submit a PR as soon as I'll be able to reproduce it reliably.
sadtaco commentedon Aug 6, 2015
Yeah, in a single file. Not really different from the test case I posted. Only difference is that it's triggered by an app.get('/...') instead of the setInterval.
Ah well, it's fine.
indutny commentedon Aug 6, 2015
Argh, I think I know why it wasn't working for you. May I ask you to give a try to:
indutny commentedon Aug 6, 2015
Ok, I know how to reproduce it ;) Hehe, will post a PR soon!
indutny commentedon Aug 6, 2015
Whoa, test took more lines than the fix #2312 ;)
sadtaco commentedon Aug 6, 2015
Nope, that work around didn't work still. Hope the fix does, though.
Is there a way to checkout an iojs with the fix or something?
tls: introduce internal `onticketkeycallback`
tls: fix check for reused session
tls: introduce internal `onticketkeycallback`
tls: fix check for reused session
shigeki commentedon Aug 8, 2015
Closed as landed of #2312 .
tls: introduce internal `onticketkeycallback`
tls: fix check for reused session
tls: introduce internal `onticketkeycallback`
tls: fix check for reused session