home-assistant / home-assistant/android
[Realme GT6 / Android 16] WebView fails to load external instances (OplusPredictiveBackController conflict) - Chrome works
- Dominant language
- Kotlin
- Stars
- 3.9k
- Forks
- 1.1k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 81
Description
Home Assistant Android app version(s):
2026.2.3-full (20424)
Android version(s):
Android 16
Device model(s):
Realme GT6
Home Assistant version:
Core 2026.2.2 / Frontend 20260128.6 (Container)
Last working Home Assistant release (if known):
Unknown
Description of problem, include YAML if issue is related to notifications:
I am experiencing an issue where the Companion App fails to load 4 out of my 5 Home Assistant servers when connecting remotely via external URL.
* Behavior: The app tries to load the external URL for the affected instances, shows a blank screen or loading state, and eventually fails or times out.
* Context:
* 4 Instances Fail: Specific servers fail to load in the App.
* 1 Instance Works: One specific server loads perfectly fine in the App using the same device and network.
* Crucial: All 5 servers (including the 4 failing ones) load perfectly fine in Chrome on the exact same Android device, ruling out server-side downtime, DNS issues, or Nabu Casa/Cloudflare tunnel failures.
* I have already removed the "Home Network" SSID from the app settings to force external access, but the issue persists on the 4 failing instances.
Companion App Logs:
D WebViewActivity: Loading https://server-fail.example.com/?external_auth=1 (keepHistory false, openInApp true, serverHandleInsets false)
D OplusPredictiveBackController: should not HookOnBackInvokedCallbackEnabled for application ...
W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
D WebViewActivity: Waiting for loadedUrl https://server-fail.example.com/?external_auth=1
...
D IntegrationRepositoryImpl: setAppActive(): false
D IntegrationRepositoryImpl: setAppActive(): false
...
D OplusViewDragTouchViewHelper: dispatchTouchView action = 1
D ViewRootImplExtImpl: the up motion event handled by client, just return
Screenshot or video of problem:
Additional information:
The logs indicate a conflict with OplusPredictiveBackController (Device specific) and WindowOnBackDispatcher specifically when loading these instances. The app repeatedly reports setAppActive(): false, preventing the authentication flow from completing.
Detailed log evidence analysis:
// EVIDENCE 1: WebView loading attempt triggers immediate Oplus/BackDispatcher warnings
// The app tries to load the URL, but the system's predictive back controller intervenes.
02-15 21:35:20.094 D WebViewActivity: Loading https://[REDACTED_URL]/?external_auth=1 (keepHistory false, openInApp true, serverHandleInsets false)
02-15 21:35:20.094 D OplusPredictiveBackController: should not HookOnBackInvokedCallbackEnabled for application io.homeassistant.companion.android.webview.WebViewActivity@e60db14 hasOnBackInvokedCallBackEnabled
02-15 21:35:20.094 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
02-15 21:35:20.094 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
02-15 21:35:20.097 D WebViewActivity: Waiting for loadedUrl https://[REDACTED_URL]/?external_auth=1
// EVIDENCE 2: App stuck in "Inactive" state during load
// Repeated entries showing the app believes it is not active, which likely pauses the rendering or authentication flow.
02-15 21:35:20.079 D IntegrationRepositoryImpl: setAppActive(): false
02-15 21:35:23.477 D IntegrationRepositoryImpl: setAppActive(): false
02-15 21:35:25.733 D IntegrationRepositoryImpl: setAppActive(): false
// EVIDENCE 3: Touch events being intercepted or swallowed by Oplus view helper
// Touch actions (up/down) are handled but result in "just return", indicating UI unresponsiveness.
02-15 21:35:20.040 D OplusViewDragTouchViewHelper: dispatchTouchView action = 6
02-15 21:35:20.072 D ViewRootImplExtImpl: the up motion event handled by client, just return
// EVIDENCE 4: Comparison - Successful load on a different instance (for reference)
// Showing that the external bus connects immediately on the one working server.
02-15 21:35:30.860 D WebViewActivity$webViewAddJavascriptInterface: External bus {"type":"config/get","id":1}
02-15 21:35:30.863 D WebViewActivity: Sending: externalBus({"id":1,"type":"result","success":true...
Contributor guide
Assessment
This issue has not been assessed yet.