Skip to content

Improve remote file fetch#16995

Open
alperozturk96 wants to merge 4 commits intomasterfrom
improve-remote-file-fetch
Open

Improve remote file fetch#16995
alperozturk96 wants to merge 4 commits intomasterfrom
improve-remote-file-fetch

Conversation

@alperozturk96
Copy link
Copy Markdown
Collaborator

Issue

Purpose of this PR improve the flow not fix every server error.

 Exception in thread "AsyncTask #2" java.lang.RuntimeException: An error occurred while executing doInBackground()
      at android.os.AsyncTask$4.done(AsyncTask.java:415)
      at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:434)
      at java.util.concurrent.FutureTask.setException(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:322)
      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
      at java.lang.Thread.run(Thread.java:1564)
      Caused by: Exception in thread "AsyncTask #2" com.owncloud.android.operations.RemoteOperationFailedException: Error during saving file with parents: /cc/bb/aa.apk / Datei nicht gefunden
      at com.owncloud.android.datamodel.FileDataStorageManager.saveFileWithParent(FileDataStorageManager.java:624)
      at com.owncloud.android.ui.asynctasks.FetchRemoteFileTask.doInBackground(FetchRemoteFileTask.java:88)
      at com.owncloud.android.ui.asynctasks.FetchRemoteFileTask.doInBackground(FetchRemoteFileTask.java:31)
      at android.os.AsyncTask$3.call(AsyncTask.java:394)
      at java.util.concurrent.FutureTask.run(FutureTask.java:317)
      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1154)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:652)
      at java.lang.Thread.run(Thread.java:1564)

Changes

  • Uses lifecycle aware Kotlin coroutines
  • Handles all casts, potential errors and logs them
  • Prevents static field leak

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 added the performance 🚀 Performance improvement opportunities (non-crash related) label May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Codacy

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness6767
Dodgy code216216
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4242
Security1616
Total420420

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

APK file: https://github.com/nextcloud/android/actions/runs/25371190729/artifacts/6804958259
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review performance 🚀 Performance improvement opportunities (non-crash related)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant