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.

Long reconnection

See original GitHub issue

Home Assistant Android version: 2021.4.1-full

Android version: 10

Phone model: Xiaomi Mi 9T Pro

Home Assistant version: core-2021.4.1

Last working Home Assistant release (if known): None

Description of problem: Whenever I use the HA Companion Anroid app after more than 30 minutes it takes long time to connect (around 10 seconds). When I use the app again within an about 30 minutes time frame, it only takes 1-2 seconds to connect / load. This issue is not observed in Google Chrome on the same phone and neither in the iOS Companion App on an iPad.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):

04-09 20:35:42.333 12698 14436 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"disconnected"},"id":3}
04-09 20:35:42.344 12698 14439 D SensorWorker: Updating all Sensors.
04-09 20:35:42.345 12698 14420 I WM-Processor: Moving WorkSpec (dacb3342-b466-409a-940a-c01e49d91abf) to the foreground
04-09 20:35:42.348 12698 12698 D UrlRepository: localUrl is: false and usesInternalSsid is: false
04-09 20:35:42.348 12698 12698 D UrlRepository: Using external URL
04-09 20:35:42.369 12698 12698 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
04-09 20:35:42.431 12698 21468 D UrlRepository: localUrl is: false and usesInternalSsid is: false
04-09 20:35:42.431 12698 21468 D UrlRepository: Using external URL
04-09 20:35:42.552 12698 14439 D UrlRepository: localUrl is: false and usesInternalSsid is: false
04-09 20:35:52.916 12698 14421 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=dacb3342-b466-409a-940a-c01e49d91abf, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
04-09 20:35:52.920 12698 12698 I WM-SystemFgDispatcher: Stopping foreground service
04-09 20:35:52.988 12698 14436 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":4}
04-09 20:35:52.991 12698 12698 D UrlRepository: localUrl is: false and usesInternalSsid is: false
2021-04-09 20:35:43 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [547233181856] Connected from 79.195.76.244
2021-04-09 20:35:43 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [547233181856] Sending {"type": "auth_required", "ha_version": "2021.4.1"}
...
2021-04-09 20:35:52 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [547233181856] Received {'type': 'auth', 'access_token':

Screenshot of problem: 1617996148381-2

Additional information: Also tried force stopping the application and relaunching it as well as the deleting all data / cache.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dshokouhicommented, Apr 10, 2021

The cannot connect pop-up only shows up when the frontend tells the app the connection was disconnected. It also disappears when the frontend tells the app the connection restored. This doesn’t appear to be an issue with the app. I suggest opening a frontend issue for this. If the app doesnt get a response from your server in 10 seconds it will also show the pop-up. Closing unless we can find an actual error from the app suggesting the issue is with the app.

0reactions
balu79commented, Apr 10, 2021

I actually get a cannot connect pop-up. It pops up at the end of the loading process (so after around 10 seconds) and usually disappears immidiately / in an instant. Caputered it now with screen recording, the error message is: Unable to connect to Home Assistant - There was an error loading Home Assistant, please review the connection settings and try again.

Also was following the following thread since some of the error behaviour descriptions where similiar but couldn’t figure out a solution for me (e.g. I’m not using Nginx): https://community.home-assistant.io/t/android-app-unable-to-connect-to-home-assistant/158322/11

Read more comments on GitHub >

github_iconTop Results From Across the Web

Long reconnection time after a DirectAccess server ...
In this scenario, the client requires up to 15 minutes to automatically reconnect to the DirectAccess server after the VPN connection is disconnected....
Read more >
Reconnect service FAQs - Verizon
Find out how to reconnect your devices after a service suspension. ... Learn about reconnecting a suspended mobile line on a standard monthly...
Read more >
Cassini in situ observations of long-duration magnetic ... - Nature
The region where magnetic fields reconnect is known as the diffusion region and in this letter we report on the first encounter of...
Read more >
Long and Active Magnetopause Reconnection X‐Lines ...
These magnetic connection points slide along component reconnection tilted X-lines and also connect several times to the anti-parallel section ...
Read more >
Long-term neuronal survival, regeneration, and transient ...
We found that MSCs promoted long-term neuroprotection, long-distance axon regeneration, and synaptic reconnection after optic nerve crush.
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