Weird problem with displaying images on a sitemap

I ran into a problem where my production system (running OH3 snapshot#2206) won’t display images stored locally like:

Image url="http://MyProductionServer:8080/static/meteogramm.png"

on the Android App (Release and Beta version).
As reported in my Solved “Can’t display images anymore?” Thread, I had this problem when using BasicUI in a browser, but it got solved by updating to #2206 (not sure anymore if that was the real cause). In the App however the images are not displayed.
Using my TestServer (running #2107 ) the image is displayed in the Release and Beta version.

Any suggestions where I could/should look into? My last ressort would be a complete new setup of OH3 for my production server.

I’ll release a new beta version of the app later with improved logging in for image errors. With that we can try to find the issue.

1 Like

Thanks!

Take your time, that is not WAF related!:wink:

This is what I see in the logs:

 02-15 21:43:46.334 16649 18107 I okhttp.OkHttpClient: --> GET https://<openhab-local-address-openHAB>:8443/rest/sitemaps/events/9a814b65-d755-4fd9-84d8-f823f675fe72?sitemap=Haus&pageid=07
    > 02-15 21:43:46.334 16649 18107 I okhttp.OkHttpClient: User-Agent: Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19
    > 02-15 21:43:46.334 16649 18107 I okhttp.OkHttpClient: Accept: text/event-stream
    > 02-15 21:43:46.334 16649 18107 I okhttp.OkHttpClient: --> END GET
    > 02-15 21:43:46.426 16649 18113 I okhttp.OkHttpClient: <-- 200 OK https://<openhab-local-address-openHAB>:8443/rest/sitemaps/Haus/07?includeHidden=true (125ms)
    > 02-15 21:43:46.427 16649 18113 I okhttp.OkHttpClient: Content-Type: application/json
    > 02-15 21:43:46.427 16649 18113 I okhttp.OkHttpClient: Date: Mon, 15 Feb 2021 20:44:59 GMT
    > 02-15 21:43:46.427 16649 18113 I okhttp.OkHttpClient: Transfer-Encoding: chunked
    > 02-15 21:43:46.427 16649 18113 I okhttp.OkHttpClient: Server: Jetty(9.4.20.v20190813)
    > 02-15 21:43:46.427 16649 18113 I okhttp.OkHttpClient: <-- END HTTP
    > 02-15 21:43:46.438 16649 16649 D PageConnectionHolderFragment: Updated page data for URL https://<openhab-local-address-openHAB>:8443/rest/sitemaps/Haus/07 (1 widgets)
    > 02-15 21:43:46.439 16649 16649 D PageConnectionHolderFragment: Widget 1: Widget(id=0700, parentId=null, rawLabel=, icon=org.openhab.habdroid.model.IconResource@a9f3eb3, state=null, type=Image, url=https://<openhab-local-address-openHAB>:8443/proxy?sitemap=Haus.sitemap&widgetId=0700, item=null, linkedPage=null, mappings=[], encoding=null, iconColor=null, labelColor=null, valueColor=null, refresh=0, minValue=0.0, maxValue=100.0, step=1.0, period=D, service=, legend=null, switchSupport=false, height=0, visibility=true)
    > 02-15 21:43:46.439 16649 16649 D ContentController: Got update for URL https://<openhab-local-address-openHAB>:8443/rest/sitemaps/Haus/07, pending [https://<openhab-local-address-openHAB>:8443/rest/sitemaps/Haus/07]
    > 02-15 21:43:46.455 16649 16649 D DecorView: semSetRoundedCorners: 10
    > 02-15 21:43:46.463 16649 16649 D WidgetListFragment: onViewCreated() https://<openhab-local-address-openHAB>:8443/rest/sitemaps/Haus/07
    > 02-15 21:43:46.464 16649 16649 D WidgetListFragment: onStart() https://<openhab-local-address-openHAB>:8443/rest/sitemaps/Haus/07
    > 02-15 21:43:46.465 16649 16649 D PageConnectionHolderFragment: Trigger update for URL https://<openhab-local-address-openHAB>:8443/rest/sitemaps/Haus/07, force false
    > 02-15 21:43:46.465 16649 16649 D ContentController: Got update for URL https://<openhab-local-address-openHAB>:8443/rest/sitemaps/Haus/07, pending []
    > 02-15 21:43:46.468 16649 16649 I WidgetImageView: Refreshing image at https://<openhab-local-address-openHAB>:8443/proxy?sitemap=Haus.sitemap&widgetId=0700, avoidCache false
    > 02-15 21:43:46.469 16649 16649 I WidgetImageView: Refreshing image at https://<openhab-local-address-openHAB>:8443/proxy?sitemap=Haus.sitemap&widgetId=0700, avoidCache false
    > 02-15 21:43:46.471 16649 16649 D DecorView: semSetRoundedCorners: 10
    > 02-15 21:43:46.473 16649 18113 I okhttp.OkHttpClient: --> GET https://<openhab-local-address-openHAB>:8443/proxy?sitemap=Haus.sitemap&widgetId=0700
    > 02-15 21:43:46.474 16649 18113 I okhttp.OkHttpClient: User-Agent: Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19
    > 02-15 21:43:46.474 16649 18113 I okhttp.OkHttpClient: Cache-Control: max-stale=2147483647
    > 02-15 21:43:46.474 16649 18113 I okhttp.OkHttpClient: --> END GET
    > 02-15 21:43:46.481 16649 18113 I okhttp.OkHttpClient: <-- 404 Sitemap 'Haus.sitemap' could not be found! https://<openhab-local-address-openHAB>:8443/proxy?sitemap=Haus.sitemap&widgetId=0700 (7ms)
    > 02-15 21:43:46.482 16649 18113 I okhttp.OkHttpClient: Cache-Control: must-revalidate,no-cache,no-store
    > 02-15 21:43:46.482 16649 18113 I okhttp.OkHttpClient: Content-Type: text/html;charset=iso-8859-1
    > 02-15 21:43:46.482 16649 18113 I okhttp.OkHttpClient: Content-Length: 408
    > 02-15 21:43:46.482 16649 18113 I okhttp.OkHttpClient: Server: Jetty(9.4.20.v20190813)
    > 02-15 21:43:46.482 16649 18113 I okhttp.OkHttpClient: <-- END HTTP
    > 02-15 21:43:46.482 16649 16649 D WidgetImageView: Failed to load image, HTTP code 404

That sounds like the problem I obswrved in the other rhread before, which vanished after the update (when shown in a browser).
I have no clue.

This will be fixed by : Fix sitemap proxy URL provided by Rest API by bigbasec · Pull Request #2203 · openhab/openhab-core · GitHub

Thanks, keeping fingers crossed :wink:

I checked out the android code last night to test this and it worked fine. Only problem is that a change like that would break anything that isn’t running snapshot versions, so probably not a great idea.

Asking me, I would say it can wait.

The questions is who is running the App Beta and openHAB release?

Wouldn’t a correct transition require a new version of the app once the next release is out AND a release note to users for updating both?

I would assume. My original changes were to fix the basicUI as it was broken for images and video. I didn’t think that it would be a breaking change for the Android (and maybe iOS) app, so my apologies.

Not sure if either app has version checking, but if they do, that’s the way to go I’d guess.

Personally I’m glad it wasn’t me spoiling my system. Observed the problem on BasicUI, got it solved by updating (Thanks) and found the App problem. Knowing the cause ( not me!) Is enough for the moment.

Stay healthy!