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

Background start not allowed on incoming push #845

Closed
532910 opened this issue Jun 21, 2019 · 14 comments
Closed

Background start not allowed on incoming push #845

532910 opened this issue Jun 21, 2019 · 14 comments

Comments

@532910
Copy link

532910 commented Jun 21, 2019

microG Setting shows incoming push is received, but unable to start riot.im app

I EventStreamServiceX: sendAction im.vector.services.EventStreamServiceX.PUSH_RECEIVED
D GmsGcmRegisterSvc: onBind: Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms }
W ActivityManager: Background start not allowed: service Intent { act=im.vector.services.EventStreamServiceX.PUSH_RECEIVED cmp=im.vector.app/im.vector.services.EventStreamServiceX } to im.vector.app/im.vector.services.EventStreamServiceX from pid=5624 uid=10095 pkg=im.vector.app startFg?=false
I EventStreamServiceX: ## Failed to start event stream
I EventStreamServiceX: java.lang.IllegalStateException: Not allowed to start service Intent { act=im.vector.services.EventStreamServiceX.PUSH_RECEIVED cmp=im.vector.app/im.vector.services.EventStreamServiceX }: app is in background uid UidRecord{...}

Lineageos 16.0 2019-06-18 OP3T

@mar-v-in
Copy link
Member

Please report this to Riot: the logs show that Riot was actually started, "EventStreamServiceX" (which is the service logging most of these messages) is part of Riot, not microG.

@532910
Copy link
Author

532910 commented Jun 21, 2019

Riot works fine with Lineageos 16.0 2019-06-18 + opengapps pico

@532910
Copy link
Author

532910 commented Jun 21, 2019

Riot has no permission "run in background". Is microg tries to start it "in background" and shoud just usually start?

@mar-v-in
Copy link
Member

mar-v-in commented Jun 21, 2019

I am not sure, however microG does correctly start the Riot EventStreamServiceX, so it is Riots task to correctly start any further service if needed.

@532910
Copy link
Author

532910 commented Jun 21, 2019

@532910
Copy link
Author

532910 commented Jun 21, 2019

SoundCloud receives pushes well.

@532910
Copy link
Author

532910 commented Jun 23, 2019

I have a similar problem with identiconizer at bootup:

        ActivityManager  I  Start proc 5277:com.germainz.identiconizer/u0a146 for broadcast com.germainz.identiconizer/.receivers.BootCompletedReceiver
                  Utils  D  lineage-16.0-20190611-microG-oneplus3.zip is older than/equal to the current build
                         D  Ignoring incompatible update lineage-16.0-20190611-microG-oneplus3.zip
                 Zygote  I  seccomp disabled by setenforce 0
   UpdatesCheckReceiver  D  Cancelling pending one-shot check
        ActivityManager  W  Background start not allowed: service Intent { cmp=com.germainz.identiconizer/.services.ContactsObserverService } to com.germainz.identiconizer/.services.ContactsObserverS
                            ervice from pid=5277 uid=10146 pkg=com.germainz.identiconizer startFg?=false
         AndroidRuntime  D  Shutting down VM
                         E  FATAL EXCEPTION: main
                         E  Process: com.germainz.identiconizer, PID: 5277
                         E  java.lang.RuntimeException: Unable to start receiver com.germainz.identiconizer.receivers.BootCompletedReceiver: java.lang.IllegalStateException: Not allowed to start serv
                            ice Intent { cmp=com.germainz.identiconizer/.services.ContactsObserverService }: app is in background uid UidRecord{cec7246 u0a146 RCVR idle change:uncached procs:1 seq(0,
                            0,0)}
                         E      at android.app.ActivityThread.handleReceiver(ActivityThread.java:3426)
                         E      at android.app.ActivityThread.access$1200(ActivityThread.java:200)
                         E      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1667)
                         E      at android.os.Handler.dispatchMessage(Handler.java:106)
                         E      at android.os.Looper.loop(Looper.java:193)
                         E      at android.app.ActivityThread.main(ActivityThread.java:6718)
                         E      at java.lang.reflect.Method.invoke(Native Method)
                         E      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
                         E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
                         E  Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.germainz.identiconizer/.services.ContactsObserverService }: app is in background 
                            uid UidRecord{cec7246 u0a146 RCVR idle change:uncached procs:1 seq(0,0,0)}
                         E      at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1577)
                         E      at android.app.ContextImpl.startService(ContextImpl.java:1532)
                         E      at android.content.ContextWrapper.startService(ContextWrapper.java:664)
                         E      at android.content.ContextWrapper.startService(ContextWrapper.java:664)
                         E      at com.germainz.identiconizer.receivers.BootCompletedReceiver.onReceive(BootCompletedReceiver.java:31)
                         E      at android.app.ActivityThread.handleReceiver(ActivityThread.java:3417)
                         E      ... 8 more
        ActivityManager  I  Showing crash dialog for package com.germainz.identiconizer u0

@532910
Copy link
Author

532910 commented Jun 24, 2019

When battery optimization is off for riot and identiconizer all works fine. When it's optimized I see the errors above. But on the Lineageos 16.0 + GAPPS riot.im works fine regardless the battery optimization setting.

So this it not a riot issue.

Identiconizer produces error on Lineageos 16.0 + GAPPS with battery optimization turned on, but it's not "FATAL EXCEPTION"

image

@voidstarstar
Copy link
Contributor

voidstarstar commented Jun 24, 2019

What version of microG are you running? This was supposed to have been fixed in the latest version, specifically by #732.

Do you happen to use a VPN?

@532910
Copy link
Author

532910 commented Jun 24, 2019

https://download.lineage.microg.org/oneplus3/lineage-16.0-20190618-microG-oneplus3.zip
it shows microG Services Core 0.2.7.17455-mapbox

No VPN right now.

@532910
Copy link
Author

532910 commented Jun 28, 2019

ZUK Z2 Plus works fine without setting battery optimization to Don't optimize.

https://download.lineage.microg.org/z2_plus/lineage-16.0-20190626-microG-z2_plus.zip
with the same microG Services Core 0.2.7.17455-mapbox

@532910
Copy link
Author

532910 commented Jun 28, 2019

Looks like it's compilation time (device configuration) problem.

@Gigadoc2
Copy link

In that case, I'd like to note that I have the same problem with https://download.lineage.microg.org/d855/lineage-15.1-20190626-microG-d855.zip

@532910
Copy link
Author

532910 commented Jul 25, 2019

I've do more tests, an this is definitely a riot.im issue.

@532910 532910 closed this as completed Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants