nayfield / GrazeTen

Porting GrazeRSS to API 29
MIT License
4 stars 1 forks source link

Exception: java.lang.IllegalStateException in com.grazeten.WakeupAndSynchronizeReceiver.onReceive #16

Open EDIflyer opened 4 years ago

EDIflyer commented 4 years ago

Using GrazeTen earlier. Not been in it for 5-10 minutes. Have just been browsing the Web in Chrome when the Android share intent popped up. Picked Gmail and found the following message...

Sorry!

GrazeTEN hit a wall. Please send this mail, so that the developer can analyze/fix the issue. If it is not too much to ask, please add to this mail what you just did between the following lines:



-- Time: Sun Jan 26 10:43:30 GMT 2020 -- Android Version: sdk=28, release=9, inc=1909112330 -- Memory free: 8.46MB total: 12.95MB max: 256.00MB -- BuildD: ONEPLUS A6003_22_190911 -- Manufacturer: OnePlus -- Device: OnePlus6 -- Model: ONEPLUS A6003 -- NewsRob Version: 3.1.3/313 -- Configured Capacity: 500 -- Keep Starred: 100 -- Keep Shared: 5 -- Keep Notes: 5 -- Current Article Count: 75 -- Action Bar Location: top -- Days installed: 0 -- Orientation: 0 -- StorageAdapter: SdCardStorageAdapter -- MB available: 4077 -- Phone Memory MB available: 4077.0 -- Sync Auto enabled: false -- Unread Only: true -- Delete Read: true -- NewsRob only: false -- Offline use: yes -- Offline Def: 2 -- FireModelUpdate in progress: false -- Stacktrace:(1575) java.lang.RuntimeException: Unable to start receiver com.grazeten.WakeupAndSynchronizeReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.grazeten/.SynchronizationService }: app is in background uid UidRecord{71016c9 u0a192 RCVR idle change:idle|uncached procs:1 seq(0,0,0)} at android.app.ActivityThread.handleReceiver(ActivityThread.java:3533) at android.app.ActivityThread.access$1400(ActivityThread.java:207) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1769) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6898) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.grazeten/.SynchronizationService }: app is in background uid UidRecord{71016c9 u0a192 RCVR idle change:idle|uncached procs:1 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1595) at android.app.ContextImpl.startService(ContextImpl.java:1550) at android.content.ContextWrapper.startService(ContextWrapper.java:664) at android.content.ContextWrapper.startService(ContextWrapper.java:664) at com.grazeten.WakeupAndSynchronizeReceiver.onReceive(WakeupAndSynchronizeReceiver.java:29) at android.app.ActivityThread.handleReceiver(ActivityThread.java:3517) ... 8 more

nayfield commented 4 years ago

Might be https://stackoverflow.com/questions/46445265/android-8-0-java-lang-illegalstateexception-not-allowed-to-start-service-inten

This might cause significant effort to fix as it involves moving to the job scheduler. This might not ever get fixed.

nayfield commented 4 years ago

the debug message says that you don't have background syncing on - do you ? (it's on by default).

I don't get this issue on pixel 3xl / api 29.

is it every five minutes?

EDIflyer commented 4 years ago

That's right, I don't have background syncing enabled. A few years ago there were issues with it so I just moved to doing it manually. Now it works again I might reactivate it. Haven't had the error again over the rest of the day.

nayfield commented 4 years ago

so i might have seen this once, but while i was not exactly in a 'clean' state to debug and ignored it. A little concerned that it's some rare once-per-install crash or something.

I do expect background sync will be the next thing to break as the android api moves ahead.

EDIflyer commented 4 years ago

No probs will keep an eye for it and see if it happens again. Going to use GrazeTEN daily so will see if it pops up again. Will leave background sync off for now - I find it only takes two seconds to open and hit the update icon then look at existing articles anyway.

EDIflyer commented 4 years ago

I've noticed it two more times so far today. The first was about 10 min after using GrazeTEN, the other about an hour after using it. I was using the web browser at the time on both occasions.

nayfield commented 4 years ago

How often do you see this issue? I remember seeing it at some point, but I never get it anymore. Latest android / pixel 3.

If you have seen this issue, it would be great to get a comment in this bug with android version and how often you see it.

nayfield commented 4 years ago

From the android developer console, it appears that this happens all the time ... but I have a hunch that android 9 is launching the share bug report chooser every time - and android 10 is just silently reporting it via the play store.

If you experienced this issue in the past, but don't anymore, can you confirm that you went from Android 9 to Android 10?

EDIflyer commented 4 years ago

Yep, can confirm now on Android 10 and no longer see the error.