Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6115] Android App Freezing and stuck app screen

GitHub Issuen/a
ResolutionNot Our Bug
Resolution Date2019-02-12T22:05:52.000+0000
Affected Version/sn/a
Fix Version/sn/a
LabelsAndroid,, Appcelerator,, Titanium
ReporterPankti Pancholi
AssigneeShak Hossain


- Android app on restart giving blank black screen and also gets freeze any time. - Phone hang when try to open app from background After reading all other related bugs I have tried using Appcelerator CLI 7.0.9 but its just badly messed up with my UI and functionality of all screens so I have decided to revert it back to 7.0.6 Getting following errors in my console [ERROR] : TiExceptionHandler: (main) [15128,88247] Not allowed to start service Intent { cmp=ca.wearecircus.bcc/com.radiusnetworks.ibeacon.IBeaconIntentProcessor (has extras) }: app is in background uid UidRecord{fe9fde7 u0a474 LAST bg:+1m3s223ms idle procs:1 seq(0,0,0)} [ERROR] : TiExceptionHandler: [ERROR] : TiExceptionHandler: android.app.ContextImpl.startServiceCommon(ContextImpl.java:1538) [ERROR] : TiExceptionHandler: android.app.ContextImpl.startService(ContextImpl.java:1484) [ERROR] : TiExceptionHandler: android.content.ContextWrapper.startService(ContextWrapper.java:663) [ERROR] : TiExceptionHandler: com.radiusnetworks.ibeacon.service.Callback.call(Callback.java:63) [ERROR] : TiExceptionHandler: com.radiusnetworks.ibeacon.service.IBeaconService.processRangeData(IBeaconService.java:533) [ERROR] : TiExceptionHandler: com.radiusnetworks.ibeacon.service.IBeaconService.finishScanCycle(IBeaconService.java:451) [ERROR] : TiExceptionHandler: com.radiusnetworks.ibeacon.service.IBeaconService.scheduleScanStop(IBeaconService.java:436) [ERROR] : TiExceptionHandler: com.radiusnetworks.ibeacon.service.IBeaconService.access$100(IBeaconService.java:62) [ERROR] : TiExceptionHandler: com.radiusnetworks.ibeacon.service.IBeaconService$2.run(IBeaconService.java:432) [ERROR] : TiExceptionHandler: android.os.Handler.handleCallback(Handler.java:789) [ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:164) [ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6944) [ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiExceptionHandler: com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) [ERROR] : TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)


  1. Joshua Quick 2019-01-23

    This looks like an issue with a module using "beacon". Can you tell me which module this is please? From the stacktrace, I can tell that this is an issue with that beacon module trying to start a "service" while the app is backgrounded. As of Android 8.0, Google made a breaking change where you can no longer start a background service like this. It has to be made a "foreground" service instead. It sounds like the module's code needs to be changed.
  2. Pankti Pancholi 2019-01-24

    I am using liferay beacons - This way, I have mentioned it in my manifest, I mean in Tiapp.xml
  3. Joshua Quick 2019-01-24

    Edit: _(Sorry. I posted to the wrong ticket.)_
  4. Joshua Quick 2019-01-24

    I'm guessing you're using the following module? https://github.com/jamesfalkner/liferay-android-beacons It's using a "radius.jar" which is documented as a 2014 release. This jar library contains the "com.radiusnetwork.ibeacon" classes which is causing this exception. https://github.com/jamesfalkner/liferay-android-beacons/tree/master/lib The issue is in the "radius.jar". This can't be fixed in the module's code or your code. It's an issue with that old library. And the reason it is crashing is because Google made a breaking-change in Android 8.0 where you're no longer allowed to start a service while the app is in the background... unless you make it a "foreground" service. But you can only make it a "foreground" service via a code change because it involves displaying a notification in the top status bar. https://developer.android.com/about/versions/oreo/background#services So, this means contacting the module developer to see about getting a newer JAR, assuming the original JAR developer has fixed this issue. That's really the only solution. Well, the only other alternative is to "target" Android 7.1 when building your app, but Google Play no longer accepts apps which target versions older than 8.0. So, this is only a viable solution when not deploying via Google Play.
  5. Pankti Pancholi 2019-01-25

    Please check this new error again, We are already running app in Android 8.0.0 which is live on playstore, It is working fine for everyone, I feel it has something to do with some titanium version and java.lang.thread.run error as I started getting it all of sudden in testing version of our app. It is not happening with live app on app store and its not showing me error every-time from one module, Some time beacon, some time other modules [ERROR] : APSAnalyticsRunnable: Error posting events: method POST must have a request body. [ERROR] : APSAnalyticsRunnable: java.lang.IllegalArgumentException: method POST must have a request body. [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.Request$Builder.method(Request.java:259) [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.internal.huc.JavaApiConverter.createOkResponseForCacheGet(JavaApiConverter.java:212) [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.internal.huc.CacheAdapter.get(CacheAdapter.java:51) [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:326) [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:489) [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262) [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218) [ERROR] : APSAnalyticsRunnable: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(Unknown Source:0) [ERROR] : APSAnalyticsRunnable: at com.appcelerator.aps.APSAnalyticsRunnable.run(APSAnalyticsRunnable.java:164) [ERROR] : APSAnalyticsRunnable: at java.lang.Thread.run(Thread.java:764)
  6. Michael Gangolf 2019-01-25

    About the module: The RadiusNetwork library has been removed by the author: https://github.com/RadiusNetworks/android-ibeacon-service The replacement library is https://github.com/AltBeacon/android-beacon-library but has to have a new module. So I think you are stuck with the old radius library or create a new one. And as mentioned in the ti.goosh ticket: https://github.com/AltBeacon/android-beacon-library/issues/673 [~jquick] is right: it is about the background/foreground stuff.
  7. Sharif AbuDarda 2019-02-08

    Hello [~ppancholi], Can you please follow up here? Did you follow Joshua's guide to follow up with the module developer to see about getting a newer JAR? Share with us their response regarding this issue. Thanks.
  8. Pankti Pancholi 2019-02-20

    No, I did not get newer jar yet as it is not available , the library has been removed by the developer

JSON Source