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

i got this error message and my app crash, when using johnny-five #6370

Closed
mohammedgqudah opened this issue Jan 5, 2018 · 2 comments
Closed

Comments

@mohammedgqudah
Copy link

NWJS Version : v0.27.3
Operating System : ubuntu

i am using johnny-five to blink my led but when the app start arduino built-in leds blink and the app crash :(

Expected behavior

arduino should blink

Actual behavior

error, this is the error:

Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object])
    at Board.emit (events.js:140:19)
    at Board.log (/home/mohammed/node_modules/johnny-five/lib/board.js:630:8)
    at Board.(anonymous function) [as error] (/home/mohammed/node_modules/johnny-five/lib/board.js:641:14)
    at Board.<anonymous> (/home/mohammed/node_modules/johnny-five/lib/board.js:385:14)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)
Error: async hook stack has become corrupted (actual: 9, expected: 10)
 1: node::Environment::AsyncHooks::pop_async_id(double) [/home/mohammed/Desktop/node-webkit-projects/app/node_modules/nw/nwjs/lib/libnode.so]
 2: node::InternalCallbackScope::Close() [/home/mohammed/Desktop/node-webkit-projects/app/node_modules/nw/nwjs/lib/libnode.so]
 3: node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/home/mohammed/Desktop/node-webkit-projects/app/node_modules/nw/nwjs/lib/libnode.so]
 4: 0x7fcfebbdf2e1 [/home/mohammed/Desktop/node-webkit-projects/app/node_modules/nw/nwjs/lib/libnode.so]
 5: 0x7fcfebff2056 [/home/mohammed/Desktop/node-webkit-projects/app/node_modules/nw/nwjs/lib/libnode.so]
 6: uv_run [/home/mohammed/Desktop/node-webkit-projects/app/node_modules/nw/nwjs/lib/libnode.so]
 7: 0x7fcfffd23cd3 [/home/mohammed/Desktop/node-webkit-projects/app/node_modules/nw/nwjs/lib/libnw.so]

my js:

var five = require('johnny-five');
var board = new five.Board();

board.on('ready', function() {
  var led = new five.Led(12);
  led.blink(500);
});

@mohammedgqudah mohammedgqudah changed the title i got this error message and my app crash i got this error message and my app crash, when using johnny-five Jan 5, 2018
@rogerwang
Copy link
Member

Will look into it. Please see workaround in #6153

@rogerwang
Copy link
Member

It's expected as exceptions thrown from callbacks. see nodejs/node#16156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants