I noticed both in the firmware that shipped with BBBlack A5A and in the new 5/8/2013 firmware, the Cloud9 IDE doesn’t always seem to execute my code. This is consistent across 2 different BBBlack’s too.
Very simple app, one of the examples in fact:
var b=require(‘bonescript’);
b.pinMode(‘USR0’, ‘out’);
b.pinMode(‘USR1’, ‘out’);
b.pinMode(‘USR2’, ‘out’);
b.pinMode(‘USR3’, ‘out’);
b.digitalWrite(‘USR0’, 0);
b.digitalWrite(‘USR1’, 0);
b.digitalWrite(‘USR2’, 0);
b.digitalWrite(‘USR3’, 0);
Sometimes when I hit the play/debug button it runs and all the LEDs shut off, then I reset it (hitting the button on the bonescript example page that comes with its webserver) and try running play/debug again, this time it hangs (I see the stop button in place of the play/debug button) with no effects.
The IDE is running the program as “ps auxwww | grep node” shows:
root@beaglebone:~# ps auxwww | grep node
root 129 0.1 1.8 38996 9276 ? Ssl 00:00 0:01 /usr/bin/node autorun.js
root 130 2.2 3.5 57984 18160 ? Ssl 00:00 0:31 /usr/bin/node4 /usr/share/cloud9/bin/cloud9.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000
root 616 0.6 5.7 49612 29404 ? Ssl 00:01 0:09 /usr/bin/node server.js
root 1123 7.1 1.7 50676 8756 ? Sl 00:14 0:35 node --debug-brk=6066 /var/lib/cloud9/eric/ledoff.js
root 1151 0.0 0.1 1960 612 pts/0 S+ 00:22 0:00 grep node
Journalctl shows:
Jan 01 00:13:07 beaglebone node4[130]: Executing node node --debug-brk=6563 /var/lib/cloud9/eric/ledoff.js /var/lib/cloud9/
Jan 01 00:13:07 beaglebone node4[130]: publish state{“type”:“state”,“pythonProcessRunning”:false,“nodeDebugClient”:true,“nodeProcessRunning”:true,"workspace
Jan 01 00:14:30 beaglebone node4[130]: Executing node node --debug-brk=6066 /var/lib/cloud9/eric/ledoff.js /var/lib/cloud9/
Jan 01 00:14:30 beaglebone node4[130]: publish state{“type”:“state”,“pythonProcessRunning”:false,“nodeDebugClient”:true,“nodeProcessRunning”:true,"workspace
Jan 01 00:14:30 beaglebone node4[130]: uncaught exception:
Jan 01 00:14:31 beaglebone node4[130]: Error: Socket is not writable
Jan 01 00:14:31 beaglebone node4[130]: at Socket._writeOut (net.js:391:11)
Jan 01 00:14:31 beaglebone node4[130]: at Socket.write (net.js:377:17)
Jan 01 00:14:31 beaglebone node4[130]: at [object Object].send (/usr/share/cloud9/support/lib-v8debug/lib/v8debug/NodeSocket.js:97:22)
Jan 01 00:14:31 beaglebone node4[130]: at [object Object].$send (/usr/share/cloud9/support/lib-v8debug/lib/v8debug/StandaloneV8DebuggerService.js:67:22)
Jan 01 00:14:31 beaglebone node4[130]: at [object Object].debuggerCommand (/usr/share/cloud9/support/lib-v8debug/lib/v8debug/StandaloneV8DebuggerService.js:
Jan 01 00:14:31 beaglebone node4[130]: at [object Object].send (/usr/share/cloud9/server/cloud9/ext/run-node/nodedebugproxy.js:40:22)
Jan 01 00:14:31 beaglebone node4[130]: at [object Object].command (/usr/share/cloud9/server/cloud9/ext/run-node/run-node.js:95:41)
Jan 01 00:14:31 beaglebone node4[130]: at [object Object].execHook (/usr/share/cloud9/server/cloud9/workspace.js:47:58)
Jan 01 00:14:31 beaglebone node4[130]: at [object Object].onUserMessage (/usr/share/cloud9/server/cloud9/ide.js:317:24)
Jan 01 00:14:31 beaglebone node4[130]: at [object Object]. (/usr/share/cloud9/server/cloud9/ide.js:256:23)
Jan 01 00:14:35 beaglebone node4[130]: Running user disconnect timer…
Jan 01 00:14:37 beaglebone node4[130]: publish state{“type”:“state”,“pythonProcessRunning”:false,“nodeDebugClient”:true,“nodeProcessRunning”:true,"workspace
Jan 01 00:14:37 beaglebone node4[130]: publish state{“type”:“state”,“pythonProcessRunning”:false,“nodeDebugClient”:true,“nodeProcessRunning”:true,"workspace
Jan 01 00:14:37 beaglebone node4[130]: publish state{“type”:“state”,“pythonProcessRunning”:false,“nodeDebugClient”:true,“nodeProcessRunning”:true,"workspace
Jan 01 00:14:37 beaglebone node4[130]: publish state{“type”:“state”,“pythonProcessRunning”:false,“nodeDebugClient”:true,“nodeProcessRunning”:true,"workspace
Looks like it spends a minute and a half or so and then dumps some errors.
Running the command direct from SSH session works:
root@beaglebone:~# node /var/lib/cloud9/eric/ledoff.js
root@beaglebone:~#
(LEDs are off now)