LSPosed / LSPatch

LSPatch: A non-root Xposed framework extending from LSPosed
GNU General Public License v3.0
6.71k stars 707 forks source link

[Bug] Crash on app close #221

Open shuvashish76 opened 1 year ago

shuvashish76 commented 1 year ago

Steps to reproduce/复现步骤

  1. Simply open the app
  2. Remove from device recent apps.

Expected behaviour/预期行为

Close the app.

Actual behaviour/实际行为

App closed but crashes.

Xposed Module List/Xposed 模块列表

- taco.scoop

LSPatch version/LSPatch 版本

0.5.1 (382)

Android version/Android 版本

12

Shizuku version/Shizuku 版本

N/A

Version requirement/版本要求

Apk file/Apk 文件

No response

Logs/日志

``` FATAL EXCEPTION: main Process: org.lsposed.lspatch, PID: 16563 java.lang.RuntimeException: Unable to create application org.lsposed.lspatch.LSPApplication: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=org.lsposed.lspatch/.manager.ModuleService }: app is in background uid UidRecord{cc0fc3 u0a368 SVC idle change:idle|uncached procs:0 seq(0,0,0)} at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6912) at android.app.ActivityThread.access$1600(ActivityThread.java:261) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2154) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loopOnce(Looper.java:238) at android.os.Looper.loop(Looper.java:357) at android.app.ActivityThread.main(ActivityThread.java:8090) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026) Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=org.lsposed.lspatch/.manager.ModuleService }: app is in background uid UidRecord{cc0fc3 u0a368 SVC idle change:idle|uncached procs:0 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1882) at android.app.ContextImpl.startService(ContextImpl.java:1838) at android.content.ContextWrapper.startService(ContextWrapper.java:776) at org.lsposed.lspatch.LSPApplication.onCreate(LSPApplication.kt:35) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1213) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6907) ... 9 more ```