Connection issue with Android App

I am running OpenHABian 4.2.1 on a RPI4 (doing fine all the way).

Since I upgraded from OH 4.1.x to 4.2 already months ago, and throughout all updates, I first experienced issues with the connection to the OH Android app.

If I try to connect in remote mode via the myopenhab account, it says “connecting to remote URL”, then I get a black screen only. No error, no warning, just a black screen with only the title bar displayed.

It works perfectly in my WiFi network, it works perfectly from the outside when I use VPN, accessing myopenhab via Web browser works perfectly. All in “just view” and admin mode. It really is remote mode in the app only which refuses to work.

For some time, I still could see the Main UI screen alone (but without admin access), but meanwhile even this stopped.

I cannot count how many times I deleted the cache, the app data, reinstalled the app, rebooted the phone (a Samsung A54 5G), deleted the admin login tokens in OH, rebooted OH.

In some few cases, remote access was actually working as expected then, right after reinstalling the app - but only exactly once. After closing the app the first time , it stopped working again.

As I said, I first experienced that after the upgrade from OH 4.1.x to 4.2.x ,but it’s unclear if this actually has something to do with the issue. Anyhow, I am a bit clueless what I still could try to get it back working…

Thanks in advance!

I found it myself, more or less by chance.

It was as simple as the remote hostname was

https://myopenhab/

instead of

https://myopenhab

Yes, that one slash at the end made the difference.
While technically somewhat understandable, I never experienced such thing making a difference anywhere else, especially without causing an error or a warning which point you to the issue.

What made it worse in my case was that when entering the address, the autocomplete function of my smartphone keyboard had the habit of adding that slash by itself :stuck_out_tongue:

So I would like to suggest to at least offer a warning in the app if the hostname ends with a / when saving the settings