Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when app is backgrounded #445

Closed
Catfriend1 opened this issue Feb 18, 2019 · 7 comments
Closed

Crash when app is backgrounded #445

Catfriend1 opened this issue Feb 18, 2019 · 7 comments

Comments

@Catfriend1
Copy link

Catfriend1 commented Feb 18, 2019

AppV: 1.0.14
Android 8.1 on Xiaomi mi8 MiUi10

02-06 19:00:00.128 E/AndroidRuntime(25593): FATAL EXCEPTION: main
02-06 19:00:00.128 E/AndroidRuntime(25593): Process: ws.xsoh.etar, PID: 25593
02-06 19:00:00.128 E/AndroidRuntime(25593): java.lang.RuntimeException: Unable to start receiver com.android.calendar.alerts.AlertReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=ws.xsoh.etar/com.android.calendar.alerts.AlertService (has extras) }: app is in background uid UidRecord{d0b4c27 u0a159 RCVR idle change:uncached procs:1 seq(0,0,0)}
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.app.ActivityThread.handleReceiver(ActivityThread.java:3229)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.app.ActivityThread.-wrap17(Unknown Source:0)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1697)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.os.Handler.dispatchMessage(Handler.java:106)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.os.Looper.loop(Looper.java:164)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.app.ActivityThread.main(ActivityThread.java:6648)
02-06 19:00:00.128 E/AndroidRuntime(25593): at java.lang.reflect.Method.invoke(Native Method)
02-06 19:00:00.128 E/AndroidRuntime(25593): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
02-06 19:00:00.128 E/AndroidRuntime(25593): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:818)
02-06 19:00:00.128 E/AndroidRuntime(25593): Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=ws.xsoh.etar/com.android.calendar.alerts.AlertService (has extras) }: app is in background uid UidRecord{d0b4c27 u0a159 RCVR idle change:uncached procs:1 seq(0,0,0)}
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1531)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.app.ContextImpl.startService(ContextImpl.java:1487)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.content.ContextWrapper.startService(ContextWrapper.java:660)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.content.ContextWrapper.startService(ContextWrapper.java:660)
02-06 19:00:00.128 E/AndroidRuntime(25593): at com.android.calendar.alerts.AlertReceiver.beginStartingService(AlertReceiver.java:137)
02-06 19:00:00.128 E/AndroidRuntime(25593): at com.android.calendar.alerts.AlertReceiver.onReceive(AlertReceiver.java:840)
02-06 19:00:00.128 E/AndroidRuntime(25593): at android.app.ActivityThread.handleReceiver(ActivityThread.java:3222)
02-06 19:00:00.128 E/AndroidRuntime(25593): ... 8 more

@Gitsaibot Gitsaibot added the bug label Feb 18, 2019
@Gitsaibot
Copy link
Contributor

Gitsaibot commented Feb 18, 2019

Thanks. This is very helpful. Maybe the same as #439 but with more details ;)
After looking into the code I think alert.Receiver and alert.Service needs a rewrite.
Besides android.intent.action.PROVIDER_CHANGED didn't work anymore since Oreo.

@Gitsaibot
Copy link
Contributor

@Catfriend1 Ich kann den Fehler auf meinem Handy leider nicht reproduzieren. Trotzdem habe ich mal eine Testversion(Etar-Calendar-debug.zip) von Etar erstellt die das Problem eventuell behebt. Wäre gut wenn du das bei dir mal testen könntest.

@Catfriend1
Copy link
Author

@Gitsaibot Danke, ich werde sie die Tage mal aufspielen und sehen wie es läuft. Muss dann auch öfter mal ins Logcat sehen, da ich mir zur Zeit für "zuverlässige" Termin-Popups mit der Zusatz-App "Calendar Notifications" behelfe, die das Problem mit Eta "cachiert".

@Tianonymus
Copy link

Tianonymus commented May 25, 2019

Coming from #497, I can't download the zip file, the link is broken?

@Gitsaibot
Copy link
Contributor

No the link should work. Did you block scripts ?

@Tianonymus
Copy link

My bad, sorry, worked with another browser.

Installed the apk. Notifications are shown again. It works when the app is not running in the background as well as when the device is on stand by.

However, before the notification of the appointment is shown, there is another one saying "Example Service" that's shown shortly, but doesn't remain in the notification bar. The appointment's notification is then shown as expected.

Thank you!

@Catfriend1
Copy link
Author

+1 works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants