icloud-photos-downloader / icloud_photos_downloader

A command-line tool to download photos from iCloud
MIT License
6.59k stars 535 forks source link

Downloads hang on random files. #642

Closed hoyle1974 closed 9 months ago

hoyle1974 commented 1 year ago

Overview

I run with just the -u -p and -d options and it hangs on files. I kill it, restart and it continues past the file it got stuck on.

Steps to Reproduce

  1. Start download on my account
  2. At some point it hangs on a file, with a .part file written instead smaller than the final amount
  3. Kill the app, restart it again, and when it gets to that file it continues downloading it successfully but fails on a later one.

Expected Behavior

I expect it to either provide an error if the file can't be downloaded or to successfully download the file. I don't expect it to be frozen for hours.

Actual Behavior

Freezes till I manually restart the application

Context

One note is that I am writing files to a NFS mounted drive. I will test again on a non NFS mounted drive and see if it still hangs.

hoyle1974 commented 1 year ago

I verified this happens using my iCloud account but with local disk storage and with a completely different machine.

AndreyNikiforov commented 1 year ago

@hoyle1974 for how long did you wait for download? I wonder if there are any network issues that slow downloading significantly. If the code sees error with download, it retries certain times, spitting logs, so you should see these attempts.

What version are you using? Try reproduce the issue with latest version pls.

hoyle1974 commented 1 year ago

It was the latest version. But will retry again when I get a second. I left it for hours. I expected a timeout but nothing.

I’m trying to dig into the code and debug it as time allows.

On Mon, Jul 3, 2023 at 7:19 AM Andrey Nikiforov @.***> wrote:

@hoyle1974 https://github.com/hoyle1974 for how long did you wait for download? I wonder if there are any network issues that slow downloading significantly. If the code sees error with download, it retries certain times, spitting logs, so you should see these attempts.

What version are you using? Try reproduce the issue with latest version pls.

— Reply to this email directly, view it on GitHub https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/642#issuecomment-1618413275, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGXQKJPLANENZ4SZFV2AH3XOLIGBANCNFSM6AAAAAAZISIL5Q . You are receiving this because you were mentioned.Message ID: <icloud-photos-downloader/icloud_photos_downloader/issues/642/1618413275@ github.com>

AndreyNikiforov commented 1 year ago

@hoyle1974 Pls see if v1.14.2 fixes the issue

hoyle1974 commented 1 year ago

Tried v1.14.2 and it hung on "already exists". Killed it after a couple of hours sitting on this one file.

@.***:~/icloud$ /home/jstrohm/icloud_photos_downloader/icloudpd.py -u @@@@@ -p @@@@@ -d "/home/jstrohm/gloria/photos" 2023-07-03 23:06:26 DEBUG Authenticating... 2023-07-03 23:06:30 DEBUG Looking up all photos and videos from album All Photos... 2023-07-03 23:06:30 INFO Downloading 112403 original photos and videos to /home/jstrohm/gloria/photos ... /home/jstrohm/gloria/photos/2020/11/18/IMG_1053_HEVC.MOV already exists.: 24%|####################9 | 26765/112403 [22:40<47:21, 30.14it/s]

On Mon, 3 Jul 2023 at 10:37, Andrey Nikiforov @.***> wrote:

@hoyle1974 https://github.com/hoyle1974 Pls see if v1.14.2 https://github.com/icloud-photos-downloader/icloud_photos_downloader/releases/tag/v1.14.2 fixes the issue

— Reply to this email directly, view it on GitHub https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/642#issuecomment-1618929503, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGXQKICMHC7S25SQGNNSODXOL7OJANCNFSM6AAAAAAZISIL5Q . You are receiving this because you were mentioned.Message ID: <icloud-photos-downloader/icloud_photos_downloader/issues/642/1618929503@ github.com>

AndreyNikiforov commented 9 months ago

@hoyle1974 has the issue been resolved? Did you get to the root cause of it?

hoyle1974 commented 9 months ago

I think it did fix the issue. I haven't had a chance to work on my project in months but I'll reopen it if I see it again.

On Sat, 2 Dec 2023 at 18:49, Andrey Nikiforov @.***> wrote:

@hoyle1974 https://github.com/hoyle1974 has the issue been resolved? Did you get to the root cause of it?

— Reply to this email directly, view it on GitHub https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/642#issuecomment-1837316887, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGXQKLWS2KPLTF2DVJ5ETDYHPSFPAVCNFSM6AAAAAAZISIL5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGMYTMOBYG4 . You are receiving this because you were mentioned.Message ID: <icloud-photos-downloader/icloud_photos_downloader/issues/642/1837316887@ github.com>