android
android copied to clipboard
Android crash report when forcing sync on 100GB folder: `java.lang.IllegalStateException: Not allowed to start service Intent [...] app is in background`
⚠️ Before posting ⚠️
- [X] This is a bug, not a question or an enhancement.
- [X] I've searched for similar issues and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's Code of Conduct.
Steps to reproduce
- From a computer, copy 100GB of mp3 sorted into folders (genre, artist, album), and a few other types of files (e.g. AlbumArt.jpg) into your local Nextcloud folder. Let it sync with the server.
- On Android, open the app and, next to the given folder, tap the sandwitch menu and tap the "Sync" option that has a cloud icon to force downloading the files on the device (freely translated from FR).
- A few GB sync, then the app crashes and gives a crash report (see logs below) :
- Kill the app. The notification for sync stays even though you kill the app. Restart the app. It crashes after 30 secs or a few minutes.
- Reboot the device. Relaunch the app. The app crashes with the same way and sync doesn't continue.
Expected behaviour
Files are synced and available locally.
Actual behaviour
See above.
Android version
9
Device brand and model
Samsung Galaxy S8+
Stock or custom OS?
Stock
Nextcloud android app version
30240290 (3.24.2)
Nextcloud server version
25.0.5
Using a reverse proxy?
I don't know
Android logs
`### Cause of error
Exception in thread "Syncfolder thread" java.lang.IllegalStateException: Not allowed to start service Intent { act=SYNC_FOLDER cmp=com.nextcloud.client/com.owncloud.android.services.OperationsService (has extras) }: app is in background uid UidRecord{99d8c5d u0a329 CAC bg:+4m10s773ms idle change:cached procs:1 proclist:11195, seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1666)
at android.app.ContextImpl.startService(ContextImpl.java:1611)
at android.content.ContextWrapper.startService(ContextWrapper.java:677)
at com.owncloud.android.operations.SynchronizeFolderOperation.startSyncFolderOperation(SynchronizeFolderOperation.java:540)
at com.owncloud.android.operations.SynchronizeFolderOperation.classifyFileForLaterSyncOrDownload(SynchronizeFolderOperation.java:387)
at com.owncloud.android.operations.SynchronizeFolderOperation.synchronizeData(SynchronizeFolderOperation.java:335)
at com.owncloud.android.operations.SynchronizeFolderOperation.fetchAndSyncRemoteFolder(SynchronizeFolderOperation.java:220)
at com.owncloud.android.operations.SynchronizeFolderOperation.run(SynchronizeFolderOperation.java:146)
at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:205)
at com.owncloud.android.services.SyncFolderHandler.doOperation(SyncFolderHandler.java:115)
at com.owncloud.android.services.SyncFolderHandler.handleMessage(SyncFolderHandler.java:88)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:65)
App information
- ID:
com.nextcloud.client - Version:
30240290 - Build flavor:
gplay
Device information
- Brand:
samsung - Device:
dream2lte - Model:
SM-G955F - Id:
PPR1.180610.011 - Product:
dream2ltexx
Firmware
- SDK:
28 - Release:
9 - Incremental:
G955FXXUCDVG4
Server error logs
No response
Additional information
No response
This app is majorly unrobust in anything to do with upload/download...
Just noting for future reference: Every single past report of this (but for one) has been on Android 9/10 and unfortunately none have had enough info to reproduce:
https://github.com/nextcloud/android/issues?q=is%3Aissue+%22Not+allowed+to+start+service+Intent%22+is%3Aclosed