smsq icon indicating copy to clipboard operation
smsq copied to clipboard

[BUG] Background service crashes after long usage

Open NightMachinery opened this issue 3 years ago • 0 comments

I had the app working for quite some time (2 months or so), but it recently stopped working. I checked its logs, and it has crashed because of this exception:

--------- beginning of crash
05-16 17:39:36.277  9567  9567 E AndroidRuntime: FATAL EXCEPTION: main
05-16 17:39:36.277  9567  9567 E AndroidRuntime: Process: com.github.igrmk.smsq, PID: 9567
05-16 17:39:36.277  9567  9567 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.github.igrmk.smsq.helpers.BootReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.github.igrmk.smsq/.services.ResenderService }: app is in background uid UidRecord{907773a u0a305 RCVR idle change:uncached procs:1 proclist:9567, seq(0,0,0)}
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.app.ActivityThread.handleReceiver(ActivityThread.java:3998)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.app.ActivityThread.access$1400(ActivityThread.java:268)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1993)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.os.Handler.dispatchMessage(Handler.java:107)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.os.Looper.loop(Looper.java:237)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.app.ActivityThread.main(ActivityThread.java:7814)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at java.lang.reflect.Method.invoke(Native Method)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)
05-16 17:39:36.277  9567  9567 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.github.igrmk.smsq/.services.ResenderService }: app is in background uid UidRecord{907773a u0a305 RCVR idle change:uncached procs:1 proclist:9567, seq(0,0,0)}
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1687)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.app.ContextImpl.startService(ContextImpl.java:1632)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.content.ContextWrapper.startService(ContextWrapper.java:683)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.content.ContextWrapper.startService(ContextWrapper.java:683)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at com.github.igrmk.smsq.helpers.BootReceiver.onReceive(BootReceiver.kt:19)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  at android.app.ActivityThread.handleReceiver(ActivityThread.java:3989)
05-16 17:39:36.277  9567  9567 E AndroidRuntime:  ... 8 more

It seems the way smsq starts background services is semi-deprecated?

NightMachinery avatar May 29 '21 11:05 NightMachinery