AndroidIDEOfficial / AndroidIDE

AndroidIDE is an IDE for Android to develop full featured Android apps.
https://m.androidide.com
GNU General Public License v3.0
2.36k stars 299 forks source link

[Bug]: logsender issues #1154

Open Rafael2616 opened 1 year ago

Rafael2616 commented 1 year ago

What happened?

In the latest versions of the app, the app's logs seem to be accumulating and even if you press the clear button [x] when opening the app again, there is a load of previous logs and this is making the app slow down and makes debugging difficult

Video showing: ------The video bugged, I'll put it in the comment ----

In addition, the log service is showing errors, including in the "app log" section itself

This error in "relevant log output" happens several times at runtime

What's the expected behavior?

Not crash log service and do not accumulate old logs so the app does not crash

What version of AndroidIDE you're using?

v2.5.0 (debug builds)

Relevant log output

--------- beginning of crash
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_           FATAL EXCEPTION: main
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_           Process: com.rafael.tictactoe.debug, PID: 20337
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_           java.lang.RuntimeException: Unable to get provider com.itsaky.androidide.logsender.utils.LogSenderInstaller: java.lang.RuntimeException: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.rafael.tictactoe.debug/com.itsaky.androidide.logsender.LogSenderService }: app is in background uid UidRecord{d5dac13 u0a1039 SVC  idle change:idle|uncached procs:1 seq(0,0,0)}
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ActivityThread.installProvider(ActivityThread.java:6715)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ActivityThread.installContentProviders(ActivityThread.java:6257)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6153)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ActivityThread.access$1100(ActivityThread.java:208)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.os.Handler.dispatchMessage(Handler.java:106)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.os.Looper.loop(Looper.java:205)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ActivityThread.main(ActivityThread.java:6993)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at java.lang.reflect.Method.invoke(Native Method)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:884)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_           Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.rafael.tictactoe.debug/com.itsaky.androidide.logsender.LogSenderService }: app is in background uid UidRecord{d5dac13 u0a1039 SVC  idle change:idle|uncached procs:1 seq(0,0,0)}
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at com.itsaky.androidide.logsender.utils.LogSenderInstaller.onCreate(LogSenderInstaller.java:62)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.content.ContentProvider.attachInfo(ContentProvider.java:1922)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.content.ContentProvider.attachInfo(ContentProvider.java:1897)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ActivityThread.installProvider(ActivityThread.java:6710)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               ... 10 more
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_           Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.rafael.tictactoe.debug/com.itsaky.androidide.logsender.LogSenderService }: app is in background uid UidRecord{d5dac13 u0a1039 SVC  idle change:idle|uncached procs:1 seq(0,0,0)}
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1604)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.app.ContextImpl.startService(ContextImpl.java:1559)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at android.content.ContextWrapper.startService(ContextWrapper.java:664)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               at com.itsaky.androidide.logsender.utils.LogSenderInstaller.onCreate(LogSenderInstaller.java:55)
07-27 09:24:34.708 20337 20337 E  AndroidRuntime_               ... 13 more

Duplicate issues

Code of Conduct

Rafael2616 commented 1 year ago

Video https://github.com/AndroidIDEOfficial/AndroidIDE/assets/93414086/89c76b56-45f5-4d6d-90a8-ac479600bae7

Rafael2616 commented 1 year ago

Just a complement to this problem, as it has happened about 3 times in logs from the past few days, as in the video these error messages are from more than 24 hours ago and this loading caused the app to crash of so many logs being

https://github.com/AndroidIDEOfficial/AndroidIDE/assets/93414086/283182ae-323e-4424-859e-e034509d8950