HABDroid 2.4 Error code 500

Hello,

Since update 2.4.0 Remote-URL is not useable anymore! Error Message:

I checked it with Andoid 9 and Android 8 both shows this error after update.

Please refer this Thread for further information.: Status Code 500 with OpenHab App

Here the error Message also in English:

Are you using the pre-release of HABDroid ? (Releases · openhab/openhab-android · GitHub)

The “production” version is 2.2.0 (https://play.google.com/store/apps/details?id=org.openhab.habdroid)

No this update is from Play-Store! In Germany this Version is offical available.

ok
can you post a screenshot of About:

(hide your UUID)

You may have to open up an issue on Gihub for this one (not sure)

Here the Requestet Information:

Also a Shot frome the German Playstore App (in the Desktop-Browser I see V2.2.0 too

At the moment i downgraded the version to 2.2.0 again from Github and disable on Play-Store the auto Update

I don’t think that we can help much… I think you should open up an issue on: https://github.com/openhab/openhab-android/issues

Just checking: Your OH2 service is up and running and working properly from a web browser (e.g PaperUI, etc)… Correct?

Also: With HABDroid 2.2 you don’t experience the same (HTTP 500) error… Correct?

Correct! After downgrade to 2.2.0 the Sitemap is showning correctly again… except “>” for groups on the right side - so mark that this option as a sub-section.

That is also correct!

1 Like

Yes and no: The rollout of 2.3.0 has been paused, because of a major issue. After this issue has been fixed, I published 2.4.0 which is currently available for 19% of all users. This number will increase over time and gives us the possibility to stop the release of a buggy version.

This has been added in 2.4.0.

Can you enable debug mode in the settings and post a screenshot of the stacktrace?

1 Like

Hi,
Same problem here. Until 2.2.0 everything is working fine, after update either stable 2.4.0 or 2.5.0 or beta I get the same error. After downgrade to 2.2.0 it’s working again

How can I supply more information?

With 2.5.3-beta you can view and share the app log. You should receive an update to 2.5.3 through the play store soon.

Herr is the app log:

--------- beginning of events
12-17 17:52:38.089 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.AboutActivity,LAUNCH_ACTIVITY]
12-17 17:52:38.552 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.MainActivity,handleStopActivity]
12-17 17:52:45.786 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.AboutActivity,handlePauseActivity]
12-17 17:52:45.819 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
12-17 17:52:46.193 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.AboutActivity,destroy]
12-17 17:54:34.228 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.MainActivity,handlePauseActivity]
12-17 17:54:34.497 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.MainActivity,sleeping]
12-17 18:15:51.414 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
12-17 18:15:52.548 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.MainActivity,handlePauseActivity]
12-17 18:15:52.580 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.MainActivity,handleStopActivity]
--------- beginning of main
12-17 19:06:20.548 22576 22576 D MainActivity: onNewIntent()
12-17 19:06:20.548 22576 22576 D MainActivity: Got intent: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10600000 cmp=org.openhab.habdroid.beta/org.openhab.habdroid.ui.MainActivity bnds=[74,110][242,278] (has extras) }
12-17 19:06:20.560 22576 22576 D MainActivity: onStart()
12-17 19:06:20.560 22576 22576 D PageConnectionHolderFragment: onStart(), started false
12-17 19:06:20.560 22576 22576 D MainActivity: onAvailableConnectionChanged()
12-17 19:06:20.565 22576 22595 D AbstractConnection: Checking reachability of https://:8443/
12-17 19:06:20.574 22576 22576 D MainActivity: onResume()
12-17 19:06:20.583 22576 22595 D AbstractConnection: Socket connected
12-17 19:06:20.583 22576 22595 D ConnectionFactory: Connecting to local URL
12-17 19:06:20.588 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
12-17 19:06:20.747 22576 22576 E MainActivity: Error: java.io.IOException: Internal Server Error
12-17 19:06:20.748 22576 22576 E MainActivity: HTTP status code: 500
12-17 19:06:20.748 22576 22576 W ResourceType: No package identifier when getting value for resource number 0x00000000
12-17 19:06:20.749 22576 22576 D ContentController: Indicate server failure (message Verbindung fehlgeschlagen. Es wurde eine unerwartete Antwort während des Verbindungsversuches mit dem konfigurierten openHAB-Server empfangen. (HTTP Statuscode: 500).)
12-17 19:06:22.173 22576 22576 D MainActivity: onOptionsItemSelected()
12-17 19:06:22.194 22576 22576 I zygote64: Deoptimizing int androidx.recyclerview.widget.OrientationHelper$2.getDecoratedEnd(android.view.View) due to JIT inline cache
12-17 19:06:23.293 22576 22576 D MainActivity: onPause()
12-17 19:06:23.294 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.MainActivity,handlePauseActivity]
12-17 19:06:23.324 22576 22576 D skia : — SkAndroidCodec::NewFromStream returned null
12-17 19:06:23.333 22576 22576 I AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
12-17 19:06:23.355 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.AboutActivity,LAUNCH_ACTIVITY]
12-17 19:06:23.425 22576 22582 I zygote64: Do full code cache collection, code=122KB, data=91KB
12-17 19:06:23.425 22576 22582 I zygote64: After code cache collection, code=112KB, data=66KB
12-17 19:06:23.752 22576 22576 D MainActivity: onSaveInstanceState()
12-17 19:06:23.759 22576 22576 D MainActivity: onStop()
12-17 19:06:23.760 22576 22576 D PageConnectionHolderFragment: onStop()
12-17 19:06:23.760 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.MainActivity,handleStopActivity]
12-17 19:06:29.799 22576 22582 I zygote64: Do partial code cache collection, code=120KB, data=76KB
12-17 19:06:29.800 22576 22582 I zygote64: After code cache collection, code=120KB, data=76KB
12-17 19:06:29.800 22576 22582 I zygote64: Increasing code cache capacity to 512KB
12-17 19:06:35.055 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.AboutActivity,handlePauseActivity]
12-17 19:06:35.456 22576 22599 D OpenGLRenderer: endAllActiveAnimators on 0x714228d000 (RippleDrawable) with handle 0x714229f000
12-17 19:06:35.715 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.AboutActivity,handleStopActivity]
12-17 19:06:36.342 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.AboutActivity,RESUME_ACTIVITY]
12-17 19:06:38.551 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.AboutActivity,handlePauseActivity]
12-17 19:06:38.567 22576 22576 D MainActivity: onActivityResult() requestCode = 1004, resultCode = -1
12-17 19:06:38.573 22576 22576 D MainActivity: onStart()
12-17 19:06:38.573 22576 22576 D PageConnectionHolderFragment: onStart(), started false
12-17 19:06:38.573 22576 22576 D MainActivity: onAvailableConnectionChanged()
12-17 19:06:38.574 22576 22595 D AbstractConnection: Checking reachability of https://:8443/
12-17 19:06:38.575 22576 22576 D MainActivity: onResume()
12-17 19:06:38.583 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.MainActivity,RESUME_ACTIVITY]
12-17 19:06:38.591 22576 22595 D AbstractConnection: Socket connected
12-17 19:06:38.591 22576 22595 D ConnectionFactory: Connecting to local URL
12-17 19:06:38.629 22576 22576 E MainActivity: Error: java.io.IOException: Internal Server Error
12-17 19:06:38.629 22576 22576 E MainActivity: HTTP status code: 500
12-17 19:06:38.629 22576 22576 W ResourceType: No package identifier when getting value for resource number 0x00000000
12-17 19:06:38.629 22576 22576 D ContentController: Indicate server failure (message Verbindung fehlgeschlagen. Es wurde eine unerwartete Antwort während des Verbindungsversuches mit dem konfigurierten openHAB-Server empfangen. (HTTP Statuscode: 500).)
12-17 19:06:38.649 22576 22599 D OpenGLRenderer: endAllActiveAnimators on 0x7142262400 (RippleDrawable) with handle 0x714229f7c0
12-17 19:06:38.931 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.AboutActivity,destroy]
12-17 19:06:39.322 22576 22576 D MainActivity: onOptionsItemSelected()
12-17 19:06:40.208 22576 22576 I zygote64: Deoptimizing void androidx.recyclerview.widget.RecyclerView$LayoutManager.measureChildWithMargins(android.view.View, int, int) due to JIT inline cache
12-17 19:06:40.209 22576 22576 I zygote64: Deoptimizing void androidx.recyclerview.widget.LinearLayoutManager.recycleViewsFromEnd(androidx.recyclerview.widget.RecyclerView$Recycler, int) due to JIT inline cache
12-17 19:06:40.211 22576 22576 D MainActivity: onPause()
12-17 19:06:40.211 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.MainActivity,handlePauseActivity]
12-17 19:06:40.236 22576 22576 D skia : — SkAndroidCodec::NewFromStream returned null
12-17 19:06:40.243 22576 22576 I AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
12-17 19:06:40.262 22576 22576 D PreferencesActivity: Removing notification prefs
12-17 19:06:40.274 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.PreferencesActivity,LAUNCH_ACTIVITY]
12-17 19:06:40.832 22576 22576 D MainActivity: onSaveInstanceState()
12-17 19:06:40.836 22576 22576 D MainActivity: onStop()
12-17 19:06:40.836 22576 22576 D PageConnectionHolderFragment: onStop()
12-17 19:06:40.837 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.MainActivity,handleStopActivity]
12-17 19:06:42.888 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.PreferencesActivity,handlePauseActivity]
12-17 19:06:42.913 22576 22576 D skia : — SkAndroidCodec::NewFromStream returned null
12-17 19:06:42.926 22576 22576 I AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
12-17 19:06:42.958 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.LogActivity,LAUNCH_ACTIVITY]
12-17 19:06:42.996 22576 22576 D LogActivity: onCreateOptionsMenu()
12-17 19:06:43.140 22576 22599 D OpenGLRenderer: endAllActiveAnimators on 0x7141fee800 (ListView) with handle 0x7141025540
12-17 19:06:43.368 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.PreferencesActivity,handleStopActivity]
12-17 19:06:44.468 22576 22576 W Choreographer: OPTS_INPUT: First frame was drawed before optimized, so skip!
12-17 19:06:49.106 22576 22576 I am_on_paused_called: [0,org.openhab.habdroid.ui.LogActivity,handlePauseActivity]
12-17 19:06:52.887 22576 22576 I am_on_stop_called: [0,org.openhab.habdroid.ui.LogActivity,handleStopActivity]
12-17 19:06:55.491 22576 22576 I am_on_resume_called: [0,org.openhab.habdroid.ui.LogActivity,RESUME_ACTIVITY]

I’m attempting to use the Openhab app on android. This fails at the startpage with a error 500. I also see the following on the openhab control messages:

Sep 17 09:53:57 mini2 karaf[15402]: WARNING: An illegal reflective access operation has occurred

???

I think your connection is not oriented. so an error is genrated.

What does your answer mean?

Oriented ???

Does the sitemap work with Basic UI?

Yes.

  I can't access the opencloud using the android app.   I CAN

access the opencloud site via the web browser route.

I’m using Opencloud Beta app.

Do you mean openHAB Beta app?

Sorry - yes OpenHAB beta app

I notice exactly the same behaviour on following system

  • openHAB 2.4.0
  • HABdroid 2.8.0
  • openhab-cloud 1.0.5 (self hosted), on a DietPi running nginx as ReverseProxy

Interestingly, the 500-error only occurs when proxy-ing into the cloud from an external network (public internet).
When connecting from the internal network and thus bypassing the ReverseProxy/nginx there is no error at all. :thinking:

I became curious and ran
tcpdump -A -i lo port 3000 -w ~/dump.log
on the system running openhab-cloud and checked the output with wireshark for noticable problems and tracked the following http-conversation (between habdroid and cloud)

No.	Protocol	Length	Info
4	HTTP	393	GET /api/v1/settings/notifications HTTP/1.1 
10	HTTP	67	HTTP/1.1 200 OK  (application/json)
18	HTTP	368	GET /rest HTTP/1.1 
22	HTTP	1373	HTTP/1.1 200 OK  (application/json)
30	HTTP	596	GET /addAndroidRegistration?deviceId=xxxxxxxxxx HTTP/1.1 
36	HTTP	67	HTTP/1.1 200 OK  (text/html)
44	HTTP	377	GET /rest/sitemaps HTTP/1.1 
48	HTTP	545	HTTP/1.1 200 OK  (application/json)
56	HTTP	463	POST /rest/sitemaps/events/subscribe HTTP/1.1  (application/json)
.
.
.
676	HTTP	463	POST /rest/sitemaps/events/subscribe HTTP/1.1  (application/json)
680	HTTP	424	HTTP/1.1 200 OK  (application/json)
688	HTTP	463	POST /rest/sitemaps/events/subscribe HTTP/1.1  (application/json)
692	HTTP	424	HTTP/1.1 200 OK  (application/json)
700	HTTP	463	POST /rest/sitemaps/events/subscribe HTTP/1.1  (application/json)
704	HTTP	145	HTTP/1.1 503 OK  (application/json)
712	HTTP	463	POST /rest/sitemaps/events/subscribe HTTP/1.1  (application/json)
716	HTTP	145	HTTP/1.1 503 OK  (application/json)
724	HTTP	400	GET /api/v1/notifications?limit=20&skip=0 HTTP/1.1 
730	HTTP	67	HTTP/1.1 200 OK  (application/json)
738	HTTP	394	GET /images/openhab.png HTTP/1.1 
742	HTTP	399	HTTP/1.1 404 OK  (text/html)
750	HTTP	394	GET /images/openhab.png HTTP/1.1 
755	HTTP	394	GET /images/openhab.png HTTP/1.1 
759	HTTP	399	HTTP/1.1 404 OK  (text/html)
764	HTTP	399	HTTP/1.1 404 OK  (text/html)
774	HTTP	368	GET /rest HTTP/1.1 
778	HTTP	1373	HTTP/1.1 200 OK  (application/json)
786	HTTP	377	GET /rest/sitemaps HTTP/1.1 
790	HTTP	545	HTTP/1.1 200 OK  (application/json)
798	HTTP	463	POST /rest/sitemaps/events/subscribe HTTP/1.1  (application/json)
802	HTTP	145	HTTP/1.1 503 OK  (application/json)

At packet 704, the cloud throws a first http-error (503) which disassembles to

{"error":{"message":"Max number of subscriptions is reached.","http-code":503}}

Maybe it’s a useful hint to the problem…