home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.32k stars 642 forks source link

Android companion takes over 15 seconds "Loading data" every cold open #1967

Closed will-l-h closed 1 year ago

will-l-h commented 2 years ago

Home Assistant Android version: 2021.10.0-full Android version: 12 Phone models: Pixel 6, Pixel 3 Home Assistant version: core-2021.11.5 Last working Home Assistant release (if known):

Description of problem: A cold open of the Android companion (it's been longer than 30 minutes since last open) takes over 15 seconds while waiting on the Loading data screen. If I immediately close the app (including swiping it from recent apps) and open again, it displays the Overview promptly. Using Chrome or the home screen shortcut (from "add to home screen"), is never slow; the page always displays within about a second.

Some other info:

Traceback: Slow, cold load:

--------- beginning of main
11-25 17:13:21.431  2418  5786 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/lib/arm64'
11-25 17:13:21.431  2418  5786 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/base.apk!/lib/arm64-v8a'
11-25 17:13:21.432  2418  5786 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/split_config.arm64_v8a.apk!/lib/arm64-v8a'
11-25 17:13:21.432  2418  5786 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/split_config.en.apk!/lib/arm64-v8a'
11-25 17:13:21.432  2418  5786 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/split_config.xxhdpi.apk!/lib/arm64-v8a'
11-25 17:13:21.432  2418  5786 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/split_config.xxxhdpi.apk!/lib/arm64-v8a'
11-25 17:13:21.437  2418  5786 D mali_cmarp_predictor: checking cmar_predictor for io.homeassistant.companion.android
11-25 17:13:21.463  2418  2418 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:21.463  2418  2418 D UrlRepository: Using external URL
11-25 17:13:21.463  2418  5806 I FA      : Tag Manager is not found and thus will not be used
11-25 17:13:21.464  2418  2418 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:21.468  2418  2469 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:21.533  2418  2418 I WebViewFactory: Loading com.google.android.webview version 96.0.4664.45 (code 466404534)
11-25 17:13:21.564  2418  2418 I cr_WVCFactoryProvider: Loaded version=96.0.4664.45 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
11-25 17:13:21.573  2418  2418 I cr_LibraryLoader: Successfully loaded native library
11-25 17:13:21.573  2418  2418 I cr_CachingUmaRecorder: Flushed 8 samples from 8 histograms.
11-25 17:13:21.618  2418  2418 D CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10234; state: ENABLED
11-25 17:13:21.645  2418  2418 D RenderScript HIDL Adaptation: IRenderScriptDevice::getService()
11-25 17:13:21.648  2418  2418 D RenderScript HIDL Adaptation: IRenderScriptDevice::getService() returned 0x0
11-25 17:13:21.648  2418  2418 D RenderScript HIDL Adaptation: Using Fallback Path.
11-25 17:13:21.661  2418  2418 D mpanion.androi: Successfully queried cache dir: /data/user_de/0/io.homeassistant.companion.android/code_cache
11-25 17:13:21.661  2418  2418 D RenderScript: Setting cache dir: /data/user_de/0/io.homeassistant.companion.android/code_cache
11-25 17:13:21.664  2418  2418 I System.out: recordForce value 5
11-25 17:13:21.664  2418  2418 D WebviewActivity: Current webview package com.google.android.webview and version 96.0.4664.45
11-25 17:13:21.702  2418  2418 D libEGL  : loaded /vendor/lib64/egl/libGLES_mali.so
11-25 17:13:21.713  2418  2418 D mali_cmarp_predictor: checking cmar_predictor for io.homeassistant.companion.android
11-25 17:13:21.739  2418  2459 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=6a9250cc-90b6-4042-81d1-a1d57acf8ec3, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
11-25 17:13:21.753  2418  2418 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:21.753  2418  2418 D UrlRepository: Using external URL
11-25 17:13:21.767  2418  5896 E chromium: [ERROR:vulkan_device_queue.cc(217)] Vulkan: Mali-G78
11-25 17:13:21.768  2418  5896 D mali_cmarp_predictor: checking cmar_predictor for io.homeassistant.companion.android
11-25 17:13:22.122  2418  2418 E chromium: [ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint (unset) for first_contentful_paint 0.297 s
11-25 17:13:22.129  2418  5935 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:22.129  2418  5935 D UrlRepository: Using external URL
11-25 17:13:31.772  2418  2418 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:32.536  2418  5934 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":1}
11-25 17:13:32.555  2418  2418 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:32.583  2418  2418 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:32.583  2418  2418 D UrlRepository: Using external URL
11-25 17:13:36.114  2418  5934 D WebviewActivity: External bus {"type":"config/get","id":2}
11-25 17:13:36.115  2418  2418 D WebviewActivity: externalBus({"id":2,"type":"result","success":true,"result":{"hasSettingsScreen":true,"canWriteTag":true,"hasExoPlayer":true}});
11-25 17:13:36.134  2418  2418 D WebviewActivity: Callback null
11-25 17:13:36.136  2418  2469 D WebViewPresenterImpl: Try getting status bar/navigation bar color from webviews color ""#101e24""
11-25 17:13:36.136  2418  2469 D WebViewPresenterImpl: Color from webview is "#101e24"
11-25 17:13:36.136  2418  2469 I WebViewPresenterImpl: Found color -15720924 for status bar/navigation bar
11-25 17:13:41.354  2418  5934 D WebviewActivity: External bus {"type":"config_screen/show","id":3}
11-25 17:13:41.384  2418  2418 D UrlRepository: Using external URL
11-25 17:13:41.384  2418  2418 D UrlRepository: Using external URL
11-25 17:13:41.384  2418  2418 D UrlRepository: Using external URL
11-25 17:13:41.384  2418  2418 D UrlRepository: Using external URL
11-25 17:13:41.386  2418  2418 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:13:47.062  2418  2437 I mpanion.androi: Thread[6,tid=2437,WaitingInMainSignalCatcherLoop,Thread*=0xb400007cc6c2ae90,peer=0x12c401c0,"Signal Catcher"]: reacting to signal 3
11-25 17:13:47.062  2418  2437 I mpanion.androi: 
11-25 17:13:47.632  2418  2437 I mpanion.androi: Wrote stack traces to tombstoned
11-25 17:13:51.790  2418  2418 I Choreographer: Skipped 1250 frames!  The application may be doing too much work on its main thread.
11-25 17:13:51.899  2418  2446 I OpenGLRenderer: Davey! duration=10521ms; Flags=1, FrameTimelineVsyncId=9088478, IntendedVsync=100533065920330, Vsync=100543482586580, InputEventId=0, HandleInputStart=100543483589335, AnimationStart=100543483590067, PerformTraversalsStart=100543485207580, DrawStart=100543551158264, FrameDeadline=100533082520330, FrameInterval=100543483566141, FrameStartTime=8333333, SyncQueued=100543553874165, SyncStart=100543554063903, IssueDrawCommandsStart=100543554227925, SwapBuffers=100543586435485, FrameCompleted=100543587520568, DequeueBufferDuration=10050, QueueBufferDuration=859293, GpuCompleted=100543587109436, SwapBuffersCompleted=100543587520568, DisplayPresentTime=0, 
11-25 17:13:51.899  2418  2697 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=15b3e52d-1e75-489e-9f02-54eaa26d1bf2, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
11-25 17:13:55.361  2418  2469 D LogcatReader: Read logcat for pid 2418

Warm, fast reload

--------- beginning of main
11-25 17:24:43.668  9034  9034 E mpanion.androi: Not starting debugger since process cannot load the jdwp agent.
11-25 17:24:43.682  9034  9034 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10234; state: DISABLED
11-25 17:24:43.700  9034  9034 W mpanion.androi: Entry not found
11-25 17:24:43.700  9034  9034 W mpanion.androi: Entry not found
11-25 17:24:43.700  9034  9034 W mpanion.androi: Entry not found
11-25 17:24:43.701  9034  9034 W mpanion.androi: Entry not found
11-25 17:24:43.702  9034  9034 W mpanion.androi: JIT profile information will not be recorded: profile file does not exist.
11-25 17:24:43.702  9034  9034 W mpanion.androi: JIT profile information will not be recorded: profile file does not exist.
11-25 17:24:43.702  9034  9034 W mpanion.androi: JIT profile information will not be recorded: profile file does not exist.
11-25 17:24:43.702  9034  9034 W mpanion.androi: JIT profile information will not be recorded: profile file does not exist.
11-25 17:24:43.705  9034  9034 V GraphicsEnvironment: ANGLE Developer option for 'io.homeassistant.companion.android' set to: 'default'
11-25 17:24:43.705  9034  9034 V GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported.
11-25 17:24:43.705  9034  9034 D NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: false
11-25 17:24:43.706  9034  9034 D NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: false
11-25 17:24:43.709  9034  9034 I FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
11-25 17:24:43.711  9034  9034 I FirebaseInitProvider: FirebaseApp initialization successful
11-25 17:24:43.711  9034  9034 D WM-WrkMgrInitializer: Initializing WorkManager with default configuration.
11-25 17:24:43.713  9034  9034 D Sentry  : io.sentry.auto-init read: false
11-25 17:24:43.713  9034  9034 I Sentry  : Retrieving auto-init from AndroidManifest.xml
11-25 17:24:43.716  9034  9053 I DynamiteModule: Considering local module com.google.android.gms.measurement.dynamite:51 and remote module com.google.android.gms.measurement.dynamite:54
11-25 17:24:43.716  9034  9053 I DynamiteModule: Selected remote version of com.google.android.gms.measurement.dynamite, version >= 54
11-25 17:24:43.716  9034  9053 V DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
11-25 17:24:43.716  9034  9071 D CompatibilityChangeReporter: Compat change id reported: 160794467; UID 10234; state: DISABLED
11-25 17:24:43.721  9034  9053 W mpanion.androi: ClassLoaderContext type mismatch. expected=PCL, found=DLC (PCL[] | DLC[];PCL[/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/base.apk*3238589247:/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/base.apk!classes2.dex*2674919:/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/base.apk!classes3.dex*1223078401])
11-25 17:24:43.730  9034  9099 D Sentry  : SU isn't found on this Device.
11-25 17:24:43.731  9034  9107 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/lib/arm64'
11-25 17:24:43.727  9034  9034 W pool-16-thread-: type=1400 audit(0.0:20670): avc: denied { read } for name="version" dev="proc" ino=4026532000 scontext=u:r:untrusted_app:s0:c234,c256,c512,c768 tcontext=u:object_r:proc_version:s0 tclass=file permissive=0 app=io.homeassistant.companion.android
11-25 17:24:43.731  9034  9107 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/base.apk!/lib/arm64-v8a'
11-25 17:24:43.731  9034  9107 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/split_config.arm64_v8a.apk!/lib/arm64-v8a'
11-25 17:24:43.731  9034  9107 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/split_config.en.apk!/lib/arm64-v8a'
11-25 17:24:43.731  9034  9107 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/split_config.xxhdpi.apk!/lib/arm64-v8a'
11-25 17:24:43.731  9034  9107 D vulkan  : searching for layers in '/data/app/~~ViximQqz4pmTmfiUyfLBwA==/io.homeassistant.companion.android-AWbobKGQShSPYRaLktR1Rw==/split_config.xxxhdpi.apk!/lib/arm64-v8a'
11-25 17:24:43.734  9034  9107 D mali_cmarp_predictor: checking cmar_predictor for io.homeassistant.companion.android
11-25 17:24:43.741  9034  9094 I FA      : App measurement initialized, version: 45018
11-25 17:24:43.741  9034  9094 I FA      : To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
11-25 17:24:43.741  9034  9094 I FA      : To enable faster debug mode event logging run:
11-25 17:24:43.741  9034  9094 I FA      :   adb shell setprop debug.firebase.analytics.app io.homeassistant.companion.android
11-25 17:24:43.755  9034  9034 D SensorReceiver: Sensor audio_sensor corresponding to received event android.media.RINGER_MODE_CHANGED is disabled, skipping sensors update
11-25 17:24:43.756  9034  9094 I FA      : Tag Manager is not found and thus will not be used
11-25 17:24:43.764  9034  9034 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:24:43.764  9034  9034 D UrlRepository: Using external URL
11-25 17:24:43.765  9034  9034 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:24:43.771  9034  9087 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:24:43.783  9034  9089 D SensorReceiver: Nothing to update
11-25 17:24:43.827  9034  9034 I WebViewFactory: Loading com.google.android.webview version 96.0.4664.45 (code 466404534)
11-25 17:24:43.852  9034  9034 I cr_WVCFactoryProvider: Loaded version=96.0.4664.45 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
11-25 17:24:43.860  9034  9034 I cr_LibraryLoader: Successfully loaded native library
11-25 17:24:43.860  9034  9034 I cr_CachingUmaRecorder: Flushed 8 samples from 8 histograms.
11-25 17:24:43.895  9034  9034 D CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10234; state: ENABLED
11-25 17:24:43.924  9034  9034 D RenderScript HIDL Adaptation: IRenderScriptDevice::getService()
11-25 17:24:43.925  9034  9034 D RenderScript HIDL Adaptation: IRenderScriptDevice::getService() returned 0x0
11-25 17:24:43.925  9034  9034 D RenderScript HIDL Adaptation: Using Fallback Path.
11-25 17:24:43.929  9034  9034 D mpanion.androi: Successfully queried cache dir: /data/user_de/0/io.homeassistant.companion.android/code_cache
11-25 17:24:43.929  9034  9034 D RenderScript: Setting cache dir: /data/user_de/0/io.homeassistant.companion.android/code_cache
11-25 17:24:43.933  9034  9034 I System.out: recordForce value 5
11-25 17:24:43.934  9034  9034 D WebviewActivity: Current webview package com.google.android.webview and version 96.0.4664.45
11-25 17:24:43.960  9034  9034 D libEGL  : loaded /vendor/lib64/egl/libGLES_mali.so
11-25 17:24:43.972  9034  9034 D mali_cmarp_predictor: checking cmar_predictor for io.homeassistant.companion.android
11-25 17:24:43.997  9034  9080 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=dc1cd264-48fd-4a8a-99a1-7832945b4687, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
11-25 17:24:44.008  9034  9034 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:24:44.008  9034  9034 D UrlRepository: Using external URL
11-25 17:24:44.014  9034  9286 E chromium: [ERROR:vulkan_device_queue.cc(217)] Vulkan: Mali-G78
11-25 17:24:44.014  9034  9286 D mali_cmarp_predictor: checking cmar_predictor for io.homeassistant.companion.android
11-25 17:24:44.296  9034  9034 E chromium: [ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint (unset) for first_contentful_paint 0.239 s
11-25 17:24:44.771  9034  9348 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":1}
11-25 17:24:44.773  9034  9034 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:24:44.986  9034  9348 D WebviewActivity: External bus {"type":"config/get","id":2}
11-25 17:24:44.987  9034  9034 D WebviewActivity: externalBus({"id":2,"type":"result","success":true,"result":{"hasSettingsScreen":true,"canWriteTag":true,"hasExoPlayer":true}});
11-25 17:24:45.031  9034  9034 D WebviewActivity: Callback null
11-25 17:24:45.032  9034  9087 D WebViewPresenterImpl: Try getting status bar/navigation bar color from webviews color ""#101e24""
11-25 17:24:45.032  9034  9087 D WebViewPresenterImpl: Color from webview is "#101e24"
11-25 17:24:45.033  9034  9087 I WebViewPresenterImpl: Found color -15720924 for status bar/navigation bar
11-25 17:24:49.067  9034  9348 D WebviewActivity: External bus {"type":"config_screen/show","id":3}
11-25 17:24:49.099  9034  9034 D UrlRepository: Using external URL
11-25 17:24:49.099  9034  9034 D UrlRepository: Using external URL
11-25 17:24:49.099  9034  9034 D UrlRepository: Using external URL
11-25 17:24:49.099  9034  9034 D UrlRepository: Using external URL
11-25 17:24:49.101  9034  9034 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-25 17:24:54.878  9034  9040 I mpanion.androi: Thread[3,tid=9040,WaitingInMainSignalCatcherLoop,Thread*=0xb400007cc6c276f0,peer=0x142401c0,"Signal Catcher"]: reacting to signal 3
11-25 17:24:54.878  9034  9040 I mpanion.androi: 
11-25 17:24:55.422  9034  9040 I mpanion.androi: Wrote stack traces to tombstoned
11-25 17:24:59.450  9034  9034 I Choreographer: Skipped 1243 frames!  The application may be doing too much work on its main thread.
11-25 17:24:59.584  9034  9049 I OpenGLRenderer: Davey! duration=10494ms; Flags=1, FrameTimelineVsyncId=9163935, IntendedVsync=101074706253330, Vsync=101085064586249, InputEventId=0, HandleInputStart=101085071659708, AnimationStart=101085071660603, PerformTraversalsStart=101085073181070, DrawStart=101085148754760, FrameDeadline=101074722853330, FrameInterval=101085071599934, FrameStartTime=8333333, SyncQueued=101085150934244, SyncStart=101085151129720, IssueDrawCommandsStart=101085151271647, SwapBuffers=101085199769409, FrameCompleted=101085201278605, DequeueBufferDuration=10864, QueueBufferDuration=1464803, GpuCompleted=101085200455159, SwapBuffersCompleted=101085201278605, DisplayPresentTime=0, 
11-25 17:24:59.592  9034  9260 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=36b8a2bc-6edb-4e20-8159-e7b5f06ec8c1, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
11-25 17:25:02.179  9034  9090 D LogcatReader: Read logcat for pid 9034

Screenshot of problem: Waiting

Occasionally get this while waiting, too

dshokouhi commented 2 years ago

Looking at the logs it took this long for the HA frontend to notify the app that the connection was established.

11-25 17:13:21.664 2418 2418 D WebviewActivity: Current webview package com.google.android.webview and version 96.0.4664.45

11-25 17:13:32.536 2418 5934 D WebviewActivity: External bus {"type":"connection-status","payload":{"event":"connected"},"id":1

I don't know if this is something the app can fix.

will-l-h commented 2 years ago

Are you saying this is an issue for everyone on Android companion?

There isn't something that can be done about whatever is blocking the download during that period? My internet connection is fine...

dshokouhi commented 2 years ago

Are you saying this is an issue for everyone on Android companion?

No I haven't seen it yet and this is the first I'm hearing of it. Can you try disabling all custom cards and integrations and see if it gets better?

There isn't something that can be done about whatever is blocking the download during that period? My internet connection is fine...

No the app loads the interface and waits for the frontend to tell us it's ready.

will-l-h commented 2 years ago

I'll disable custom integrations on HA but "custom cards"... I mentioned I already simplified the Overview to just some switches. What else should I do in that regard?

dshokouhi commented 2 years ago

Lovelace will still attempt to load any custom card resource that you have added to HA under Configuration > Lovelace Dashboard > Resources

will-l-h commented 2 years ago

Lovelace Dashboard > Resources was already empty. I've disabled all but a few integrations and most anything else I can think of. Any other hints before I start from scratch?

dshokouhi commented 2 years ago

I see you also mentioned that occasionally you get the cannot connect pop-up.. Next time you see that pop-up go to Settings and then get the logs so we can see why that pop-up showed up. That will be the best hint to what the cause might be.

will-l-h commented 2 years ago

I've started fresh with everything (listed below) and with this setup, I can now use the HA internal IP with Companion. When I'm on my home wifi, the dashboard always opens promptly. When I'm away from home I still get the 15 second delay. I would think this rules out integrations, custom components, or anything within HA on the server since they would slow down the internal IP connection as well, right? Regardless, since it is a fresh install I have kept the install minimal so I only have: Z-Wave JS, Tasmota, MQTT, Mobile App on my integrations page and I haven't added any custom cards.

Here's the log after not using the app for 20 minutes and while waiting for the dashboard to load; wifi off, 5g connected with 62 mbps:


02-26 15:56:04.535 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.535 31342 31342 D UrlRepository: Using external URL
02-26 15:56:04.539 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.542 31342 31420 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Received location update.
02-26 15:56:04.565 31342 31342 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Last Location: 
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Coords:(35.9874091, -83.9182206)
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Accuracy: 16.207
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Bearing: 0.0
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
02-26 15:56:04.565 31342 31342 D LocBroadcastReceiver: Received location that is 50 milliseconds old, 1645908964515 compared to 1645908964565 with source fused
02-26 15:56:04.566 31342 31342 D LocBroadcastReceiver: Duplicate location received, not sending to HA
02-26 15:56:04.591 31342 31342 I System.out: recordForce value 5
02-26 15:56:04.591 31342 31342 D WebviewActivity: Current webview package com.google.android.webview and version 98.0.4758.101
02-26 15:56:04.627 31342 31420 D SensorWorker: Updating all Sensors.
02-26 15:56:04.628 31342 31384 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=e03145ec-119f-4ecc-9fad-27cb313f3f6b, tags={ io.homeassistant.companion.android.websocket.WebsocketManager } ]
02-26 15:56:04.634 31342 31384 I WM-Processor: Moving WorkSpec (d254c276-3c22-4501-9030-d350a6d4f8dc) to the foreground
02-26 15:56:04.636 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.636 31342 31342 D UrlRepository: Using external URL
02-26 15:56:04.659 31342 31342 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
02-26 15:56:04.689 31342 31420 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:04.917 31342 31385 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=d254c276-3c22-4501-9030-d350a6d4f8dc, tags={ io.homeassistant.companion.android.sensors.SensorWorker } ]
02-26 15:56:04.918 31342 31342 I WM-SystemFgDispatcher: Stopping foreground service
02-26 15:56:04.997 31342 32448 D WebviewActivity: External bus {"type":"config/get","id":1}
02-26 15:56:04.999 31342 31342 D WebviewActivity: externalBus({"id":1,"type":"result","success":true,"result":{"hasSettingsScreen":true,"canWriteTag":true,"hasExoPlayer":true}});
02-26 15:56:05.042 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:05.042 31342 31342 D UrlRepository: Using external URL
02-26 15:56:05.042 31342 31342 D WebviewActivity: Callback null
02-26 15:56:05.042 31342 31342 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
02-26 15:56:05.042 31342 31342 D WebviewActivity: Color from webview is "#101e24-SPACER-#111111"
02-26 15:56:05.042 31342 31420 D WebViewPresenterImpl: Try getting color from webview color "#101e24".
02-26 15:56:05.042 31342 31420 I WebViewPresenterImpl: Found color -15720924.
02-26 15:56:05.043 31342 31420 D WebViewPresenterImpl: Try getting color from webview color "#111111".
02-26 15:56:05.043 31342 31420 I WebViewPresenterImpl: Found color -15658735.
02-26 15:56:14.645 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:21.040 31342 32334 D OpenGLRenderer: endAllActiveAnimators on 0xb4000074064213b0 (RippleDrawable) with handle 0xb400007316397f70
02-26 15:56:21.064 31342 31342 D UrlRepository: localUrl is: true and usesInternalSsid is: false
02-26 15:56:21.064 31342 31342 D UrlRepository: Using external URL
will-l-h commented 2 years ago

I'm at a loss on what else to do given the barebones setup. Could I get some guidance on what else might be the cause here or could more logging be added to help troubleshoot?

dshokouhi commented 2 years ago

I'm at a loss on what else to do given the barebones setup. Could I get some guidance on what else might be the cause here or could more logging be added to help troubleshoot?

The loading data screen that you see is from the HA frontend and is not a screen in the app. The pop-up you reported gets displayed when the HA frontend tells the app that it has been disconnected. The app is already providing as much logging as we can the delay is out of the apps control.

will-l-h commented 2 years ago

The recap for the slow opening after 30 minutes is:

But you're saying the issue lies with the HA frontend and not with the Companion app? I've ever tried docker container and not added anything to it, just creating a login--same issue.

dshokouhi commented 2 years ago

Yes that is correct the HA frontend controls the loading data screen and the pop-up only shows up when the frontend tells the app it's disconnected.

dshokouhi commented 1 year ago

just checking in to see if this is still an issue with the latest app version

dshokouhi commented 1 year ago

Closing due to lack of response