icloud_photos_downloader: [MacOS] Unknown reason authentication error

Overview

I previously used icloudpd without issue. I copied/pasted the command I used last time (don’t know which version) that worked but it doesn’t work this time in 1.16.2. It fails trying to login with 2FA. I tried many times, and manually logged into iCloud to be sure username and password are indeed correct.

Note in the error it says “Failed to send two-factor authentication code” however I received the SMS and also every one of my Apple devices prompted me asking to Allow/Deny too.

Steps to Reproduce

  1. Run “icloudpd --directory /Users/brett/Downloads/iPhoneImport/Brett --username <my username>@icloud.com --password <my password> --recent 1340 --set-exif-datetime --folder-structure {:%Y/%m}”
  2. Results in error:
MBP iPhone Import$ icloudpd --directory /Users/brett/Downloads/iPhoneImport/Brett --username <my username>@icloud.com --password <my password> --recent 1340 --set-exif-datetime --folder-structure {:%Y/%m}
2023-10-03 10:31:22 DEBUG    Authenticating...
2023-10-03 10:31:23 INFO     Two-step/two-factor authentication is required
  0: SMS to ********10
  1: Enter two-factor authentication code
Please choose an option: [0]: Usage: icloudpd <options>
Try 'icloudpd -h' for help.

Error: No such option: -B

2023-10-03 10:31:59 ERROR    Failed to send two-factor authentication code
multiprocessing/resource_tracker.py:104: UserWarning: resource_tracker: process died unexpectedly, relaunching.  Some resources might leak.
MBP iPhone Import$ Usage: icloudpd <options>
Try 'icloudpd -h' for help.

Error: No such option: -B

MBP iPhone Import$ 

Expected Behavior

Expected it would work, or give a better reason for failure. Especially unsure what the “Error: No such option: -B” that pops up means.

Actual Behavior

Didn’t work

Context

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 18 (1 by maintainers)

Commits related to this issue

Most upvoted comments

I have the same issue on my Intel Mac mini, v 1.16.2, no FIDO security key.

Upgrade to 1.17.1. Versions prior to 1.17.0 stoped working recently due to changes in Apple API, See #729

It’s not linked. I have never had FIDO 2FA enabled on my account.

Resource leak was noticed on mac before (#668), although symptoms were different.