boredazfcuk / docker-icloudpd

An Alpine Linux container for the iCloud Photos Downloader command line utility
1.69k stars 161 forks source link

download logging goes to error output #398

Closed ronbruins closed 11 months ago

ronbruins commented 11 months ago

Downloads are not seen in the logs. When I log into the container I see that the file 'icloudpd_download_error' is been written to with the actual download logging (INFO and DEBUG) It seems that the output for the clouded commands writes to sterr and not stdout

e.g.

/tmp/icloudpd # cat icloudpd_download_error
2023-09-30 09:27:34 DEBUG    Authenticating...
2023-09-30 09:27:39 DEBUG    Looking up all photos and videos from album All Photos...
2023-09-30 09:27:39 INFO     Downloading ??? original photos and videos to /home/ron/iCloud ...
2023-09-30 09:27:43 DEBUG    /home/user/iCloud/2023/2023-09-29/IMG_4059.MOV already exists
2023-09-30 09:27:43 DEBUG    /home/user/iCloud/2023/2023-09-29/IMG_4058.HEIC already exists
2023-09-30 09:27:43 DEBUG    /home/user/iCloud/2023/2023-09-29/IMG_4058_HEVC.MOV already exists
2023-09-30 09:27:43 DEBUG    /home/user/iCloud/2023/2023-09-22/IMG_1830.mov already exists
2023-09-30 09:27:43 DEBUG    /home/user/iCloud/2023/2023-09-22/IMG_1829.mov already exists
2023-09-30 09:27:43 DEBUG    /home/user/iCloud/2023/2023-09-22/IMG_1828.mov already exists
2023-09-30 09:27:43 INFO     Found 5 consecutive previously downloaded photos. Exiting
2023-09-30 09:27:43 INFO     All photos have been downloaded
2023-09-30 09:27:43 INFO     Deleting any files found in 'Recently Deleted'...

The command executed is: 2023-09-30 09:27:34 DEBUG iCloudPD launch command: /opt/icloudpd_latest/bin/icloudpd --directory /home/user/iCloud --cookie-directory /config --domain com --username user@dom.com --auto-delete --folder-structure {:%Y/%Y-%m-%d} --until-found 5 2>/tmp/icloudpd/icloudpd_download_error

When running it manual without the '2>2>/tmp/icloudpd/icloudpd_download_error` it shows on my terminal screen

/tmp/icloudpd # /opt/icloudpd_latest/bin/icloudpd --directory /home/user/iCloud --cookie-directory /config --domain com --username user@dom.com --auto-delete --folder-structure {:%Y/%Y-%m-%d} --until-found 5
2023-09-30 09:36:55 DEBUG    Authenticating...
2023-09-30 09:37:00 DEBUG    Looking up all photos and videos from album All Photos...
2023-09-30 09:37:00 INFO     Downloading ??? original photos and videos to /home/ron/iCloud ...
2023-09-30 09:37:04 DEBUG    /home/user/iCloud/2023/2023-09-29/IMG_4059.MOV already exists
2023-09-30 09:37:04 DEBUG    /home/user/iCloud/2023/2023-09-29/IMG_4058.HEIC already exists
2023-09-30 09:37:04 DEBUG    /home/user/iCloud/2023/2023-09-29/IMG_4058_HEVC.MOV already exists
2023-09-30 09:37:04 DEBUG    /home/user/iCloud/2023/2023-09-22/IMG_1830.mov already exists
2023-09-30 09:37:04 DEBUG    /home/user/iCloud/2023/2023-09-22/IMG_1829.mov already exists
2023-09-30 09:37:04 DEBUG    /home/user/iCloud/2023/2023-09-22/IMG_1828.mov already exists
2023-09-30 09:37:04 INFO     Found 5 consecutive previously downloaded photos. Exiting
2023-09-30 09:37:04 INFO     All photos have been downloaded
2023-09-30 09:37:04 INFO     Deleting any files found in 'Recently Deleted'...
boredazfcuk commented 11 months ago

I can confirm I'm also seeing this behaviour. It seems that an upstream change has broken things. Instead of logging to stdout, they're logging everything to stderr. I've created a bug report. Hopefully they can fix it promptly.

boredazfcuk commented 11 months ago

I've created a new version which applies a temporary fix of pushing error output to screen. It should work, unless there are issues, as they will be pushed to the standard log file, which I haven't accounted for anywhere else in the container, so could cause problems. Once it's fixed upstream, I'll change back.

ronbruins commented 11 months ago

Great. Will update and keep an eye on the permanent fix. Thanks for the quick response.

boredazfcuk commented 11 months ago

I've just pushed another version, 647.

Although deleted/downloaded notifications were working, the file previews were blank for some reason. I'm not sure why. I made a slight change and it's tested OK again. So Make sure you have version 647 when you upgrade.

ronbruins commented 11 months ago

I see 649 in the build_versions.txt

ronbruins commented 11 months ago

I saw the matter was fixed on icloudpd_downloader. Is this already included in here? I'm not sure what to do now :)

boredazfcuk commented 11 months ago

Not yet, v1.16.2 landed about 4am my time. I've not had a chance to build and test the new version today. Will prob look at it in a few hours when I'm back home.

ronbruins commented 11 months ago

Totally understandable, didn’t mean to push you. I have it running properly now, with the fix/workaround. Was just wondering.

Thanks, RB

On 1 Oct 2023, at 18:10, boredazfcuk @.***> wrote:

Not yet, v1.16.2 landed about 4am my time. I've not had a chance to build and test the new version today. Will prob look at it in a few hours when I'm back home.

— Reply to this email directly, view it on GitHub https://github.com/boredazfcuk/docker-icloudpd/issues/398#issuecomment-1742110757, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKN7XFJ43VBF5FZR2DG7QTTX5GBWVANCNFSM6AAAAAA5NNERTI. You are receiving this because you authored the thread.

boredazfcuk commented 11 months ago

I've pushed a new version which includes the upstream fix and removes the workaround I put in place, so I'll close this off. Any issues and I'll reopen it.