You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Context.startForegroundService() did not then call Service.startForeground() #2010
From Google's docs on Android 8.0 behavior changes:
The system allows apps to call Context.startForegroundService() even while the app is in the background. However, the app must call that service's startForeground() method within five seconds after the service is created.
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{fb59be8 u0 com.nextcloud.client/com.owncloud.android.services.OperationsService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1745)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{9cb193 u0 com.nextcloud.client/com.owncloud.android.services.OperationsService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2126)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
************ APP INFORMATION ************
ID: com.nextcloud.client
Version: 30080190
Build flavor: gplay
************ DEVICE INFORMATION ************
Brand: HONOR
Device: HWBKL
Model: BKL-L09
Id: HUAWEIBKL-L09S
Product: BKL-L09
************ FIRMWARE ************
SDK: 28
Release: 9
Incremental: 329C432
************ CAUSE OF ERROR ************
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{bd2d535 u0 com.nextcloud.client/com.owncloud.android.services.OperationsService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1855)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6990)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)
************ APP INFORMATION ************
ID: com.nextcloud.client
Version: 30080190
Build flavor: gplay
************ DEVICE INFORMATION ************
Brand: samsung
Device: crownlte
Model: SM-N960F
Id: PPR1.180610.011
Product: crownltexx
************ FIRMWARE ************
SDK: 28
Release: 9
Incremental: N960FXXS3CSI5
************ CAUSE OF ERROR ************
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{a4dde14 u0 com.nextcloud.client/com.owncloud.android.services.OperationsService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2126)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
************ APP INFORMATION ************
ID: com.nextcloud.client
Version: 30080190
Build flavor: gplay
************ DEVICE INFORMATION ************
Brand: HONOR
Device: HWBKL
Model: BKL-L09
Id: HUAWEIBKL-L09S
Product: BKL-L09
************ FIRMWARE ************
SDK: 28
Release: 9
Incremental: 329C432
Google Pixel 2. I do get a lot of ANRs and app stopped in the background when it is uploading. I plug the charger in (which triggers autoupload) and it pops up every so often. I think it slowed down on the last RC1 release or penultimate release, I had the app force stopped for several months because it was unusable so I wasn't paying so much attention anymore. If you need any more details I'm happy to help get this resolved for me and everyone who might be having the same issue.
Edit: It basically always displays homescreen (I assume this is same as "crash") while using the app if I go to uploads and try to scroll around. I should have said that it doesn't always crash if I don't try to scroll. When I scroll it freezes and displays homescreen after maybe 10 seconds, then homescreen is just a picture, none of the on-screen controls work for next 20 or so seconds, then it displays ANR but at this point it has kicked me out of the app, the app isn't usable and phone isn't usable for at least 30 seconds. And then sometimes it displays that crash text on next app start, most often it doesn't (does that mean that it hasn't crash or not idk) but it kicks me out of the app.
Also the uploads take like 10-15 seconds per single file (they're very small files), whole auto-upload seems very slow.
Can you see how many pending uploads you have?
While it can happen that the app does not respond (ANR) it should not kill using rest of your device.
Can you reboot, make sure that none other apps are open and see if this somehow performs better?
There's about 120, there's always around that number, it goes through them one by one. If I keep the uploads menu open, it goes towards zero slowly, it's very slow, I never actually waited more than until maybe 70. But when I'm not on that tab/I'm in the background, it queues the uploads up to around 110-120 queued. Sometimes if I don't touch anything, it keeps showing that screen and slowly uploading (approx. 0.1 item/s), if I try to scroll, it lags/freezes and eventually crashes/doesn't respond.
I tried the following: close all the apps from the recent or overview or whateverItsCalled list, reboot, wait until it fully powers up and starts, then wait 2 mins to make sure it has stabilized, still nothing in recent apps list. I then open Nextcloud, go to uploads, it now "waits to exit power saving mode", I plug the charger in and it goes out of power saving mode and starts uploading -> Nextcloud immediately crashes to begin with. Then I open up Nextcloud and go to uploads menu, it freezes again, whole OS doesn't respond to input, power button will work and fingerprint sensor works to turn off and on the phone, but the touchscreen interface is frozen, after about 20 seconds it unlocks and I get to use my phone again.
I have not turned off any background apps or services, it would be a humongous pain to enumerate and disable (if they can be disabled) all the apps that run without me opening them.
Amusingly it says that Nextcloud has stopped/keeps stopping but I cannot interact with the dialogue box to close it because Nextcloud is keeping the phone from being used for half a minute until it's ready to be used again.
As a side question, as you are developer, is there any way to close and prevent apps from opening by themselves in Android? I mean I can try to close them but some apps turn right back on in the background.
@InfamousUser to be sure please try the QA build in #7340 if you can spare some time 🙏
Yeah, sure. I updated over the previous QA version and it seems to behave the same as described in this comment: #7340 (comment).
and here #7378 (comment)
In essence, the original problem seems fixed, only receiving ANRs all the time now.
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{933be3d u0 com.nextcloud.client/com.owncloud.android.files.services.FileUploader}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2005)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Activity
paulpv commentedon Mar 21, 2018
https://issuetracker.google.com/issues/76112072
dark-chocolate commentedon Jan 2, 2019
@AndyScherzinger Have you guys found some solution for this?
AndyScherzinger commentedon Jan 2, 2019
Not that I am aware of
stale commentedon May 9, 2019
This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
tobiasKaminsky commentedon Oct 9, 2019
Re-opening as there are some new reports, and this is the issue with most background infos.
tobiasKaminsky commentedon Oct 9, 2019
@ALL when is this happening?
We use startForegroundService() on
AndyScherzinger commentedon Oct 30, 2019
AndyScherzinger commentedon Oct 30, 2019
AndyScherzinger commentedon Oct 30, 2019
15 remaining items
InfamousUser commentedon Sep 17, 2020
Google Pixel 2. I do get a lot of ANRs and
app stoppedin the background when it is uploading. I plug the charger in (which triggers autoupload) and it pops up every so often. I think it slowed down on the last RC1 release or penultimate release, I had the app force stopped for several months because it was unusable so I wasn't paying so much attention anymore. If you need any more details I'm happy to help get this resolved for me and everyone who might be having the same issue.Edit: It basically always displays homescreen (I assume this is same as "crash") while using the app if I go to uploads and try to scroll around. I should have said that it doesn't always crash if I don't try to scroll. When I scroll it freezes and displays homescreen after maybe 10 seconds, then homescreen is just a picture, none of the on-screen controls work for next 20 or so seconds, then it displays ANR but at this point it has kicked me out of the app, the app isn't usable and phone isn't usable for at least 30 seconds. And then sometimes it displays that crash text on next app start, most often it doesn't (does that mean that it hasn't crash or not idk) but it kicks me out of the app.
Also the uploads take like 10-15 seconds per single file (they're very small files), whole auto-upload seems very slow.
tobiasKaminsky commentedon Sep 18, 2020
Can you see how many pending uploads you have?
While it can happen that the app does not respond (ANR) it should not kill using rest of your device.
Can you reboot, make sure that none other apps are open and see if this somehow performs better?
InfamousUser commentedon Sep 19, 2020
There's about 120, there's always around that number, it goes through them one by one. If I keep the uploads menu open, it goes towards zero slowly, it's very slow, I never actually waited more than until maybe 70. But when I'm not on that tab/I'm in the background, it queues the uploads up to around 110-120 queued. Sometimes if I don't touch anything, it keeps showing that screen and slowly uploading (approx. 0.1 item/s), if I try to scroll, it lags/freezes and eventually crashes/doesn't respond.
I tried the following: close all the apps from the recent or overview or whateverItsCalled list, reboot, wait until it fully powers up and starts, then wait 2 mins to make sure it has stabilized, still nothing in recent apps list. I then open Nextcloud, go to uploads, it now "waits to exit power saving mode", I plug the charger in and it goes out of power saving mode and starts uploading -> Nextcloud immediately crashes to begin with. Then I open up Nextcloud and go to uploads menu, it freezes again, whole OS doesn't respond to input, power button will work and fingerprint sensor works to turn off and on the phone, but the touchscreen interface is frozen, after about 20 seconds it unlocks and I get to use my phone again.
I have not turned off any background apps or services, it would be a humongous pain to enumerate and disable (if they can be disabled) all the apps that run without me opening them.
Amusingly it says that Nextcloud has stopped/keeps stopping but I cannot interact with the dialogue box to close it because Nextcloud is keeping the phone from being used for half a minute until it's ready to be used again.
As a side question, as you are developer, is there any way to close and prevent apps from opening by themselves in Android? I mean I can try to close them but some apps turn right back on in the background.
InfamousUser commentedon Nov 14, 2020
Still happening on 3.14 RC2. Just opened the app to find one file.
tobiasKaminsky commentedon Nov 17, 2020
There is an APK file in PR #7340, which you can install in parallel to your existing Nextcloud app.
It would be great if you can verify the fix.
willpyshan13 commentedon Nov 19, 2020
when i remove a file it will be appear
in version stable-3.14.0
InfamousUser commentedon Nov 20, 2020
Finally this is getting fixed! Good job everyone!
AndyScherzinger commentedon Nov 20, 2020
@InfamousUser to be sure please try the QA build in #7340 if you can spare some time 🙏
InfamousUser commentedon Nov 21, 2020
Yeah, sure. I updated over the previous QA version and it seems to behave the same as described in this comment:
#7340 (comment).
and here
#7378 (comment)
In essence, the original problem seems fixed, only receiving ANRs all the time now.
InfamousUser commentedon Jan 12, 2021
I'm afraid to say it's still happening on 3.14.2 RC1 for FileUploader.
InfamousUser commentedon Jan 13, 2021
************ CAUSE OF ERROR ************
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{933be3d u0 com.nextcloud.client/com.owncloud.android.files.services.FileUploader}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2005)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
InfamousUser commentedon Feb 1, 2021
Still happening on 3.15.0 RC1. Please reopen this.