-
Notifications
You must be signed in to change notification settings - Fork 573
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
Cannot get to the 2FA stage, program fails with 'Invalid authentication token (...) Authentication required for Account. (421)' #920
Comments
Does anyone have any tips on how to fix this? My entire backup workflow is broken, I'm happy to try anything but I don't know where to start. |
Possible workaround is to delete ~/.pyicloud folder where all authentication cookies are cached. |
Same happend to me. Deleting ~/.pyicloud did not help, running on a different machine fresh did not help. Happy to debug, but how can the logging for |
Have now done some debugging. It turned out that my Apple ID was locked! I needed to unlock it and change my password. My problem went away. |
Did you notice responses that icloud.com was giving for locked account? |
I don't know when my account was locked. I believe that it was locked yesterday or earlier, but I was still able to access icloud.com as I usually used the passkey login. Only while debugging I had the idea to log in to icloud.com with a different browser via the password route and then icloud.com told me that my account is locked and needs to be unlocked. There was no sprecial error message with icloudpd or icloud, only the typical However, as one of my debugging steps I executed |
Another thought: password could have been screwed by shell when using |
FYI: I just had the same issue: |
@jakub-sekula do you still have auth issue? If you do, try latest version (1.25.0) - there were some updates to auth recently that may have affect. |
Overview
I am trying to run the latest version 1.22.0 on macOS Sonoma using an iCloud account with 2FA enabled. I previously used 1.17.3 successfully, last sync was around a month ago and everything worked fine then. Now neither version 1.17.3 nor 1.22.0 work, I am unable to get to the 2FA prompt at all, the script crashes with error
('Invalid authentication token.', PyiCloudAPIResponseException('Authentication required for Account. (421)')
.The 2FA code is never sent and icloudpd doesn't provide a way to enter it, or wait for user input.
Steps to Reproduce
Run the command below, include real username and password.
Expected Behavior
icloudpd waits for 2FA code, I get a 2FA notification and can enter the code to authenticate.
Actual Behavior
Note: I wrapped the command from above into a backup.sh script for conciseness.
Context
The script worked fine last month on version 1.17.3, but now it doesn't work at all with any version.
If I remove the --password from the input and enter it manually when prompted, I also get the same error (421 authentication required)
The text was updated successfully, but these errors were encountered: