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

TypeError: Cannot read property 'on' of undefined #136

Open
TobiasKarl opened this issue Jul 12, 2021 · 0 comments
Open

TypeError: Cannot read property 'on' of undefined #136

TobiasKarl opened this issue Jul 12, 2021 · 0 comments

Comments

@TobiasKarl
Copy link

TobiasKarl commented Jul 12, 2021

Hello! I have an issue with connecting to the hub sometimes. Around every other time, I get the following error message below. Do you have any clue what could be the problem?

Thanks!

(Piece of code used to connect to hub)
poweredUP.scan(); // Start scanning for Hubs
console.log("Scanning for Hubs...");
poweredUP.on("discover", async (hub) => {
await hub.connect();
});

/home/apclinux/vcontr/node_modules/node-poweredup/dist/node/nobleabstraction.js:89
this._characteristics[uuid].on("data", (data) => {
^

TypeError: Cannot read property 'on' of undefined
at NobleDevice.subscribeToCharacteristic (/home/apclinux/vcontr/node_modules/node-poweredup/dist/node/nobleabstraction.js:89:37)
at TechnicMediumHub.connect (/home/apclinux/vcontr/node_modules/node-poweredup/dist/node/hubs/lpf2hub.js:43:25)
at async TechnicMediumHub.connect (/home/apclinux/vcontr/node_modules/node-poweredup/dist/node/hubs/technicmediumhub.js:48:9)
at async PoweredUP. (/home/apclinux/vcontr/vcontr.js:141:17)

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

1 participant