boredazfcuk / docker-icloudpd

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

Failed downloading album / Invalid value for '-d' / '--directory': Path 'xxxxxxx' is not readable. #368

Closed bt-beardedtechie closed 8 months ago

bt-beardedtechie commented 1 year ago

I've set up the container, and able to list all the albums from iCloud, I also do not have any popups when logging into iCloud.

But no photos are being downloaded, I get two error codes, please see log below and advise:

date stream content
######## stdout 2023-08-08 14:52:13 INFO     Next synchronisation at 14:52:02
     
######## stdout 2023-08-08 14:52:13 INFO     Total time taken: 00:00:11
     
######## stdout 2023-08-08 14:52:13 INFO     Synchronisation ended at 14:52:13
     
######## stdout 2023-08-08 14:52:13 INFO     Days remaining until expiration: 89
     
######## stdout 2023-08-08 14:52:13 INFO     Two factor authentication cookie expires: 2023-11-05 @ 18:17:39
     
######## stdout 2023-08-08 14:52:13 INFO     Web cookie expires: 2023-10-06 @ 18:17:18
     
######## stdout 2023-08-08 14:52:13 ERROR    Please report problems here: https://github.com/boredazfcuk/docker-icloudpd/issues
     
######## stdout Error: Invalid value for '-d' / '--directory': Path 'xxxxxx' is not readable.
     
######## stdout  
     
######## stdout Try 'icloudpd -h' for help.
     
######## stdout 2023-08-08 14:52:13 ERROR    Usage: icloudpd
     
######## stdout 2023-08-08 14:52:13 ERROR    Error debugging info:
     
######## stdout 2023-08-08 14:52:13 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
     
######## stdout 2023-08-08 14:52:13 ERROR    Failed to download new files
     
######## stdout 2023-08-08 14:52:03 ERROR    Failed downloading album: "All Photos"
     
######## stdout 2023-08-08 14:52:03 INFO     Downloading album: "All Photos"
     
######## stdout 2023-08-08 14:52:02 INFO     Failsafe file /photo/iCloud/.mounted exists, continuing
######## stdout 2023-08-08 14:52:02 INFO     Check download directory mounted correctly...
     
######## stdout 2023-08-08 14:52:02 INFO     Keyring file exists, continuing
######## stdout 2023-08-08 14:52:02 INFO     Synchronisation starting at 14:52:02
     
######## stdout 2023-08-08 14:52:02 INFO     Sync user: user
     
######## stdout 2023-08-08 14:52:02 INFO      - album009
     
######## stdout 2023-08-08 14:52:02 INFO      - album008
     
######## stdout 2023-08-08 14:52:02 INFO      - album007
     
######## stdout 2023-08-08 14:52:02 INFO      - album006
     
######## stdout 2023-08-08 14:52:02 INFO      - album005
     
######## stdout 2023-08-08 14:52:02 INFO      - album004
     
######## stdout 2023-08-08 14:52:02 INFO      - album003
     
######## stdout 2023-08-08 14:52:02 INFO      - album002
     
######## stdout 2023-08-08 14:52:02 INFO      - album001
     
######## stdout 2023-08-08 14:52:02 INFO      - Hidden
     
######## stdout 2023-08-08 14:52:02 INFO      - Recently Deleted
     
######## stdout 2023-08-08 14:52:02 INFO      - Live
     
######## stdout 2023-08-08 14:52:02 INFO      - Screenshots
     
######## stdout 2023-08-08 14:52:02 INFO      - Panoramas
     
######## stdout 2023-08-08 14:52:02 INFO      - Favorites
     
######## stdout 2023-08-08 14:52:02 INFO      - Bursts
     
######## stdout 2023-08-08 14:52:02 INFO      - Slo-mo
     
######## stdout 2023-08-08 14:52:02 INFO      - Videos
     
######## stdout 2023-08-08 14:52:02 INFO      - Time-lapse
     
######## stdout 2023-08-08 14:52:02 INFO      - All Photos
     
######## stdout 2023-08-08 14:52:02 INFO     Albums available:
     
######## stdout 2023-08-08 14:51:57 INFO     Keyring file exists, continuing
######## stdout 2023-08-08 14:51:57 INFO     Directory is writable: /home/user/.local/share/
     
######## stdout 2023-08-08 14:51:57 INFO     Directory is writable: /config/python_keyring/
     
######## stdout 2023-08-08 14:51:57 INFO     Failsafe file /photo/iCloud/.mounted exists, continuing
######## stdout 2023-08-08 14:51:57 INFO     Check download directory mounted correctly...
     
######## stdout 2023-08-08 14:51:57 INFO     Directory is writable: /home/user/.local/share/
     
######## stdout 2023-08-08 14:51:57 INFO     Directory is writable: /config/python_keyring/
     
######## stdout 2023-08-08 14:51:57 INFO     Ignore Synology extended attribute directories: Disabled
     
######## stdout 2023-08-08 14:51:57 INFO     Authentication domain: com
     
######## stdout 2023-08-08 14:51:57 INFO     Downloading from: icloud.com
     
######## stdout 2023-08-08 14:51:57 INFO     Convert HEIC to JPEG: false
     
######## stdout 2023-08-08 14:51:57 INFO     Skip videos: false
     
######## stdout 2023-08-08 14:51:57 INFO     Live photo size: original
     
######## stdout 2023-08-08 14:51:57 INFO     Stop downloading when prexisiting files count is: Download All Photos
     
######## stdout 2023-08-08 14:51:57 INFO     Downloading photos from album(s): "All Photos"
     
######## stdout 2023-08-08 14:51:57 INFO     Number of most recently added photos to download: 100
     
######## stdout 2023-08-08 14:51:57 INFO     Skip live photos: false
     
######## stdout 2023-08-08 14:51:57 INFO     Skip download check: true
     
######## stdout 2023-08-08 14:51:57 INFO     Single pass mode: false
     
######## stdout 2023-08-08 14:51:57 INFO     Photo size: original
     
######## stdout 2023-08-08 14:51:57 INFO     Delete after download: false
     
######## stdout 2023-08-08 14:51:57 INFO     Auto delete: false
     
######## stdout 2023-08-08 14:51:57 INFO     Set EXIF date/time: false
     
######## stdout 2023-08-08 14:51:57 INFO     Synchronisation delay (minutes): 0
     
######## stdout 2023-08-08 14:51:57 INFO     Synchronisation interval: 86400
     
######## stdout 2023-08-08 14:51:57 INFO     Folder structure: {:%Y/%m/%d}
     
######## stdout 2023-08-08 14:51:57 INFO     Download destination directory: /photo/iCloud
     
######## stdout 2023-08-08 14:51:57 INFO     Cookie expiry notification period: 7
     
######## stdout 2023-08-08 14:51:57 INFO     Cookie path: /config/XXXXXXXXXXXX
     
######## stdout 2023-08-08 14:51:57 INFO     Authentication Type: MFA
     
######## stdout 2023-08-08 14:51:57 INFO     Apple ID: XXXXXXXXXXXXXXXXXXXX
     
######## stdout /usr/local/bin/sync-icloud.sh: /config/icloudpd.conf: line 45: Deleted,Hidden: not found
######## stdout /usr/local/bin/sync-icloud.sh: /config/icloudpd.conf: line 36: Photos: not found
     
######## stdout /usr/local/bin/sync-icloud.sh: /config/icloudpd.conf: line 2: 0: not found
     
######## stdout /usr/local/bin/sync-icloud.sh: /config/icloudpd.conf: line 1: /iCloud: not found
     
######## stdout 2023-08-08 14:51:55 INFO     Loading configuration from: /config/icloudpd.conf
     
######## stdout 2023-08-08 14:51:54 INFO     Python version: 3.11.4
     
######## stdout 2023-08-08 14:51:54 INFO     Alpine Linux 3.18.2
     
######## stdout 2023-08-08 14:51:54 INFO     For support, please go here: https://github.com/boredazfcuk/docker-icloudpd
######## stdout 2023-08-08 14:51:54 INFO     boredazfcuk/icloudpd container for icloud_photo_downloader v1.0.626 started
eddiechowx commented 1 year ago

I've got the same error codes and still not solved...

bt-beardedtechie commented 1 year ago

Wanted to add, I'm running the latest version. I can login to iCloud without pop ups, I'm on a Synology NAS and ADP is not turned on as required. File system is btrfs. Edit 2: container executed using high privilege

bt-beardedtechie commented 1 year ago

I've got the same error codes and still not solved...

Have you been able to do anything to get it to work?

eddiechowx commented 1 year ago

I've got the same error codes and still not solved...

Have you been able to do anything to get it to work?

[- Can you log into icloud.com without receiving pop-up notifications?] is no longer appear when I reseted my appleid password. But I got new errors, eg.

/icloud/2016/10/04/IMG 2893.JPG /iCloud/2016/04/11/IMG 1610.JPG 2023-08-09 14:37:01 INFO Check successful 2023-08-09 14:37:01 INFO New files detected: 8674 2023-08-09 14:37:01 DEBUG Starting download of new files for user: czxtech 2023-08-09 14:37:01 DEBUG Downloading new files using password stored in keyring file... 2023-08-09 14:37:01 DEBUG Switched to icloudpd: 1.14.5 ash: out of range grep: /tmp/icloudpd/icloudpd sync.log: No such file or directory grep: /tmp/icloudpd/icloudpd_sync.log: No such file or directory grep: /tmp/icloudpd/icloudpd sync.log: No such file or directory grep: /tmp/icloudpd/icloudpd sync.log: No such file or directory 2023-08-09 14:37:12 DEBUG Set owner on iCloud directory, if required 2023-08-09 14:37:12 DEBUG Set group on iCloud directory, if required 2023-08-09 14:37.12 DEBUG Set 750 permissions on iCloud directories, if required 2023-08-09 14:37:12 DEBUG Set 640 permissions on icloud files, if required 2023-08-09 14:37:12 INFO Synchronisation complete for czxtech 2023-08-09 14:37.12 DEBUG Web cookie exists. 2023-08-09 14:37:12 INFO Web cookie expires: 2023-10-08 @ 06:31:25 2023-08-09 14-37-12 INFO Two factor authentication cookie expires: 2023-11-07 @ 06:31:37 2023-08-09 14:37:12 TNFO Days remaining until expiration: 89

I've no idea about ash: out of range

boredazfcuk commented 1 year ago

ash: out of range

It means that the script is attempting to compare the value of a variable, but the variable is unexpectedly empty.

grep: /tmp/icloudpd/icloudpd sync.log: No such file or directory grep: /tmp/icloudpd/icloudpd_sync.log: No such file or directory grep: /tmp/icloudpd/icloudpd sync.log: No such file or directory grep: /tmp/icloudpd/icloudpd sync.log: No such file or directory

It's attempting to read from the log files it creates during a check/download, but they are not there. This screams permission issue as the directory that these live in, should have the correct permissions assigned during the container's startup process, which should then allow the process to create the file.

I've pushed a new version which creates the log file at startup, so that it should exist and have the correct permissions before it attempts to write to the file.

I don't know if this will help, but it's worth a shot.

bicepjai commented 1 year ago

I am facing the same issue.

...
user-icloudpd  | 2023-08-23 16:09:38 INFO     Ignore Synology extended attribute directories: Disabled
user-icloudpd  | 2023-08-23 16:09:39 INFO     Directory is writable: /config/python_keyring/
user-icloudpd  | 2023-08-23 16:09:39 INFO     Directory is writable: /home/user/.local/share/
user-icloudpd  | 2023-08-23 16:09:39 INFO     Check download directory mounted correctly...
user-icloudpd  | 2023-08-23 16:09:39 INFO     Failsafe file /icloud/.mounted exists, continuing
user-icloudpd  | 2023-08-23 16:09:39 INFO     Directory is writable: /config/python_keyring/
user-icloudpd  | 2023-08-23 16:09:39 INFO     Directory is writable: /home/user/.local/share/
user-icloudpd  | 2023-08-23 16:09:39 INFO     Keyring file exists, continuing
...

I get at the end

ash: out of range

Can some one tell me whats the last working docker image ?

tarrou commented 1 year ago

So I'm getting this same problem. Any ideas? Anyone figure this out?

2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 INFO     Next synchronisation at 13:45:24
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 INFO     Total time taken: 00:00:01
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 INFO     Synchronisation ended at 01:45:25
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 INFO     Days remaining until expiration: 90
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 INFO     Two factor authentication cookie expires: 2023-12-15 @ 04:30:13
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 INFO     Web cookie expires: 2023-11-15 @ 04:29:49
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 ERROR    ***** Please report problems here: https://github.com/boredazfcuk/docker-icloudpd/issues *****
2023/09/16 00:45:25,stdout,Error: Invalid value for '-d' / '--directory': Path '/icloud' is not readable.
2023/09/16 00:45:25,stdout,
2023/09/16 00:45:25,stdout,Try 'icloudpd -h' for help.
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 ERROR    Usage: icloudpd <options>
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 ERROR    Error debugging info:
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
2023/09/16 00:45:25,stdout,2023-09-16 01:45:25 ERROR    Failed to download new files
2023/09/16 00:45:24,stdout,2023-09-16 01:45:24 INFO     Failsafe file /icloud/.mounted exists, continuing
2023/09/16 00:45:24,stdout,2023-09-16 01:45:24 INFO     Check download directory mounted correctly...
2023/09/16 00:45:24,stdout,2023-09-16 01:45:24 INFO     Keyring file exists, continuing
2023/09/16 00:45:24,stdout,2023-09-16 01:45:24 INFO     Synchronisation starting at 01:45:24
boredazfcuk commented 11 months ago

What does the line in the log file which starts iCloudPD launch command: say?

lwlha commented 11 months ago
image image

这个1026不是我设置的用户

askalee2000 commented 11 months ago

I'm getting this same problem.

2023-10-11T09:26:12.218742715Z 2023-10-11 17:26:12 INFO Check for new files using password stored in keyring file 2023-10-11T09:26:12.220116534Z 2023-10-11 17:26:12 INFO Generating list of files in iCloud. This may take a long time if you have a large photo collection. Please be patient. Nothing is being downloaded at this time 2023-10-11T09:26:13.039186244Z 2023-10-11 17:26:13 ERROR Failed check for new files files 2023-10-11T09:26:13.040148812Z 2023-10-11 17:26:13 ERROR - Can you log into icloud.com.cn without receiving pop-up notifications? 2023-10-11T09:26:13.041810555Z 2023-10-11 17:26:13 ERROR Error debugging info: 2023-10-11T09:26:13.043811889Z 2023-10-11 17:26:13 ERROR Usage: icloudpd 2023-10-11T09:26:13.043828450Z Try 'icloudpd -h' for help. 2023-10-11T09:26:13.043835986Z 2023-10-11T09:26:13.043842968Z Error: Invalid value for '-d' / '--directory': Path '/iCloud' is not readable. 2023-10-11T09:26:13.045552647Z 2023-10-11 17:26:13 ERROR Please report problems here: https://github.com/boredazfcuk/docker-icloudpd/issues 2023-10-11T09:26:13.048550414Z ash: out of range 2023-10-11T09:26:13.058535314Z 2023-10-11 17:26:13 INFO Web cookie expires: 2023-12-10 @ 09:08:42 2023-10-11T09:26:13.059947518Z 2023-10-11 17:26:13 INFO Multifactor authentication cookie expires: 2024-01-09 @ 09:08:40 2023-10-11T09:26:13.061263193Z 2023-10-11 17:26:13 INFO Days remaining until expiration: 89 2023-10-11T09:26:13.065246856Z 2023-10-11 17:26:13 INFO Synchronisation ended at 17:26:13 2023-10-11T09:26:13.068037069Z 2023-10-11 17:26:13 INFO Total time taken: 00:00:01 2023-10-11T09:26:13.070655924Z 2023-10-11 17:26:13 INFO Next synchronisation at 17:26:12

rambolee commented 10 months ago

use /bin/sh chmod 777 /iCloud to reset the path private with 777 in the docker can fix this.

boredazfcuk commented 8 months ago

This can be cause by mounting the folder on the host to an alternate location such as a CIFS or NFS share. Closing as cannot reproduce.

arthurfsy2 commented 5 months ago

use /bin/sh chmod 777 /iCloud to reset the path private with 777 in the docker can fix this.

thanks!!!It worked!