Skip to content
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

When Intern timeouts on exit, throws a TypeError #576

Closed
kitsonk opened this issue Jan 25, 2016 · 5 comments
Closed

When Intern timeouts on exit, throws a TypeError #576

kitsonk opened this issue Jan 25, 2016 · 5 comments
Labels
needs-info Needs more information to diagnose

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Jan 25, 2016

When a NodeJS environment does not try to shutdown on a timely basis after Intern has finished executing, Intern logs that it thinks NodeJS has hung and then exits, but does not provide an exit code and then throws a type error:

Node.js hang detected; make sure to close all sockets, timers, and servers you opened during testing!
TypeError: Insufficient number of arguments.
at TypeError  <native>
at null._onTimeout  <node_modules/intern/lib/exitHandler.js:37:13>
at Timer.unrefdHandle  <timers.js:312:14>
@csnover
Copy link
Member

csnover commented Jan 26, 2016

The exit codes are normally provided by the process.once('exit') event listeners. This is some new API change/regression in Node.js if it can’t handle the zero-argument call to process.exit. What Node.js version does this start happening on?

@csnover csnover added the needs-info Needs more information to diagnose label Jan 26, 2016
@jason0x43
Copy link
Member

It doesn't seem to be due to an intentional change in Node. At least, the current docs still list the exit code as optional, a number of Node's self tests call process.exit(), and simply doing what the exit handler does (calling process.exit() in an unrefed timer) doesn't produce that error, at least not in any of my trials. (I tested with Node 0.10.35 ,0.11.0, 0.12.0, and 5.5.0.)

@sholladay
Copy link
Contributor

There have been some problems with unref'd timers recently, I wonder if they could be provoking this somehow.

nodejs/node#1264

Even though that ticket was.closed in late 2015, they are still calling it out in the release notes under Known Issues.

@jason0x43
Copy link
Member

Is this still a recurring issue, or has it been overcome by events? I was getting a NodeJS hang message consistently when using one of the Dig Dug tunnels (it wasn't shutting down properly), but never saw a TypeError.

@jason0x43
Copy link
Member

Closing this due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info Needs more information to diagnose
Projects
None yet
Development

No branches or pull requests

4 participants