I seem to be having some problems since I didn't save the password in the 'keyring' when I first logged in successfully.
My first login had some problems (due to a misconfiguration in my config.yaml file, i believe). The error I got after providing my password was such (NOTE: not my real username):
==============================================================
COMMAND:
=========
# docker exec -it --user=abc $(docker ps --filter "ancestor=mandarons/icloud-drive" -q) /bin/sh -c "icloud
[email protected] --session-directory=/config/session_data"
OUTPUT:
========
Enter iCloud password for
[email protected]:
Save password in keyring? [y/N]: N
Traceback (most recent call last):
File "/lsiopy/bin/icloud", line 8, in <module>
sys.exit(main())
^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/cmdline.py", line 295, in main
for dev in api.devices:
^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 556, in devices
return FindMyiPhoneServiceManager(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/services/findmyiphone.py", line 28, in __init__
self.refresh_client()
File "/lsiopy/lib/python3.11/site-packages/icloudpy/services/findmyiphone.py", line 36, in refresh_client
req = self.session.post(
^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 129, in request
return self.request(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 131, in request
self._raise_error(response.status_code, response.reason)
File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 187, in _raise_error
raise api_error
icloudpy.exceptions.ICloudPyAPIResponseException: Authentication required for Account. (450)
======================================================================
After I fixed the config.yaml file, I tried re-running the above and then I got:
Enter iCloud password for
[email protected]:
Bad username or password for
[email protected]
======================================================================
Then, I tried uninstalling the app and deleting/re-creating the /mnt/.../appdata/icloud directory & config.yaml file.
I also tried with and without setting the ENV_ICLOUD_PASSWORD environment variable in the docker settings without success.
After re-installing without the password, I get the following message:
===================================================================
2024-10-21 15:26:00,119 :: ERROR :: root :: sync.py :: 116 :: Password is not stored in keyring. Please save the password in keyring.
2024-10-21 15:26:00,120 :: INFO :: root :: config_parser.py :: 69 :: Retrying login every 600 seconds.
2024-10-21 15:26:00,120 :: INFO :: root :: sync.py :: 126 :: Retrying login at Mon Oct 21 15:36:00 2024 ...
===================================================================
At this point, I thought by uninstalling the application, I would be able to start over, but it seems like something is still referencing my original authentication & 2FA confirmation (which I did originally see the prompt on my iPhone).
Is there some way I can force the 2FA authentication again and/or redo the authentication such that I can store the password in the 'keyring' (although I don't really want to do it...but if storing in the keyring is required, then I guess I have no other choice).
Sorry for the lengthy post.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UPDATED 10/21/24 16:20PM EST
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I restored a previous version of my /config/session_data directory and tried responding with 'y' to save the password in the 'keyring', but I got the following error:
===================================
COMMAND (from inside the container):
===================================
$ icloud
[email protected] --session-directory=/config/session_data
OUTPUT:
========
Enter iCloud password for
[email protected]:
Save password in keyring? [y/N]: y
Traceback (most recent call last):
File "/lsiopy/bin/icloud", line 8, in <module>
sys.exit(main())
^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/cmdline.py", line 295, in main
for dev in api.devices:
^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 556, in devices
return FindMyiPhoneServiceManager(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/services/findmyiphone.py", line 28, in __init__
self.refresh_client()
File "/lsiopy/lib/python3.11/site-packages/icloudpy/services/findmyiphone.py", line 36, in refresh_client
req = self.session.post(
^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 129, in request
return self.request(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 131, in request
self._raise_error(response.status_code, response.reason)
File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 187, in _raise_error
raise api_error
icloudpy.exceptions.ICloudPyAPIResponseException: Authentication required for Account. (450)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UPDATED (again) 10/21/24 16:25 --
Apparently, it is beginning to sync in spite of the above errors. I can see the following messages in the log file:
2024-10-21 16:14:29,566 :: WARNING :: root :: config_parser.py :: 164 :: Warning: password is not found in app > smtp > password
2024-10-21 16:14:29,566 :: WARNING :: root :: notify.py :: 131 :: Not sending 2FA notification because SMTP is not configured
2024-10-21 16:24:30,204 :: INFO :: root :: sync.py :: 82 :: Syncing drive...
2024-10-21 16:24:34,396 :: INFO :: root :: sync_drive.py :: 203 :: Downloading /icloud/drive/Documents/....xlsx ...
2024-10-21 16:24:39,491 :: INFO :: root :: sync_drive.py :: 203 :: Downloading /icloud/drive/Documents/....pdf ...
2024-10-21 16:24:40,723 :: INFO :: root :: sync_drive.py :: 203 :: Downloading /icloud/drive/Documents/...e.pdf ...
etc...
NEVERMIND ... please feel free to ignore this post (or retain it for others).
If this continues to work like this, I think you have earned a coffee or two !! Thank you!