Skip to content

fix(upload): prevent crash and duplicate retries when retrying failed uploads - #17373

Merged
alperozturk96 merged 12 commits into
masterfrom
fix/upload-retry-crash-safety
Jul 29, 2026
Merged

fix(upload): prevent crash and duplicate retries when retrying failed uploads#17373
alperozturk96 merged 12 commits into
masterfrom
fix/upload-retry-crash-safety

Conversation

@alperozturk96

@alperozturk96 alperozturk96 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • Catch AccountUtils.AccountNotFoundException around createOwnCloudClient
  • Run retries on an injected application-scoped CoroutineScope
  • Replace the launch-only Semaphore with an AtomicBoolean
  • Provide @ApplicationScope CoroutineScope via DispatcherModule
  • Use by lazy for the singleton and drop the broken isUploadStarted return value since events are used in worker.
  • Implements createOwncloudClient for UserAccountManager and add tests

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/30082754017/artifacts/8592618531
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96

Copy link
Copy Markdown
Collaborator Author

/backport to stable-34.1.x

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
…events will be firing

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96
alperozturk96 force-pushed the fix/upload-retry-crash-safety branch from f01298f to 19c6f48 Compare July 29, 2026 06:27
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/30428661869/artifacts/8714745726
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/30429977780/artifacts/8715265785
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/30432278304/artifacts/8716186682
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions

Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3232
Correctness6464
Dodgy code206206
Experimental11
Malicious code vulnerability22
Multithreaded correctness2525
Performance4040
Security1919
Total389389

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/30434031498/artifacts/8717097869
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@github-actions

Copy link
Copy Markdown

@alperozturk96
alperozturk96 merged commit 9925efe into master Jul 29, 2026
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash: uncaught AccountNotFoundException in FileUploadHelper.retryUploads kills the app process

1 participant