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

RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground() #12706

Open
4 tasks done
MrTomato opened this issue Mar 19, 2024 · 2 comments · May be fixed by #14166
Labels
bug feature: files feature: sync feature: transfers [WIP] Any uploading / downloading matters that aren't auto upload or sync specific performance: misc lag, ANR, etc and rarer exceptions/errors that don't have their own labels stable-3.28

Comments

@MrTomato
Copy link

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Create folder parent folder with 1300 nested folders, which in turn can contain up to 60 folders (music collection, ordered by artists/album) totaling 30GB on the server.
  2. Log in to your server on android.
  3. Navigate to this parent folder.
  4. Select sync.
  5. Sync never starts.
  6. Navigate into the folder and select all 1300 folders (select one, then choose select all from menu)
  7. Select sync from menu again.
  8. Nextcloud is unresponsive for more than 2 minutes and eventually crashes.

Tested on a Galaxy S23 running android 14, kernel 5.15.94-android13-8-27763874

Expected behaviour

Nextcloud syncs the whole folder after step 4.
Nextcloud does not crash after step 7.

Actual behaviour

No sync starts after step 4.
Nextcloud app crashes after step 7.

Android version

14

Device brand and model

Samsung galaxy s23

Stock or custom OS?

Stock

Nextcloud android app version

3.28.0

Nextcloud server version

28.0.1

Using a reverse proxy?

No

Android logs

No response

Server error logs

No warnings or errors

Additional information

Running Nextcloud AIO via docker on a 64 bit Arm system with 8GB ram (Raspberry PI 5)

@MrTomato MrTomato added the bug label Mar 19, 2024
@joshtrichards
Copy link
Member

Hi @MrTomato - Sorry to hear you're running into difficulties. Any chance you can capture the crash output / logs? It would be really helpful. Here's how (if crash output isn't already appearing):

https://github.com/nextcloud/android?tab=readme-ov-file#logs

Alternatively, installing a Dev build from F-Droid will give you access to logs in the app itself via Settings.

@joshtrichards joshtrichards added stable-3.28 feature: files feature: transfers [WIP] Any uploading / downloading matters that aren't auto upload or sync specific labels Mar 19, 2024
@MrTomato
Copy link
Author

Hi @joshtrichards,

it took me a bit, but I finally managed to catch the whole mess in the logs 👍 (btw. nice tooling with the dev-app, very cool 😁)

Here's screenshots:

  1. Nextcloud Dev not responding
    not responding

  2. The error welcoming me back:
    error

Cause of error

Exception in thread "main" android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{2a2c2d6 u0 com.nextcloud.android.beta/androidx.work.impl.foreground.SystemForegroundService}
    at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2315)
    at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2286)
    at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2611)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:230)
    at android.os.Looper.loop(Looper.java:319)
    at android.app.ActivityThread.main(ActivityThread.java:8893)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

App information

  • ID: com.nextcloud.android.beta
  • Version: 20240320
  • Build flavor: versionDev

Device information

  • Brand: samsung
  • Device: dm1q
  • Model: SM-S911B
  • Id: UP1A.231005.007
  • Product: dm1qxeea

Firmware

  • SDK: 34
  • Release: 14
  • Incremental: S911BXXS3BXBD

And finally the logs (anonymized)
logs_anonymized.txt

Please let me know, if you need anything else :)

Cheerio,
Tomato

@joshtrichards joshtrichards changed the title Sync fails for folder with many subfolders Sync fails for folder with many subfolders: generateForegroundServiceDidNotStartInTimeException Oct 26, 2024
@joshtrichards joshtrichards added the performance: misc lag, ANR, etc and rarer exceptions/errors that don't have their own labels label Nov 7, 2024
@joshtrichards joshtrichards marked this as a duplicate of #14134 Dec 28, 2024
@joshtrichards joshtrichards changed the title Sync fails for folder with many subfolders: generateForegroundServiceDidNotStartInTimeException RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground() Dec 28, 2024
@joshtrichards joshtrichards marked this as a duplicate of #13890 Dec 28, 2024
@joshtrichards joshtrichards marked this as a duplicate of #13970 Dec 28, 2024
@joshtrichards joshtrichards marked this as a duplicate of #14059 Dec 28, 2024
@alperozturk96 alperozturk96 linked a pull request Dec 30, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature: files feature: sync feature: transfers [WIP] Any uploading / downloading matters that aren't auto upload or sync specific performance: misc lag, ANR, etc and rarer exceptions/errors that don't have their own labels stable-3.28
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants