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

Cannot set property 'dkModule' of undefined #14

Open
peternoyes opened this issue Jul 5, 2016 · 2 comments
Open

Cannot set property 'dkModule' of undefined #14

peternoyes opened this issue Jul 5, 2016 · 2 comments

Comments

@peternoyes
Copy link

I am periodically seeing this:

/home/pi/.npm-global/lib/node_modules/bluz-gateway/app.js:106
peripheralList[peripheral.id].dkModule = bluzMod;
^

TypeError: Cannot set property 'dkModule' of undefined
at /home/pi/.npm-global/lib/node_modules/bluz-gateway/app.js:106:50
at Peripheral. (/home/pi/.npm-global/lib/node_modules/bluz-gateway/node_modules/noble/lib/peripheral.js:73:7)
at Peripheral.g (events.js:260:16)
at emitOne (events.js:77:13)
at Peripheral.emit (events.js:169:7)
at Noble.onServicesDiscover (/home/pi/.npm-global/lib/node_modules/bluz-gateway/node_modules/noble/lib/noble.js:208:16)
at emitTwo (events.js:87:13)
at emit (events.js:172:7)
at NobleBindings.onServicesDiscovered (/home/pi/.npm-global/lib/node_modules/bluz-gateway/node_modules/noble/lib/hci-socket/bindings.js:291:8)
at emitTwo (events.js:87:13)


I am running on a Raspberry Pi 3
Only trying to connect with a single bluz for now.

Sometimes this happens as soon as I start the service. Other times it happens after being online for a few minutes. Related to this is that I cannot start the service on boot.

@mgmorcos
Copy link

mgmorcos commented Nov 3, 2016

👍

@eely22
Copy link
Collaborator

eely22 commented Feb 3, 2017

This seems to be related to the checkForDeadPeripherals call, it may be clearing out values from the array between when the disconnect/reconnect, thereby causing the error. Commenting out this line seems to solve the issue, but I am still investigating if/when old peripherals need to be cleaned out.

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

3 participants