New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Auto)Reconnect from unreachable server popup not working #4272
Comments
I don't understand the purpose of this issue. The pop-up is telling you the server is inaccessible. Also why is the issue template missing? |
build MinimalDebug Bug in android/app/src/main/java/io/homeassistant/companion/android/webview/WebViewActivity.kt Line 1358 in 2373127
Start the server after the pop-up. The SETTINGS button calls up settings. But after returning the page is not updated. The REFRESH button refreshes the page. The WAIT button only returns the error again. |
You are still missing the most important part. The logs which may still show an issue, the pop-up only shows up when we get an error if you follow the condition. |
Standard condition: It's easy to reproduce the error. |
Please don't skip the logs |
This piece of strange code has no logs! |
WebView calls a pop-up to update frozen WebView. After connecting to the server, reconnection is done through JavaScript without this pop-up. |
So there's no bug here, you are requesting 2 features:
|
The pop-up shows up when there is an error connecting to the server or the app did not receive the connection status reported by the frontend. Either case will be reflected in the logs, you either see an error or a 10 second gap for when the pop-up shows up due to no response from the frontend. If the HA frontend reports the connection re-established the app will remove the pop-up. That check is done every 10 seconds. |
bug.mp4build MinimalDebug Bug in android/app/src/main/java/io/homeassistant/companion/android/webview/WebViewActivity.kt Line 1358 in 2373127
alert.setMessage(commonR.string.webview_error)
alert.setPositiveButton(commonR.string.settings) { _, _ ->
startActivity(SettingsActivity.newInstance(this))
// NO webView.loadUrl()
}
val isInternal = serverManager.getServer(presenter.getActiveServer())?.connection?.isInternal() == true
alert.setNegativeButton(
if (failedConnection == "external" && isInternal) {
commonR.string.refresh_internal
} else {
commonR.string.refresh_external
}
) { _, _ ->
runBlocking {
failedConnection = if (failedConnection == "external") {
serverManager.getServer(presenter.getActiveServer())?.let { webView.loadUrl(it.connection.getUrl(true).toString()) }
"internal"
} else {
serverManager.getServer(presenter.getActiveServer())?.let { webView.loadUrl(it.connection.getUrl(false).toString()) }
"external"
}
// webView.loadUrl() reloads the page!
}
waitForConnection() // FAKE! Only checks variables...
}
alert.setNeutralButton(commonR.string.wait) { _, _ ->
waitForConnection() // FAKE! Only checks variables...
// NO webView.loadUrl()
} |
The server is already up! How can I disable this window?
The local server may be temporarily unavailable. Why is there no normal server wait? You need to add another server without accidentally clicking.
I want to see a normal page (not a pop-up!) with the inscription:
The text was updated successfully, but these errors were encountered: