OpenHAB retured empty sitemap list

Yeah this still doesn’t work. Been an issue for many many OpenHAB iterations now. I’m now running latest stable OpenHAB 4.0.2? This has been ongoing for ~2+ years now.

App shows “openHAB returned empty sitemap list” when connecting from external network.

This is the issue when going to https://myopenhab.org/basicui/app
openhab

openhab2

home.myopenhab.org/rest/sitemaps
Returns a blank page 99% of the time. I have on occasion seen my sitemap listed.
home.myopenhab.org/rest/sitemaps/main/main and home.myopenhab.org/rest/sitemaps/main
Works fine, but the app can not find the sitemap so it doesn’t matter that the actual sitemap works…

Works fine with Google Assistant so the cloud connector is obviously running…

Log from the app. Note that end of input seems to be character 0 (i.e no data returned).
“End of input at character 0”

09-01 14:46:08.155 17960 18026 E ServerProperties: Failed parsing sitemap JSON
09-01 14:46:08.155 17960 18026 E ServerProperties: org.json.JSONException: End of input at character 0 of

Full log

09-01 14:46:08.151 17960  2752 I okhttp.OkHttpClient: <-- 200 OK https://myopenhab.org/rest/sitemaps (179ms)
09-01 14:46:08.151 17960  2752 I okhttp.OkHttpClient: Server: nginx/1.18.0 (Ubuntu)
09-01 14:46:08.151 17960  2752 I okhttp.OkHttpClient: Date: Fri, 01 Sep 2023 12:46:06 GMT
09-01 14:46:08.151 17960  2752 I okhttp.OkHttpClient: Content-Length: 0
09-01 14:46:08.152 17960  2752 I okhttp.OkHttpClient: Connection: keep-alive
09-01 14:46:08.152 17960  2752 I okhttp.OkHttpClient: X-Powered-By: Express
09-01 14:46:08.152 17960  2752 I okhttp.OkHttpClient: Set-Cookie: ██
09-01 14:46:08.152 17960  2752 I okhttp.OkHttpClient: Set-Cookie: ██
09-01 14:46:08.152 17960  2752 I okhttp.OkHttpClient: <-- END HTTP
09-01 14:46:08.155 17960 18026 E ServerProperties: Failed parsing sitemap JSON
09-01 14:46:08.155 17960 18026 E ServerProperties: org.json.JSONException: End of input at character 0 of
09-01 14:46:08.155 17960 18026 E ServerProperties: at org.json.JSONTokener.syntaxError(JSONTokener.java:460)
09-01 14:46:08.155 17960 18026 E ServerProperties: at org.json.JSONTokener.nextValue(JSONTokener.java:101)
09-01 14:46:08.155 17960 18026 E ServerProperties: at org.json.JSONArray.<init>(JSONArray.java:94)
09-01 14:46:08.155 17960 18026 E ServerProperties: at org.json.JSONArray.<init>(JSONArray.java:110)
09-01 14:46:08.155 17960 18026 E ServerProperties: at org.openhab.habdroid.model.ServerProperties$Companion.loadSitemapsFromJson(Unknown Source:2)
09-01 14:46:08.155 17960 18026 E ServerProperties: at org.openhab.habdroid.model.ServerProperties$Companion.fetchSitemaps(Unknown Source:131)
09-01 14:46:08.155 17960 18026 E ServerProperties: at org.openhab.habdroid.model.ServerProperties$Companion.access$fetchSitemaps(Unknown Source:0)
09-01 14:46:08.155 17960 18026 E ServerProperties: at org.openhab.habdroid.model.ServerProperties$Companion$fetchSitemaps$1.invokeSuspend(Unknown Source:13)
09-01 14:46:08.155 17960 18026 E ServerProperties: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:11)
09-01 14:46:08.155 17960 18026 E ServerProperties: at kotlinx.coroutines.DispatchedTask.run(Unknown Source:88)
09-01 14:46:08.155 17960 18026 E ServerProperties: at kotlinx.coroutines.internal.LimitedDispatcher.run(Unknown Source:12)
09-01 14:46:08.155 17960 18026 E ServerProperties: at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
09-01 14:46:08.155 17960 18026 E ServerProperties: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(Unknown Source:0)
09-01 14:46:08.155 17960 18026 E ServerProperties: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(Unknown Source:14)
09-01 14:46:08.155 17960 18026 E ServerProperties: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(Unknown Source:28)
09-01 14:46:08.155 17960 18026 E ServerProperties: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:0)
09-01 14:46:08.155 17960 18026 D ServerProperties: Server returned sitemaps: []
09-01 14:46:08.156 17960 17960 E MainActivity: openHAB returned empty Sitemap list

Update
In fact I got it to work by completely spamming the retry button in the app until the sitemap appeared. https://home.myopenhab.org/rest/sitemaps seems to only return data randomly some of the time and for some reason spamming F5 in the browser or retry button in the app gets it to cooperate… But then it still spams “Event subscription failed” and doesn’t work completely. Sketchy.

1 Like

Thanks @Masssssy for the info. It certainly feels good not to be the only user experiencing those problems. Do you happen to know if there is an open GitHub issue for this?

Basically I have had this issue for 2 years. @andreasbrinch thought he found the issue as stated in the post from Jan 15. If I recall correctly that fix was going in somehow or have I dreamt about that commit on Github? The reason I again revisit this thread is because I updated to openHAB 4 a few days ago and the issue is still there. Was hoping it would’ve been fixed.

So, in short, I have had problem for ~2 years. Thought it was fixed. Still doesn’t work in OpenHAB 4. Can’t figure out why. Seems to affect some people, but obviously far from all.

@andreasbrinch, did you every fully verify your proposed fix from above? If so, did someone ever create a pull request for the fix?

1 Like

Why do you think it was fixed with the upgrade to openHAB 4?
This sounds more like an issue with the Android App.
Nver saw this on my iPhone….

Have yiu tried the solution of removing language settings in OH. Clearvtge Android App cache etc.
That worked for me.
Issue came back after a few months.
Repeated and been fine since then.
Can set OH language back after and still works.

Because an alledged fix of the issue was posted 9 months ago, between latest OpenHAB3 and the release of OpenHAB 4. If you read the thread and literally my latest post you can see that we get blank responses from the API even on our desktop browsers. Sure it might work on your iPhone because your OH instance is all good, but I bet you that your iPhone app wouldn’t work on my OH instance.

Also, various strange fixes have been reported working. E.g for a while it worked to set the OH logging to debug which would probably indicate that there is some sync/race condition issue or similar. Slowing down the application by logging heavily shouldn’t (in a working, bug free scenario) fix, or for that matter cause that major issues. People have also reported it to work when changing locales back and forth and what not.

What do you mean by removing language? Could you explain in better detail?

Go into OH Settings and change the Regional Settings Language to nothing:

Then save.

Clear the Android App Cache

Settings, Apps, openHAB, Storage, Clear Cache and Clear Data

Try again.

I also had to “Reload App” under App Help & About

Doesn’t help… :cry:

Still most of the time getting blank responses from the following link so it is not an issue with the app. The app just happens to use this API call probably.
https://home.myopenhab.org/rest/sitemaps

while local call

http://192.168.1.xxx:8080/rest/sitemaps
works 100% every time with correct content.

1 Like

This, from my point of view, proofs it is not an openHAB issue, but looks like an Android App issue.
Local REST Api call to endpoint /sitemaps is working, but remote call to same endpoint does not work. As it is the same Api and same endpoint, issue must be somewhere else.

Honestly I don’t know what you are on about.

https://home.myopenhab.org/rest/sitemaps

  • Does not work in desktop browser
  • Does not work via the app

http://192.168.1.xxx:8080/rest/sitemaps

  • Works in the desktop browser
  • Works in the android app

How is this remotely any proof that the app is the issue? The is most likely in the openhab cloud connector or in myopenhab.org itself.

While it might be the same “endpoint”, the remote one takes completely other paths through networks and servers which could easily mess things up and not forward it properly.

1 Like

Dear @hmerk and @Masssssy,

I would like to confirm that neither the procedure involving changing the Regional Settings Language to “nothing” in the OH Settings nor the procedure of setting the OH logging to debug appears to be effecting any changes in my current situation.

Regarding the issue with the web page https://home.myopenhab.org/rest/sitemaps consistently resulting in a blank page when accessed through various browsers and locations (all of which have been tested), it seems reasonable to temporarily exclude the OpenHAB App from our troubleshooting efforts.

Hi, has anybody a solution for this problem?
I have the still same problems as @Masssssy
It works within local network, but not with myopenhab.org, I got still blank pages within the webbrowser and different error messages within the browser console

iam using openHAB 3.3.0

thanks for your help

Just want to add that I’ve have the exact issue for ~2 years as well. Empty sitemap when not connected locally. I use a VPN to work around the issue.

Just to put in my own 2 cents. I have 4 different OH servers in 4 locations. From remote I can use properly only 3 of them. 1 gives me an empty Sitemap almost always

And what differentiate the one returning the empty list?

1 Like

Same issue with Openhab 4.0.2
“empty sitemap list” in both the Android app and browser.

Moving all .sitemap files away from sitemap folder and copying there again solved for me.

Hello everybody!
I have “Empty sitemap list” again now!
It happens in app and in browser, from both remote and local (through VPN) access.

I stopped and started openhab but nothing.

Chown openhab:openhab → nothing
(Previously all files were openhabian:openhabian )

It seems to me that moving all .sitemap files away from sitemap folder and copying there again is the only way to fix it.
:sob: :sob:

I’m going to programmatically check for this ( parsing the error page) and copying/pasting files from script …

May you please suggest me a better way (i.e. querying OH for a sitempap count?) ?

Thanks,
Alex

Hi, I’m having the same issue right now - app returns “openHAB returned empty Sitemap list” and https://myopenhab.org/rest/sitemaps just gives a . It seems insane that this issue is still going on after three years. Changing the language to nothing and the log level to debug do not help. Any thoughts anyone?

I have accepted that it’s just how it works.

Ah, the openHAB user experience perfectly summed up in a single sentence :rofl:

1 Like