Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoUpload not working since 3.28.1 #12879

Closed
4 tasks done
mintsoft opened this issue Apr 15, 2024 · 17 comments
Closed
4 tasks done

AutoUpload not working since 3.28.1 #12879

mintsoft opened this issue Apr 15, 2024 · 17 comments
Labels

Comments

@mintsoft
Copy link

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Setup autoupload on a folder under 3.27
  2. Upgrade to 3.28.2

Expected behaviour

Auto upload should continue to work, I've not had anything uploaded from my phone since upgrading to 3.28.2 (about 10 days now)

Actual behaviour

Autouploads don't occur, they don't queue or anything. There is nothing obvious to indicate that the app is attempting uploads.

Android version

14

Device brand and model

Xiaomi Poco F1

Stock or custom OS?

Custom (explain in "additional information")

Nextcloud android app version

3.28.2

Nextcloud server version

28.0.4

Using a reverse proxy?

No

Android logs

logcatOutput.txt

Logcat was started, a picture was taken, gallery was opened, nextcloud was then opened and the uploads page viewed, then logcat ended.

Server error logs

None that I could find

Additional information

Looking through the logcat; this stands out to me:

04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: Work [ id=55ad9385-afec-429c-bc71-608b8392f808, tags={ com.nextcloud.client.jobs.FilesSyncWork, *, name:periodic_files_sync, timestamp:1713129827653, class:FilesSyncWork } ] failed because it threw an exception/error
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Attempt to get length of null array
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at androidx.work.impl.utils.futures.AbstractFuture.getDoneValue(AbstractFuture.java:516)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at androidx.work.impl.utils.futures.AbstractFuture.get(AbstractFuture.java:475)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:317)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at androidx.work.impl.utils.SerialExecutorImpl$Task.run(SerialExecutorImpl.java:96)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at java.lang.Thread.run(Thread.java:1012)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: Caused by: java.lang.NullPointerException: Attempt to get length of null array
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at org.lukhnos.nnio.file.Files.walkFileTree(Files.java:342)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at com.owncloud.android.utils.FilesSyncHelper.insertAllDBEntriesForSyncedFolder(FilesSyncHelper.java:97)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at com.owncloud.android.utils.FilesSyncHelper.insertAllDBEntries(FilesSyncHelper.java:125)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at com.nextcloud.client.jobs.FilesSyncWork.collectChangedFiles(FilesSyncWork.kt:174)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at com.nextcloud.client.jobs.FilesSyncWork.doWork(FilesSyncWork.kt:130)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	at androidx.work.Worker$1.run(Worker.java:82)
04-15 09:27:00.905 26428 26449 E WM-WorkerWrapper: 	... 3 more
04-15 09:27:00.905 26428 26449 I WM-WorkerWrapper: Worker result FAILURE for Work [ id=55ad9385-afec-429c-bc71-608b8392f808, tags={ com.nextcloud.client.jobs.FilesSyncWork, *, name:periodic_files_sync, timestamp:1713129827653, class:FilesSyncWork } ]
@mintsoft mintsoft added the bug label Apr 15, 2024
@mintsoft
Copy link
Author

A very quick glance at the code and I think the problem is possibly here: https://github.com/nextcloud/android/blob/master/app/src/main/java/com/owncloud/android/utils/FilesSyncHelper.java#L101 I think that should maybe FileVisitResult.SKIP_SUBTREE

@eikaramba
Copy link

same problem here. nextcloud is sooo unreliable, auto upload not working, duplicate files, 0 byte files... switching to immich for media at least now

@JonasMayerDev
Copy link
Collaborator

Hmm I can't reproduce here, could one of you check if this issue still exists with the new 3.29 RC1 and if yes check if it already existed in 3.28.0.

It's kind of odd, the error message points to a closing curly brace in the Files.java:342...

@mintsoft I don't think this will make a difference. According to docs it acts like CONTINUE if it is not returned in "preVisitDirectory"... Additionally, in my dev environment, this option does not exist. Not sure if the android app uses a different version of Files?

@mintsoft
Copy link
Author

mintsoft commented Apr 19, 2024

It's kind of odd, the error message points to a closing curly brace in the Files.java:342...

Only in master, if you look at the tagged version it points to Files.walkTreePath: https://github.com/nextcloud/android/blob/stable-3.28.2/app/src/main/java/com/owncloud/android/utils/FilesSyncHelper.java#L97 @JonasMayerDev

I don't think this will make a difference. According to docs it acts like CONTINUE if it is not returned in "preVisitDirectory"... Additionally, in my dev environment, this option does not exist. Not sure if the android app uses a different version of Files?

I think the code has changed since I made that suggestions, when I looked before I think it was return null; which is why I was thinking it's likely that's the problem. Now it doesn't look like it is

@mintsoft
Copy link
Author

mintsoft commented Apr 19, 2024

I've just tested under 3.28.0 and it seems to be working there, at least I have the "preparing auto upload" notification that's appeared.

Edit: confirmed it's working fine under 3.28.0

@JonasMayerDev
Copy link
Collaborator

@mintsoft yes on master a lot has changed there. That's why it would be interesting if this issue exists on 3.29 RC1 too.

@mintsoft
Copy link
Author

@mintsoft yes on master a lot has changed there. That's why it would be interesting if this issue exists on 3.29 RC1 too.

Yeah, it's not quite as straight forward for me to upgrade as downgrade as I've installed through F-Droid, so ideally I need an FDroid APK to upgrade to, but I'll see what I can do.

@mintsoft
Copy link
Author

mintsoft commented Apr 19, 2024

I've just upgraded from 3.28.0 -> 3.28.1 and it's stopped working again, so I can confirm that the problem is introduced between those versions at least.

@mintsoft mintsoft changed the title AutoUpload not working since 3.28.2 (maybe 3.28 in general) AutoUpload not working since 3.28.1 Apr 19, 2024
@mintsoft
Copy link
Author

Hmm, so I can't easily switch to the RC version; however I have installed "Nextcloud Dev" from FDroid (https://f-droid.org/en/packages/com.nextcloud.android.beta/) and the version 20240414 does seem to be working. I'm not sure how that relates to the RC version, but I guess it might indicate that it is already fixed in master?

@mintsoft
Copy link
Author

Aha, RC1 has found its way to Fdroid now, I'll try that this evening and see if it has the same behaviour

@mintsoft
Copy link
Author

Just upgraded to RC1 and it seems to still be broken under that, downgrading to 3.28.0 restored the functionality; although the autoupload settings between RC1 and 3.28 seem to reset so you have to reconfigure the folders

@mintsoft
Copy link
Author

mintsoft commented May 11, 2024

Just noticed 3.29 is out, it's fixed in that version so I'll close this issue now.

@amessina
Copy link

I find that Auto Upload on 3.29 is flakey -- works sometimes, but not most of the time. I have gone in on my Samsung Galxy S23 and re-saved the configuration options for the folders, to no effect.

@mintsoft
Copy link
Author

@amessina if you can reproduce it, I'd see if you can adb logcat out to a file when its being weird and open another issue, I'll keep an eye out also for weird things

@amessina
Copy link

@amessina if you can reproduce it, I'd see if you can adb logcat out to a file when its being weird and open another issue, I'll keep an eye out also for weird things

It's reproduceable, though I don't have a setup available to do that kind of debug logging (unless it can be activated from within the app)

@JonasMayerDev
Copy link
Collaborator

@amessina then maybe describe how you are able to reproduce? Maybe we can reproduce and check if it still is this issue?

@amessina
Copy link

@JonasMayerDev I have uninstalled and reinstalled the Nextcloud app on my Samsung Galaxy S23, which enabled me to go throught the permissions notices again. I was then able to re-add my auto upload folders and things seem to work now.

I do get the warning about battery settings when updating an auto-update folder configuration, but I've confirmed I don't have this app restricted.

It is confusing to have options like "Cancel" and "Disable" -- disable the battery settings? The auto-upload for the folder?

I'll keep an eye and see if it comes up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants