Skip to content

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

Open
alperozturk96 wants to merge 4 commits into
masterfrom
fix/upload-retry-crash-safety
Open

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

Conversation

@alperozturk96

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.

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 4d0f7d0 to f01298f Compare July 24, 2026 09:29
@github-actions

Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3232
Correctness6666
Dodgy code208208
Experimental11
Malicious code vulnerability22
Multithreaded correctness2525
Performance4141
Security1919
Total394394

@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)

@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

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