question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to lock adapter 0 even though it is already locked

See original GitHub issue

Describe the bug Room Assistant seems to stop working after a while on an Intel NUC

To reproduce Steps required to reproduce the issue.

Relevant logs Log output that correlates to the bug. You can get debug output with room-assistant -v.

UnhandledPromiseRejectionWarning: Error: Trying to lock adapter 0 even though it is already locked
    at BluetoothService.lockAdapter (/usr/lib/node_modules/room-assistant/dist/integrations/bluetooth/bluetooth.service.js:107:23)
    at BluetoothService.inquireClassicRssi (/usr/lib/node_modules/room-assistant/dist/integrations/bluetooth/bluetooth.service.js:41:20)
    at BluetoothClassicService.handleRssiRequest (/usr/lib/node_modules/room-assistant/dist/integrations/bluetooth-classic/bluetooth-classic.service.js:92:52)
    at ClusterService.emit (events.js:315:20)
    at ClusterService.processEvent (/usr/lib/node_modules/room-assistant/node_modules/democracy/lib/democracy.js:372:12)
    at ClusterService.processEvent (/usr/lib/node_modules/room-assistant/dist/cluster/cluster.service.js:121:15)
    at Socket.<anonymous> (/usr/lib/node_modules/room-assistant/node_modules/democracy/lib/democracy.js:73:14)
    at Socket.emit (events.js:315:20)
    at UDP.onMessage [as onmessage] (dgram.js:910:8)
(node:187) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 810)

Relevant configuration Paste the relevant parts of your configuration below.

Expected behavior The error should not occur

Environment

  • room-assistant version: 2.11.2
  • installation type: Hass.io
  • hardware: NUC
  • OS: HomeAssistantOS

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
garv3commented, Aug 4, 2021

I get this error all the time on the current version 2.18.4!

0reactions
RobertusITcommented, Sep 16, 2021

I get the feeling it is something to do with the Bluetooth stack as the docker image hasn’t been rebuilt in a while so nothing has changed there it’s just working out what part! On Thu, 16 Sep 2021, 12:44 RobertusIT, @.***> wrote: Hass OS and room assistant integration Nuc Same error, impossible to track. [s6-init] making user provided files available at /var/run/s6/etc…exited 0. [s6-init] ensuring user provided files have correct perms…exited 0. [fix-attrs.d] applying ownership & permissions fixes… [fix-attrs.d] done. [cont-init.d] executing container initialization scripts… [cont-init.d] done. [services.d] starting services [services.d] done. [13:39:27] INFO: Setting up Home Assistant configuration [13:39:27] INFO: Copying room-assistant configuration from /config/room_assistant [13:39:27] INFO: Starting room-assistant *** WARNING *** The program ‘node’ uses the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see http://0pointer.de/blog/projects/avahi-compat.html *** WARNING *** The program ‘node’ called ‘DNSServiceRegister()’ which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see http://0pointer.de/blog/projects/avahi-compat.html 9/16/2021, 1:39:28 PM - info - IntegrationsModule: Loading integrations: bluetooth-classic 9/16/2021, 1:39:28 PM - info - NestFactory: Starting Nest application… 9/16/2021, 1:39:28 PM - info - InstanceLoader: AppModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: ConfigModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: NestEmitterModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: IntegrationsModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: HttpModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: DiscoveryModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: PrometheusModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: EventsModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: ClusterModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: TerminusModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: ScheduleModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: BluetoothModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: EntitiesModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: BluetoothClassicModule dependencies initialized 9/16/2021, 1:39:28 PM - info - InstanceLoader: StatusModule dependencies initialized 9/16/2021, 1:39:28 PM - info - RoutesResolver: EntitiesController {/entities}: 9/16/2021, 1:39:28 PM - info - RouterExplorer: Mapped {/entities, GET} route 9/16/2021, 1:39:28 PM - info - RoutesResolver: StatusController {/status}: 9/16/2021, 1:39:28 PM - info - RouterExplorer: Mapped {/status, GET} route 9/16/2021, 1:39:28 PM - info - RoutesResolver: PrometheusController {/metrics}: 9/16/2021, 1:39:28 PM - info - RouterExplorer: Mapped {/metrics, GET} route 9/16/2021, 1:39:28 PM - info - ConfigService: Loading configuration from /usr/lib/node_modules/room-assistant/dist/config/definitions/default.js, config/default.json, config/local.yml (Current: /room-assistant) 9/16/2021, 1:39:28 PM - error - ClusterService: Failed to start mdns discovery (dns service error: unknown) 9/16/2021, 1:39:28 PM - info - NestApplication: Nest application successfully started 9/16/2021, 1:39:30 PM - info - ClusterService: casa has been elected as leader 9/16/2021, 1:39:38 PM - error - BluetoothClassicService: Failed to retrieve RSSI for C7:2C:80:XX:XX:XX: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:39:48 PM - error - BluetoothClassicService: Failed to retrieve RSSI for C7:2C:80:XX:XX:XX: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:40:03 PM - error - BluetoothClassicService: Failed to retrieve RSSI for 64:a2:xx:xx:xx:xx: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:40:13 PM - error - BluetoothClassicService: Failed to retrieve RSSI for 64:a2:xx:xx:xx:xx: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:40:23 PM - error - BluetoothClassicService: Failed to retrieve RSSI for 64:a2:xx:xx:xx:xx: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:40:33 PM - error - BluetoothClassicService: Failed to retrieve RSSI for 64:a2:xx:xx:xx:xx: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:40:43 PM - error - BluetoothClassicService: Failed to retrieve RSSI for 64:a2:xx:xx:xx:xx: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:40:53 PM - error - BluetoothClassicService: Failed to retrieve RSSI for 64:a2:xx:xx:xx:xx: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:41:03 PM - error - BluetoothClassicService: Failed to retrieve RSSI for 64:a2:xx:xx:xx:xx: Trying to lock adapter 0 even though it is already locked 9/16/2021, 1:41:13 PM - error - BluetoothClassicService: Failed to retrieve RSSI for 64:a2:xx:xx:xx:xx: Trying to lock adapter 0 even though it is already locked — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#327 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXPVI4RIESIXKDGDNJOJY3UCHKAZANCNFSM4TFWITLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I didn’t understand, anyway I have tried to use bluetooth into NUC but also a usb CSR8510, no success.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to lock adapter 0 even though it is already locked #921
If the scheduler sees that the adapter is already in use (i.e locked) then it will skip sending a new request until the...
Read more >
Fix MicroSD Adapter Constantly Locking - YouTube
I am sure you have been presented with an annoying write error while trying to load and unload content from your MicroSD Cards...
Read more >
ActiveMQ KahaDB always locking and waiting - Stack Overflow
I am running ActiveMQ 5.9.0 on windows 7. Here is what prints out when I start it via cmd prompt: C:\activemq\apache-activemq- ...
Read more >
Cannot login as admin after upgrade vRealize Operations to ...
This issue can occur when an adapter instance, or another application has the incorrect Operations Manager admin password saved. The adapter ...
Read more >
Locking/Unlocking the Bootloader | Android Open Source ...
If set to 0 , the user needs to boot to the home screen, open the Settings > System > Developer options menu...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found