nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.17k stars 1.75k forks source link

Sync fails for folder with many subfolders #12706

Open MrTomato opened 6 months ago

MrTomato commented 6 months ago

⚠️ Before posting ⚠️

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)

joshtrichards commented 6 months ago

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.

MrTomato commented 6 months ago

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

Device information

Firmware

And finally the logs (anonymized) logs_anonymized.txt

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

Cheerio, Tomato