Restarts always on connecting/disconnecting a keyboard
See original GitHub issueHome Assistant Android version: 2022.6.0-full Android version: 12 Phone model: Galaxy S10 Home Assistant version: Coer 2022.6.6 Supervisor 2022.05.3 OS 8.2
Last working Home Assistant release (if known):
Description of problem: When I connect or disconnect a BT keyboard to my phone with the companion app on the screen, the companion app always restarts.
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
Screenshot of problem:
Additional information:
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
What to Do If Your Keyboard Keeps Disconnecting on ...
What to Do If Your Keyboard Keeps Disconnecting on Windows · 1. Restart the System · 2. Check the USB Port · 3....
Read more >Keyboard Keeps Disconnecting And Reconnecting? Here's ...
In most cases, the keyboard keeps disconnecting due to issues with the components (cables, ports, internal keyboard parts, etc.).
Read more >restart and no connection anymore with mouse and keyboard
Try the following: The keyboard may not be properly connected to the USB port. Try disconnecting and reconnecting the keyboard to the USB...
Read more >Fix: Keyboard Keeps Disconnecting and Reconnecting in ...
Fix: Keyboard Keeps Disconnecting and Reconnecting in Windows 10 [MiniTool Tips] ; Method 1: Turn off Power-Saving Option · expand the Keyboards ......
Read more >Keyboard keeps disconnecting in Windows 11/10 [Fixed]
Why does my keyboard keeps disconnecting? · Misconfigured settings · Power supply issues · Wireless or Bluetooth connection problems · Outdated ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t think this is a device specific issue, when plugging in a USB dongle with a keyboard the activity also restarts for me on a Google Pixel 4a. It is a documented configuration change, and by default this will cause the activity to restart. The ‘issue’ is just more apparent with Home Assistant because the frontend is reloaded.
This config change is only overruled in onboarding (
keyboardHidden
in manifest).Relevant log:
When plugging in the dongle I also see multiple
android.intent.action.BATTERY_CHANGED
broadcasts in the logs and WorkManager starting and a few hundred ms later cancelling the SensorWorker job, perhaps this is also causing the stack trace you’re seeing @dshokouhi ?I believe the cancellation is caused by the restarted activity because we can see the webview package log statement again shortly after the log I mentioned which is just before the cancellation.
Awesome thank you for testing that! Please feel free to submit the PR so we can get that corrected 😃