Skip to content
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

Main UI shows blank page in remote mode #3601

Open
Flowdalic opened this issue Feb 21, 2024 · 11 comments
Open

Main UI shows blank page in remote mode #3601

Flowdalic opened this issue Feb 21, 2024 · 11 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@Flowdalic
Copy link

I can't get OpenHAB Android 3.9.0 nor 3.10.0 to show the Main UI in remote mode (using OpenHAB 4.1.1).

While it shows the Main UI in local mode (note the Wifi symbol in the upper right corner):

screenshot-with
The same thing looks empty once I turn of Wifi and go into the remote mode:

screenshot-without

As far as I can tell, OpenHAB Android is able to retrieve and use the sitemap. It's "just" the Main UI that does not show.

The Android log of the habdroid app also does not look suspicious (at least, to me):

2024-02-17 18:18:04.688  6743-6743  PageConnec...erFragment org.openhab.habdroid                 D  updateActiveConnections: URL list [https://myopenhab.org/rest/sitemaps/uicomponents_Sitemap/uicomponents_Sitemap], connection org.openhab.habdroid.core.connection.DefaultConnection@628eb6
2024-02-17 18:18:04.694  6743-6743  ServerConfiguration     org.openhab.habdroid                 D  load: ServerConfiguration(id=1, name=openHAB, localPath=ServerPath(url=https://192.168.188.43:8443/, userName=<redacted>, password=<redacted>), remotePath=ServerPath(url=https://myopenhab.org/, userName=<redacted>, password=<redacted>), sslClientCert=null, defaultSitemap=DefaultSitemap(name=uicomponents_Sitemap, label=Sitemap), wifiSsids=[MyWifi], restrictToWifiSsids=true, frontailUrl=null)
2024-02-17 18:18:04.710  6743-6743  WidgetListFragment      org.openhab.habdroid                 D  onPause() https://myopenhab.org/rest/sitemaps/uicomponents_Sitemap/uicomponents_Sitemap
2024-02-17 18:18:04.767  1996-5678  ConnectivityService     system_server                        D  requestNetwork for uid/pid:10485/6743 activeRequest: null callbackRequest: 11579 [NetworkRequest [ REQUEST id=11580, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10485 RequestorUid: 10485 RequestorPkg: org.openhab.habdroid UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647
2024-02-17 18:18:04.773  1996-2794  WifiNetworkFactory      system_server                        D  got request NetworkRequest [ REQUEST id=11580, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10485 RequestorUid: 10485 RequestorPkg: org.openhab.habdroid UnderlyingNetworks: Null] ]
2024-02-17 18:18:04.774  1996-2794  UntrustedW...orkFactory system_server                        D  got request NetworkRequest [ REQUEST id=11580, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10485 RequestorUid: 10485 RequestorPkg: org.openhab.habdroid UnderlyingNetworks: Null] ]
2024-02-17 18:18:04.774  1996-2794  OemPaidWif...orkFactory system_server                        D  got request NetworkRequest [ REQUEST id=11580, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10485 RequestorUid: 10485 RequestorPkg: org.openhab.habdroid UnderlyingNetworks: Null] ]
2024-02-17 18:18:04.774  1996-2794  MultiInter...orkFactory system_server                        D  got request NetworkRequest [ REQUEST id=11580, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10485 RequestorUid: 10485 RequestorPkg: org.openhab.habdroid UnderlyingNetworks: Null] ]
2024-02-17 18:18:04.802  6743-6743  AbstractWebViewFragment org.openhab.habdroid                 D  Load default website
2024-02-17 18:18:04.862  1996-2278  ActivityManager         system_server                        I  Start proc 18445:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:5/u0i414 for  {org.openhab.habdroid/org.chromium.content.app.SandboxedProcessService0:5}
2024-02-17 18:18:04.873  6743-6743  MainActivity            org.openhab.habdroid                 D  onCreateOptionsMenu()
2024-02-17 18:18:04.874  6743-6743  MainActivity            org.openhab.habdroid                 D  onPrepareOptionsMenu()
2024-02-17 18:18:04.913  6743-6743  AbstractWebViewFragment org.openhab.habdroid                 D  progressCallback: progress = 10
2024-02-17 18:18:05.107  1996-2052  CoreBackPreview         system_server                        D  Window{f002b3b u0 org.openhab.habdroid/org.openhab.habdroid.ui.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@24c606d, mPriority=0}
2024-02-17 18:18:05.242  6743-6743  AbstractWebViewFragment org.openhab.habdroid                 D  progressCallback: progress = 70
2024-02-17 18:18:05.262  6743-6743  AbstractWebViewFragment org.openhab.habdroid                 D  progressCallback: progress = 100
2024-02-17 18:18:05.262  6743-6743  AbstractWebViewFragment org.openhab.habdroid                 D  progressCallback: progress = 100

I am able to remotely access the Main UI via myopenhab.org, fwiw.

Is this a known issue? How can I fix it?

Link to related OpenHAB community forum discussion: https://community.openhab.org/t/openhab-android-app-main-ui-shows-blank-page-in-remote-mode/153982

@Flowdalic Flowdalic added the bug Indicates an unexpected problem or unintended behavior label Feb 21, 2024
@mueller-ma
Copy link
Member

You you open home.myopenhab.org in a browser on your phone over mobile data?

@Flowdalic
Copy link
Author

Yes, home.myopenhab.org works on the same device.

@Flowdalic
Copy link
Author

Flowdalic commented Feb 22, 2024

Correction, I just had the issue on the Smartphone. Directly entering home.myopenhab.org showed a blank page. After I signed in on myopenhab.org and clicked "Click here to access your openHAB's dashboard", I was able to visit home.myopenhab.org. Closing the tab, and entering home.myopenhab.org also showed the expected page afterwards.

@mueller-ma
Copy link
Member

Can you try https://github.com/openhab/openhab-android/releases/tag/3.10.2-beta and capture the log via adb while opening MainUI via mobile data?

@Flowdalic
Copy link
Author

I've installed 3.10.2-beta and are unable to reproduce this behavior. However, the OpenHAB App from Play Store still exhibits the faulty behavior.

I noticed that when I enter home.myopenhab.org in a browser, I usually a login page presented, but sometimes I remember seeing a HTTP basic auth dialog. I think I remember dismissing the basic auth dialog leads to an empty page presented.

That made me wonder that it may be possible that the webview of the OpenHAB Android App may also somehow entered this stale state.

So I reset the Android App by deleting all of its data (not just the cache) and configured the App again. Since then, I can not longer trigger the faulty behavior.

Not sure if this should be closed though, as the underlying issue is probably not fixed.

mueller-ma added a commit to mueller-ma/openhab.android that referenced this issue Feb 26, 2024
Use the existing 'Clear image cache' setting, rename it and move it to the trouble shooting section.

It might help in some situations, like openhab#3601

Signed-off-by: mueller-ma <[email protected]>
@mueller-ma
Copy link
Member

Maybe clearing the Webview cache would have fixed the issue for you: #3605

I noticed that when I enter home.myopenhab.org in a browser, I usually a login page presented, but sometimes I remember seeing a HTTP basic auth dialog.

The app always sends the credentials, so this shouldn't be an issue.

mueller-ma added a commit that referenced this issue Mar 2, 2024
Use the existing 'Clear image cache' setting, rename it and move it to the trouble shooting section.

It might help in some situations, like #3601

Signed-off-by: mueller-ma <[email protected]>
@Flowdalic
Copy link
Author

FWIW, I just ran into this again after updating openhab from 4.1.1 to 4.1.2. clearing the cache in the app resolved this. However it would be more user friendly if this manual step wasn't required. Actually, I am not even sure what the root cause is.

@mueller-ma
Copy link
Member

Did you have a similar issue in a desktop browser when updating openHAB server?

@benediktkuntz
Copy link

I observed quite the same issue, the app did not display the Main UI (app version 3.12.0; Main UI set as start page). Clearing cache inside the app did not help, but deleting data and cache of the app from Android settings and setting up the server connection again made it work.

@mueller-ma mueller-ma reopened this May 5, 2024
@Intenos
Copy link

Intenos commented Oct 5, 2024

I experienced the same issue. The Main UI gets shown again after deleting all the data as well as the cache of the App, but the graphs of the Main UI do still not work anymore.

@initd0
Copy link

initd0 commented Oct 24, 2024

Same issue here, before and after updating to latest 4.2.2.

Let me tell you that ive tried multiple ways to get the MainUI to show. The problem is intermittent.
I clear cache of the app, go back in and it still wont show, if i do that 2 or 3 times, it will eventually load the app successfully in MainUI. But then the problem starts all over again sometimes after re-opening the app.

I then made the Sitemaps the default page that opens, and even if switching from Sitemaps to MainUI, same problem and you will have to clear cache and close and re-open the app multiple times until it ends up showing the MainUI successfully.

This problem is very annoying and makes the app unusable to people who want to use the MainUI.

Im hoping it can be fixed, as ive had this issue since beginning of 2024, i just havent had time to create the bug report until someone beat me to it.

@mueller-ma are you maybe able to reproduce the issue?

Using Android 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants