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 }}
This repository has been archived by the owner on Dec 20, 2019. It is now read-only.
Ubuntu 17.10: Sphero 2 is connected on serialport rfcomm0. Getting the following error:
Unhandled rejection TypeError: Cannot read property 'write' of null
at Adaptor.write (/home/moarli/Dokumente/sphero/node_modules/sphero/lib/adaptors/serialport.js:86:19)
at Sphero._execCommand (/home/moarli/Dokumente/sphero/node_modules/sphero/lib/sphero.js:224:21)
at /home/moarli/Dokumente/sphero/node_modules/sphero/lib/sphero.js:184:10
at Promise._execute (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/debuggability.js:303:9)
at Promise._resolveFromExecutor (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/promise.js:483:1
8)
at new Promise (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/promise.js:79:10)
at Sphero.command (/home/moarli/Dokumente/sphero/node_modules/sphero/lib/sphero.js:180:10)
at Sphero.device.roll (/home/moarli/Dokumente/sphero/node_modules/sphero/lib/devices/sphero.js:445:12)
at /home/moarli/Dokumente/sphero/index.js:6:7
at tryCatcher (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/util.js:16:23)
at Promise.errorAdapter (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/nodeify.js:35:34)
at Promise._settlePromise (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/promise.js:566:21)
at Promise._settlePromiseCtx (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/promise.js:606:10)
at Async._drainQueue (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/async.js:138:12)
at Async._drainQueues (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/moarli/Dokumente/sphero/node_modules/bluebird/js/release/async.js:17:14)
/home/moarli/Dokumente/sphero/node_modules/sphero/lib/adaptors/serialport.js:86
this.serialport.write(data, callback);
^
TypeError: Cannot read property 'write' of null
at Adaptor.write (/home/moarli/Dokumente/sphero/node_modules/sphero/lib/adaptors/serialport.js:86:19)
at Sphero._execCommand (/home/moarli/Dokumente/sphero/node_modules/sphero/lib/sphero.js:224:21)
at Sphero.handler (/home/moarli/Dokumente/sphero/node_modules/sphero/lib/sphero.js:257:10)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Unhandled rejection TypeError: serialport.SerialPort is not a constructor
Unhandled rejection TypeError: Cannot read property 'write' of null
Apr 19, 2018
Looks like the call to node-serialport in the adaptor is wrong (in sphero/lib/adaptors/serialport.js). It says "new serialport.SerialPort(this.conn, {});" but should be "new serialport(this.conn, {});" Or preferable rename local var "serialport" to "SerialPort" like
var SerialPort = require("serialport");
Ubuntu 17.10: Sphero 2 is connected on serialport rfcomm0. Getting the following error:
The text was updated successfully, but these errors were encountered: