-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
i have encountered this error
TypeError: Cannot read property 'readUInt8' of undefined
at Bebop._packetReceiver (/home/kit/node_modules/node-bebop/lib/bebop.js:301:43)
at emitTwo (events.js:87:13)
at Socket.emit (events.js:172:7)
at UDP.onMessage (dgram.js:480:8)
as i test any command.
in fact i modify bebop.js like this
line 307 FROM
if ( networkFrame.id === constants.BD_NET_DC_EVENT_ID || networkFrame.id === constants.BD_NET_DC_NAVDATA_ID){
TO
if ( (networkFrame.id === constants.BD_NET_DC_EVENT_ID ||
networkFrame.id === constants.BD_NET_DC_NAVDATA_ID) && networkFrame.data !== undefined)
it seems sometime data field have lengfh but is empty.
{ type: 4,
id: 126,
seq: 53,
size: 15,
data: <Buffer 01 04 0f 00 03 00 00 00> }
{ type: 4, id: 126, seq: 54, size: 7 }
/home/kit/node_modules/node-bebop/lib/bebop.js:307
var commandProject = networkFrame.data.readUInt8(0),
^
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels