One of my apps recently started crashing randomly, with no information in logs whatsoever. I have been debugging for 5 days now, and have no idea what is causing the issue. I have tried to debug every module, change targetSdkVersion, and recompile many times.
As the project is very big, I am not able to upload it here (and also for security purposes).
The minSdkVersion of project is 21 and targetSdkVersion is 27
I have uploaded the APK build here: https://drive.google.com/file/d/1WtgdWGSY0W_RizmROnJwRNeSDde8Q8dh/view?usp=sharing
The crash reports in firebase show:
RuntimeException - ActivityThread.handleServiceArgs
Exception java.lang.RuntimeException: Unable to start service com.multiverse.jarvis.ttsservice@cdc6b0c with null: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.multiverse.jarvis/.starter }: app is in background uid UidRecord{e56f5b9 u0a705 SVC idle procs:1 seq(0,0,0)}
android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4037)
android.app.ActivityThread.-wrap21 ()
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2006)
android.os.Handler.dispatchMessage (Handler.java:108)
android.os.Looper.loop (Looper.java:166)
android.app.ActivityThread.main (ActivityThread.java:7396)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:926)
Caused by java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.multiverse.jarvis/.starter }: app is in background uid UidRecord{e56f5b9 u0a705 SVC idle procs:1 seq(0,0,0)}
android.app.ContextImpl.startServiceCommon (ContextImpl.java:1701)
android.app.ContextImpl.startService (ContextImpl.java:1657)
android.content.ContextWrapper.startService (ContextWrapper.java:644)
anywheresoftware.b4a.keywords.Common.StartService (Common.java:882)
anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand (ServiceHelper.java:95)
com.multiverse.jarvis.ttsservice.onStartCommand (ttsservice.java:68)
android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4009)
android.app.ActivityThread.-wrap21 ()
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2006)
android.os.Handler.dispatchMessage (Handler.java:108)
android.os.Looper.loop (Looper.java:166)
android.app.ActivityThread.main (ActivityThread.java:7396)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:926)
The Google Developer console shows:
java.lang.IllegalStateException
anywheresoftware.b4a.keywords.Common.StartService
java.lang.RuntimeException:
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4037)
at android.app.ActivityThread.-wrap21 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2006)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7396)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:926)
Caused by: java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1701)
at android.app.ContextImpl.startService (ContextImpl.java:1657)
at android.content.ContextWrapper.startService (ContextWrapper.java:644)
at anywheresoftware.b4a.keywords.Common.StartService (Common.java:882)
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand (ServiceHelper.java:95)
at com.multiverse.jarvis.ttsservice.onStartCommand (ttsservice.java:68)
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4009)
I have attached the above-mentioned Starter, TTSservice modules, and AndroidManifest.
It would be grateful if this issue is solved.
Thank you.
Edit: Now I know the reason, just have to find a solution
As the project is very big, I am not able to upload it here (and also for security purposes).
The minSdkVersion of project is 21 and targetSdkVersion is 27
I have uploaded the APK build here: https://drive.google.com/file/d/1WtgdWGSY0W_RizmROnJwRNeSDde8Q8dh/view?usp=sharing
The crash reports in firebase show:
RuntimeException - ActivityThread.handleServiceArgs
Exception java.lang.RuntimeException: Unable to start service com.multiverse.jarvis.ttsservice@cdc6b0c with null: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.multiverse.jarvis/.starter }: app is in background uid UidRecord{e56f5b9 u0a705 SVC idle procs:1 seq(0,0,0)}
android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4037)
android.app.ActivityThread.-wrap21 ()
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2006)
android.os.Handler.dispatchMessage (Handler.java:108)
android.os.Looper.loop (Looper.java:166)
android.app.ActivityThread.main (ActivityThread.java:7396)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:926)
Caused by java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.multiverse.jarvis/.starter }: app is in background uid UidRecord{e56f5b9 u0a705 SVC idle procs:1 seq(0,0,0)}
android.app.ContextImpl.startServiceCommon (ContextImpl.java:1701)
android.app.ContextImpl.startService (ContextImpl.java:1657)
android.content.ContextWrapper.startService (ContextWrapper.java:644)
anywheresoftware.b4a.keywords.Common.StartService (Common.java:882)
anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand (ServiceHelper.java:95)
com.multiverse.jarvis.ttsservice.onStartCommand (ttsservice.java:68)
android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4009)
android.app.ActivityThread.-wrap21 ()
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2006)
android.os.Handler.dispatchMessage (Handler.java:108)
android.os.Looper.loop (Looper.java:166)
android.app.ActivityThread.main (ActivityThread.java:7396)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:926)
The Google Developer console shows:
java.lang.IllegalStateException
anywheresoftware.b4a.keywords.Common.StartService
java.lang.RuntimeException:
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4037)
at android.app.ActivityThread.-wrap21 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2006)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7396)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:926)
Caused by: java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1701)
at android.app.ContextImpl.startService (ContextImpl.java:1657)
at android.content.ContextWrapper.startService (ContextWrapper.java:644)
at anywheresoftware.b4a.keywords.Common.StartService (Common.java:882)
at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand (ServiceHelper.java:95)
at com.multiverse.jarvis.ttsservice.onStartCommand (ttsservice.java:68)
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4009)
I have attached the above-mentioned Starter, TTSservice modules, and AndroidManifest.
It would be grateful if this issue is solved.
Thank you.
Edit: Now I know the reason, just have to find a solution
Attachments
Last edited: