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

Can't check photos #641

Closed
edonssfall opened this issue Aug 31, 2024 · 14 comments
Closed

Can't check photos #641

edonssfall opened this issue Aug 31, 2024 · 14 comments

Comments

@edonssfall
Copy link

I use icloudpd with docker, earlier was everything alright.

icloudpd_edonssfall  | 2024-08-31 15:44:20 ERROR    Failed check for new files files
icloudpd_edonssfall  | 2024-08-31 15:44:20 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
icloudpd_edonssfall  | 2024-08-31 15:44:20 ERROR    Error debugging info:
icloudpd_edonssfall  | 2024-08-31 15:44:20 ERROR    Traceback (most recent call last):
icloudpd_edonssfall  |   File "starters/icloudpd.py", line 6, in 
icloudpd_edonssfall  |   File "click/core.py", line 1157, in __call__
icloudpd_edonssfall  |   File "click/core.py", line 1078, in main
icloudpd_edonssfall  |   File "click/core.py", line 1434, in invoke
icloudpd_edonssfall  |   File "click/core.py", line 783, in invoke
icloudpd_edonssfall  |   File "icloudpd/base.py", line 745, in main
icloudpd_edonssfall  |   File "icloudpd/base.py", line 1340, in core
icloudpd_edonssfall  |   File "icloudpd/base.py", line 859, in download_photo_
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 699, in versions
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 614, in filename
icloudpd_edonssfall  |   File "base64.py", line 88, in b64decode
icloudpd_edonssfall  | binascii.Error: Incorrect padding
icloudpd_edonssfall  | [454] Failed to execute script 'icloudpd' due to unhandled exception!
@AndreyNikiforov
Copy link

Based on the stack trace it seems that filename for one of your assets has encoding in metadata that python treats as invalid.

context: filenames are not passed in clear text, but instead encoded with base64.

I need that sample to be able to troubleshoot and fix icloudpd (unless I hit the same issue myself of course). icloudpd does point to the error with stack trace, but unfortunately does not dump data, so you may need to use python skills to get that sample.

@edonssfall
Copy link
Author

It needs a filename (or something similar), but I can't provide one because I don't understand how it is sorted.

@boredazfcuk
Copy link
Owner

If you set debug_logging to true in your /config/icloudpd.conf file, it should list each file as it's processed. This should hopefully give you a clue as to which file is causing the issue. It may be the exact file that causes the issue, or the one before it.

@edonssfall
Copy link
Author

edonssfall commented Aug 31, 2024

Already did, but it shows nothing. I sent log with debug_logging=true.
It can be this file, but i'm not sure.
https://owncloud.edonssfall.com/s/SZU3mUdzzqoULef

@boredazfcuk
Copy link
Owner

Update to latest version and try again. It should give you more info regarding the error.

@AndreyNikiforov
Copy link

@edonssfall v1.23.2 will dump content on which decoding is choking. Should be sufficient to use --dry-run for reproducing your issue. Please try and see what it brings.

@edonssfall
Copy link
Author

edonssfall commented Sep 1, 2024

I use it only with docker, update for todays version.

here is new Log. This file i shared above.

icloudpd_edonssfall  | 2024-09-01 17:27:57 ERROR    Failed check for new files files
icloudpd_edonssfall  | 2024-09-01 17:27:57 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
icloudpd_edonssfall  | 2024-09-01 17:27:57 ERROR    Error debugging info:
icloudpd_edonssfall  | 2024-09-01 17:27:57 ERROR    Traceback (most recent call last):
icloudpd_edonssfall  |   File "foundation/__init__.py", line 46, in _internal
icloudpd_edonssfall  |   File "base64.py", line 88, in b64decode
icloudpd_edonssfall  | binascii.Error: Incorrect padding
icloudpd_edonssfall  | 
icloudpd_edonssfall  | The above exception was the direct cause of the following exception:
icloudpd_edonssfall  | 
icloudpd_edonssfall  | Traceback (most recent call last):
icloudpd_edonssfall  |   File "starters/icloudpd.py", line 6, in 
icloudpd_edonssfall  |   File "click/core.py", line 1157, in __call__
icloudpd_edonssfall  |   File "click/core.py", line 1078, in main
icloudpd_edonssfall  |   File "click/core.py", line 1434, in invoke
icloudpd_edonssfall  |   File "click/core.py", line 783, in invoke
icloudpd_edonssfall  |   File "icloudpd/base.py", line 745, in main
icloudpd_edonssfall  |   File "icloudpd/base.py", line 1340, in core
icloudpd_edonssfall  |   File "icloudpd/base.py", line 859, in download_photo_
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 712, in versions
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 618, in filename
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "foundation/__init__.py", line 48, in _internal
icloudpd_edonssfall  | ValueError: Invalid Input: 'IMG_8629.JPG'
icloudpd_edonssfall  | [454] Failed to execute script 'icloudpd' due to unhandled exception!

@AndreyNikiforov
Copy link

I use it only with docker, update for todays version.

here is new Log. This file i shared above.

icloudpd_edonssfall  | 2024-09-01 17:27:57 ERROR    Failed check for new files files
icloudpd_edonssfall  | 2024-09-01 17:27:57 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
icloudpd_edonssfall  | 2024-09-01 17:27:57 ERROR    Error debugging info:
icloudpd_edonssfall  | 2024-09-01 17:27:57 ERROR    Traceback (most recent call last):
icloudpd_edonssfall  |   File "foundation/__init__.py", line 46, in _internal
icloudpd_edonssfall  |   File "base64.py", line 88, in b64decode
icloudpd_edonssfall  | binascii.Error: Incorrect padding
icloudpd_edonssfall  | 
icloudpd_edonssfall  | The above exception was the direct cause of the following exception:
icloudpd_edonssfall  | 
icloudpd_edonssfall  | Traceback (most recent call last):
icloudpd_edonssfall  |   File "starters/icloudpd.py", line 6, in 
icloudpd_edonssfall  |   File "click/core.py", line 1157, in __call__
icloudpd_edonssfall  |   File "click/core.py", line 1078, in main
icloudpd_edonssfall  |   File "click/core.py", line 1434, in invoke
icloudpd_edonssfall  |   File "click/core.py", line 783, in invoke
icloudpd_edonssfall  |   File "icloudpd/base.py", line 745, in main
icloudpd_edonssfall  |   File "icloudpd/base.py", line 1340, in core
icloudpd_edonssfall  |   File "icloudpd/base.py", line 859, in download_photo_
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 712, in versions
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 618, in filename
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "foundation/__init__.py", line 48, in _internal
icloudpd_edonssfall  | ValueError: Invalid Input: 'IMG_8629.JPG'
icloudpd_edonssfall  | [454] Failed to execute script 'icloudpd' due to unhandled exception!

It looks like response from Apple has 'IMG_8629.JPG' as plain text, while we are expecting base64 encoded. I probably need to add more logging to see if Apple sending any hints about encoding (or the lack of).

@AndreyNikiforov
Copy link

It looks like response from Apple has 'IMG_8629.JPG' as plain text, while we are expecting base64 encoded. I probably need to add more logging to see if Apple sending any hints about encoding (or the lack of)

@edonssfall v1.23.3 has more debug info printed for missing filename encoding. Let's see if we can figure out what is going on.

@boredazfcuk
Copy link
Owner

Container updated to v1.23.3. Please try again and post the log.

@edonssfall
Copy link
Author

icloudpd_edonssfall  | 2024-09-02 08:27:15 ERROR    Failed check for new files files
icloudpd_edonssfall  | 2024-09-02 08:27:15 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
icloudpd_edonssfall  | 2024-09-02 08:27:15 ERROR    Error debugging info:
icloudpd_edonssfall  | 2024-09-02 08:27:15 ERROR    Traceback (most recent call last):
icloudpd_edonssfall  |   File "foundation/__init__.py", line 46, in _internal
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "base64.py", line 88, in b64decode
icloudpd_edonssfall  | binascii.Error: Incorrect padding
icloudpd_edonssfall  | 
icloudpd_edonssfall  | The above exception was the direct cause of the following exception:
icloudpd_edonssfall  | 
icloudpd_edonssfall  | Traceback (most recent call last):
icloudpd_edonssfall  |   File "starters/icloudpd.py", line 6, in 
icloudpd_edonssfall  |   File "click/core.py", line 1157, in __call__
icloudpd_edonssfall  |   File "click/core.py", line 1078, in main
icloudpd_edonssfall  |   File "click/core.py", line 1434, in invoke
icloudpd_edonssfall  |   File "click/core.py", line 783, in invoke
icloudpd_edonssfall  |   File "icloudpd/base.py", line 745, in main
icloudpd_edonssfall  |   File "icloudpd/base.py", line 1340, in core
icloudpd_edonssfall  |   File "icloudpd/base.py", line 859, in download_photo_
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 722, in versions
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 634, in filename
icloudpd_edonssfall  |   File "foundation/__init__.py", line 48, in _internal
icloudpd_edonssfall  | ValueError: Invalid Input (Parsing filenameEnc): {'value': 'IMG_8629.JPG', 'type': 'STRING', 'isEncrypted': True}
icloudpd_edonssfall  | [441] Failed to execute script 'icloudpd' due to unhandled exception!

@AndreyNikiforov
Copy link

icloudpd_edonssfall  | 2024-09-02 08:27:15 ERROR    Failed check for new files files
icloudpd_edonssfall  | 2024-09-02 08:27:15 ERROR     - Can you log into icloud.com without receiving pop-up notifications?
icloudpd_edonssfall  | 2024-09-02 08:27:15 ERROR    Error debugging info:
icloudpd_edonssfall  | 2024-09-02 08:27:15 ERROR    Traceback (most recent call last):
icloudpd_edonssfall  |   File "foundation/__init__.py", line 46, in _internal
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "pyicloud_ipd/utils.py", line 84, in inter_
icloudpd_edonssfall  |   File "base64.py", line 88, in b64decode
icloudpd_edonssfall  | binascii.Error: Incorrect padding
icloudpd_edonssfall  | 
icloudpd_edonssfall  | The above exception was the direct cause of the following exception:
icloudpd_edonssfall  | 
icloudpd_edonssfall  | Traceback (most recent call last):
icloudpd_edonssfall  |   File "starters/icloudpd.py", line 6, in 
icloudpd_edonssfall  |   File "click/core.py", line 1157, in __call__
icloudpd_edonssfall  |   File "click/core.py", line 1078, in main
icloudpd_edonssfall  |   File "click/core.py", line 1434, in invoke
icloudpd_edonssfall  |   File "click/core.py", line 783, in invoke
icloudpd_edonssfall  |   File "icloudpd/base.py", line 745, in main
icloudpd_edonssfall  |   File "icloudpd/base.py", line 1340, in core
icloudpd_edonssfall  |   File "icloudpd/base.py", line 859, in download_photo_
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 722, in versions
icloudpd_edonssfall  |   File "pyicloud_ipd/services/photos.py", line 634, in filename
icloudpd_edonssfall  |   File "foundation/__init__.py", line 48, in _internal
icloudpd_edonssfall  | ValueError: Invalid Input (Parsing filenameEnc): {'value': 'IMG_8629.JPG', 'type': 'STRING', 'isEncrypted': True}
icloudpd_edonssfall  | [441] Failed to execute script 'icloudpd' due to unhandled exception!

Should work with 1.23.4

docker run --rm -it icloudpd/icloudpd:1.23.4 icloudpd -u [email protected] -d . --dry-run

@boredazfcuk
Copy link
Owner

Container updated to v1.23.4.

@edonssfall
Copy link
Author

thx everyone, now working

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

3 participants