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

Camera upload stuck permanently at "Scanning" #911

Closed
thegarbz opened this issue Sep 27, 2021 · 25 comments
Closed

Camera upload stuck permanently at "Scanning" #911

thegarbz opened this issue Sep 27, 2021 · 25 comments

Comments

@thegarbz
Copy link

I have noticed in past versions the camera upload service wasn't working. However I thought it was related to the problem in Issue #900 and as such attributed it to the number of files in the camera folder. The camera upload worked fine in 2.2.25. Yesterday upgrading to 2.2.41 which fixed #900 I noticed camera upload still wasn't working.

The symptoms are identical to those described in #883 and #800.

I've also tried the fixes from that those threads including disabling and re-enabling, clearing app cache, and manually deleting the cache folder.

Unfortunately at this point I've once again reverted to 2.2.25

@maxiaoping
Copy link
Contributor

Can provide your/Android/media/com seafile. Seadroid2 seafile/latest log file

@thegarbz
Copy link
Author

Working on it. Either the folder is legitimately empty or I have a security issue preventing me from reading it...

@thegarbz
Copy link
Author

thegarbz commented Sep 27, 2021

@maxiaoping Okay got a look of the log file and I see some interesting things, or rather I don't see some interesting things.

Log: i see 2633 images, 259 videos. = 2892 files in total
Gallery: 2855 files in Camera, 37 files in SeekThermal = 2892 files in total
So far so good. I took a few photos and it correctly updates to "i see 2637 images"

That's where the good news ends.
In going through the files I can't find any mention of the file name of the pictures I took.
Additionally counting the lines doesn't add up to the number of files seen. The closest I've seen is one pass identified 2626 images. Most passes are lower: 2018 lines, 2019 lines, 1999 lines, and 2494 lines.

So seafile correctly counts the files, but I can't see any evidence of it correctly parsing all of them.

Here's a link to the log file: https://zeus.garbz.com/seafile/f/b0040c02127a4e168f06/

I uninstalled 2.2.41 and reinstalled 2.2.25 and instantly my missing files were uploaded. Additionally I took another test photo and that was also uploaded within 10min. I can't find a log file for this version though.

@maxiaoping
Copy link
Contributor

The log file is incomplete. You are advised to clear the old log files and collect the latest log files. Please provide the latest and most complete upload log file.So that we can analyze the problem.

@thegarbz
Copy link
Author

What am I supposed to be seeing to make the log complete? I uploaded the whole and only logfile after uninstalling 2.2.25 (which deletes the directory containing the log) and installing 2.2.41 in its entirety.

I can repeat the process, but what should I see in the log before I waste time uploading another incomplete file?

@thegarbz
Copy link
Author

@maxiaoping Okay here's another link https://zeus.garbz.com/seafile/f/fa93614dbdb544af9174/
steps to make this log file:

  • Uninstall 2.2.25
  • Verify that the directory with the logs was deleted.
  • Install 2.2.41
  • Connect to Seafile server
  • Enable camera upload
  • Wait a while
  • Take a photo
  • Wait a while longer
  • Use USB cable to extract log file and copy it here in its entirety.

If the log file is still incomplete we can add that log files are being generated incorrectly to this bug... or open a new bug report.

@maxiaoping
Copy link
Contributor

image
The logs I can see are all like this. The last log is not displayed. This log shows that these pictures have been backed up before, so I skipped it.

@thegarbz
Copy link
Author

Well this is the only log I have. Did I do anything wrong with generating them? If not then its likely the missing log is related to the bug of the camera upload not working.

This is all that is being generated. You can see in the middle that at some point it ends and starts again its cycle of pointless skipping:

2021-09-30 22:15:13    d    Utils    =====Skipping media /storage/3539-3031/DCIM/Camera/20200224_144727.jpg because we have uploaded it in the past.
2021-09-30 22:15:13    d    Utils    =====Skipping media /storage/3539-3031/DCIM/Camera/20200224_144733.jpg because we have uploaded it in the past.
2021-09-30 22:15:13    d    Utils    =====Skipping media /storage/3539-3031/DCIM/Camera/20200224_144744.jpg because we have uploaded it in the past.
2021-09-30 22:15:13    d    Utils    =======waitForUploads===
2021-09-30 22:15:13    d    Utils    Starting to upload videos...
2021-09-30 22:15:13    d    Utils    ==========end
2021-09-30 22:28:16    d    Utils    ==========start
2021-09-30 22:28:17    d    Utils    ========Starting to upload images...
2021-09-30 22:28:17    d    Utils    ===i see 2642 images.
2021-09-30 22:28:18    d    Utils    =====Skipping media /storage/3539-3031/DCIM/Camera/20190527_110455.jpg because we have uploaded it in the past.
2021-09-30 22:28:18    d    Utils    =====Skipping media /storage/3539-3031/DCIM/Camera/20190527_110541.jpg because we have uploaded it in the past.

And in between it correctly counts the number of images, and this count changes if I take a photo.

@maxiaoping
Copy link
Contributor

image

It is recommended that you take a few new photos to try the synchronization function and test whether the upload can be completed

@maxiaoping
Copy link
Contributor

Can the newly taken photos be synchronized successfully?

@maxiaoping
Copy link
Contributor

Here is a test version that you can use to see if you can complete the upload function.
https://dev.seafile.com/seahub/f/a164a779dbde4af68144/?dl=1

@thegarbz
Copy link
Author

thegarbz commented Oct 15, 2021

Well the test version seems to be generating more verbose logs, but still no working camera upload.

In my previous tests I have been taking new photos and seeing if they synchronise. And Seafile correctly "sees" new photos, but just doesn't upload them. Here is the log from the new dev version and here are some key pieces of information:
https://zeus.garbz.com/seafile/f/0f37bb847d694eb8b106/

19:11 - New dev version installed and camera upload enabled. I let the phone sit for a few hours to see what happens.

19:11 ===i see 2661 images.
19:35 I see the end notification. It looks like 440 files were scanned.
19:44 it starts the upload again (still sees 2661 images) ends 19:45 454 files scanned
19:55 it starts the upload again (still sees 2661 images) ends 19:57 443 files scanned
20:15 it starts the upload again (still sees 2661 images) no end notification 20:16 6 files scanned
20:30 it starts the upload again (still sees 2661 images) no end notification 20:33 18 files scanned
20:48 it starts the upload again (still sees 2661 images) no end notification 20:51 3 files scanned
21:52 (hmm big jump in time there) it starts the upload again (still sees 2661 images) no end notification 21:55 711 files scanned
At 22:11 I took 3 additional photos.
22:45 it starts the upload again (===i see 2664 images.) so it correctly recognises the 3 additional photos are taken but ends with no notification at 22:48 It never uploaded the new photos. Heck it never even looked at anything past 2019 photos much less the new photo with the filename 20211015_221113.jpg
Worth noting at this point that the log file does not contain any photos from 2020 or 2021. 470 files were scanned this time.

22:50 it starts the upload again (still sees 2664 images) no end notification 22:53 430 files were scanned
23:01 it starts the upload again (still sees 2664 images) ...

23:02 I copied the log file off the phone

It very much looks like something is interrupting the scan, but I stress the phone was completely untouched as all of this was happening other than me taking 3 photos at 22:11

@maxiaoping
Copy link
Contributor

maxiaoping commented Oct 23, 2021

The following are two test versions, please install the test respectively. Both versions have been uploaded and modified to remove excessive duplicate logs, so as to better collect available logs.
01 Test Version:
https://dev.seafile.com/seahub/f/a164a779dbde4af68144/?dl=1
02 Test Version:
https://cloud.seafile.com/f/c1d88a1aa99b47da9ccd/?dl=1

@thegarbz
Copy link
Author

thegarbz commented Oct 26, 2021

Thanks for continuing to look into this. Here are the two test versions and their logs: along with a description:

19:43 Test 01 Installed
20:33 Two test pictures taken
21:10 Log file downloaded from 01 Test version: https://zeus.garbz.com/seafile/f/a135c5ffa3ab4f1e976b/

21:13 Test 02 Installed
21:53 Three test pictures taken
22:00 Three test pictures taken with thermal camera. These are saved in a different folder to the camera. Both my Camera folder and my Seek Thermal folder have been selected for synchronization.
23:25 Log file downloaded from 02 Test version: https://zeus.garbz.com/seafile/f/01977f34ec2d43d3a171/

23:43 2.2.25 Installed
00:02 All six missing test photos were synced successfully.

@maxiaoping
Copy link
Contributor

image

Which test version was uploaded successfully? I used Samsung S9 to test the scan time difference between the two versions. The scan time difference (--end----total time---) of the two versions of yours is actually similar. It shouldn't be like this. If the upload is successful, it will print out the log (====uploading file...), obviously you lack the log file

@thegarbz
Copy link
Author

thegarbz commented Nov 4, 2021

Neither. I had no successful upload. Close to midnight I rolled back to 2.2.25 and within 20min all the photos were scanned and all the photos I took while I was running both test files were uploaded with this rolled back version.

It's quite curious. As a matter of interest in your test scenarios are you using multiple manually selected folders to sync? It's about the only thing I could think of that is slightly different from my setup than what would normally be done. Since I have my camera saving to a folder called "Camera", and my thermal camera software saving to a folder called "Seek Thermal" elsewhere on the device I manually selected both, but this has worked for years.

The only other thing I can think of is the size. 31.2GB with over 3200 files

@maxiaoping
Copy link
Contributor

I used Samsung S9+, sync Camera album 1300 photos can be successful, may be my android10. My Android11 tests with pixel 4a were also successful. Use 2.2.25 until I find a Samsung android11 to test

@thegarbz
Copy link
Author

thegarbz commented Nov 7, 2021

Thanks for continuing to look into this. Yes I'm more than fine using 2.2.25. Everything works. You may recall I opened a bug report for being unable to browse a large number of files a while back which has since been fixed. But at the time already I also remember 2.2.30 failed to sync photos. At the time I put it down to the image caching issue you recently fixed. But maybe whatever problem I'm having was introduced somewhere between 2.2.25 and 2.2.30.

Is is possible that this is anything to do with an interaction with the server? What server version are you running? Maybe I should update mine, it's been about 6 months since I did that last.

@KeironO
Copy link

KeironO commented Dec 8, 2021

I'm currently experiencing the same issues:

Android App Version: 2.2.42
Seafile Server Version: 6.3.4

@DanySupernova
Copy link

Hi guys, thank you for this great software. I have the same problem on my Samsung Galaxy A50 with stock Android 11. I've tried different versions of client, with 2.2.39 play store version the sync blocks with log message "because we have uploaded it in the past". With 2.2.25 photos sync is ok, but the videos are not sync.
On my Xiaomi Mi 8 Lite with stock Android 10, latest play store version 2.2.39 works perfectly.

Thank you very much!

@KeironO
Copy link

KeironO commented Jan 26, 2022

I upgraded my server and the problem went away.

@DanySupernova
Copy link

Hi, sorry, which version do you have installed? I have the docker image (seafile-pro-mc:latest), 8.0.7

Thank you

@DanySupernova
Copy link

I installed Lineage OS 18 (Android 11) on my Xiaomi MI 8 Lite, and now I have the same problem that I have on my Samsung A50 (Android 11): a lot of "Upload cancelled" and videos doesn't sync.
On original Android 10 OS it worked perfectly.

Could Android 11 be the problem? I find no other differences

Thank you very much

@jonas-w
Copy link

jonas-w commented Feb 1, 2022

Same problem here on Samsung Stock Android 11 with App version 2.2.39 and server version 9.0.4 only a third of my photos get uploaded and then it will say finished...

@DanySupernova
Copy link

Hi guys, in the end I decided to try all the app versions one by one, starting with the latest one. With the last 2.45 the upload doesn't even start, every now and then it loads 3-4 photos but they don't even appear in the app upload list. Eventually I found that 2.31 works perfectly on my Samsung A50 running Android 11. Perfectly! In no time he uploaded 18GB of photos and videos! Out of curiosity, I'm ignorant enough to figure it out by myself, could someone explain to me what had more (or less) that version compared to the next ones? A thousand thanks!

@zhwanng zhwanng closed this as completed Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants