Android companion takes over 15 seconds "Loading data" every cold open
See original GitHub issueHome 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:
- Due to using SSL and nginx, I only have an external address to use in companion and no internal address since the companion cannot accept a self signed cert or accept that the internal address with cert issue is acceptable (that’s all fine, just background info
- In troubleshooting, I simplified my Overview to one tab that only consists of a 15 switches and nothing else, disabled all sensors, cleared the storage for the app
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
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Slow rendering - Android Developers
To ensure that a user's interaction with your app is smooth, your app should render frames in under 16ms to achieve 60 frames...
Read more >Android Companion 2022.2: Local Push Notifications!
Local Push Notifications, In-App Changelog and more! ... all users will be presented with a changelog once they open the app after an...
Read more >Gallery is so slow and delete photos take a while
I updated my oneplus nord to android 11 and the gallery app is so slow when deleting a pic or updating the content...
Read more >How do I pass data between Activities in Android application?
class); intent.putExtra("EXTRA_SESSION_ID", sessionId); startActivity(intent);. Access that intent on the next activity: String ...
Read more >How to Sideload Android Apps On Your Hammerhead Karoo ...
Note that sideloading apps means that you can load something like the Zwift Companion app, or TrainerRoad, or any other Android app you...
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 FreeTop 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
Top GitHub Comments
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.
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.