Skip to content

RangeError: Index out of range on Rasbpi #2

Description

@efstajas

I'm getting this error every few seconds when running exactly the simple quick-start code from the readme.

`buffer.js:977
throw new RangeError('Index out of range');
^

RangeError: Index out of range
at checkOffset (buffer.js:977:11)
at Buffer.readUInt16LE (buffer.js:1023:5)
at BeaconParser._detectBeaconType (/home/pi/GitHub/transition/bt-node/node_modules/node-beacon-scanner/lib/parser.js:102:18)
at BeaconParser.parse (/home/pi/GitHub/transition/bt-node/node_modules/node-beacon-scanner/lib/parser.js:39:25)
at BeaconScanner.parse (/home/pi/GitHub/transition/bt-node/node_modules/node-beacon-scanner/lib/scanner.js:112:23)
at Noble.noble.on (/home/pi/GitHub/transition/bt-node/node_modules/node-beacon-scanner/lib/scanner.js:72:25)
at emitOne (events.js:116:13)
at Noble.emit (events.js:211:7)
at Noble.onDiscover (/home/pi/GitHub/transition/bt-node/node_modules/noble/lib/noble.js:178:10)
at emitMany (events.js:147:13)`

This does not happen with the same code on my OS X machine, but does happen on my Raspberry Pi 3 B.

I believe this is an issue with one of the devices in my vincinity broadcasting a wrongly formatted BT advertisement. Unfortunately, it's none of my devices so I can't check which one it is. What can I do? Also, shouldn't this error be caught by the catch in the start scanning function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions