mandarons / icloud-drive-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
962 stars 46 forks source link

[BUG] Can't sync my icloud library : Password is not stored in keyring. Please save the password in keyring. #216

Open bajire72 opened 3 weeks ago

bajire72 commented 3 weeks ago

Hello,

I have a problem when i want to sync my library it says keyring not stored while i already synced it...

Steps to reproduce the behavior:

  1. Do icloud --username="username" --session-directory=/app/session_data
  2. i save in the keyring/

image

What can i do ?

mandarons commented 2 weeks ago

Please share your docker-compose file.

Verkhovskyi commented 2 weeks ago

Looks like you are using Unraid. The best option for now is to revert to older version. I am using 1.16.1 for now, some are using 1.17. There are some problems specific to Unraid and they are being investigated

igno2k commented 2 weeks ago

I have the same error running v1.19.0 on Synology NAS.

Here the output with debug loglevel:

icloud  | Using UID as 1026, GID as 1000 and UMASK as 022...
icloud  | Changing ownership of /app ... This operation may take significantly longer depending on number of files in your local copy of icloud.
icloud  | Loading config from /app/config.yaml ...
icloud  | Loading config from /app/config.yaml ...
icloud  | 2024-06-20 16:34:26,575 :: DEBUG :: root :: config_parser.py :: 113 :: Checking root destination ...
icloud  | 2024-06-20 16:34:26,598 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading KWallet
icloud  | 2024-06-20 16:34:26,599 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading SecretService
icloud  | 2024-06-20 16:34:26,659 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading Windows
icloud  | 2024-06-20 16:34:26,660 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading chainer
icloud  | 2024-06-20 16:34:26,661 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading libsecret
icloud  | 2024-06-20 16:34:26,662 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading macOS
icloud  | 2024-06-20 16:34:26,669 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading Gnome
icloud  | 2024-06-20 16:34:26,678 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading Google
icloud  | 2024-06-20 16:34:26,703 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading Windows (alt)
icloud  | 2024-06-20 16:34:26,706 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading file
icloud  | 2024-06-20 16:34:26,707 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading keyczar
icloud  | 2024-06-20 16:34:26,707 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading multi
icloud  | 2024-06-20 16:34:26,708 :: DEBUG :: keyring.backend :: backend.py :: 201 :: Loading pyfs
icloud  | 2024-06-20 16:34:26,711 :: ERROR :: root :: sync.py :: 111 :: Password is not stored in keyring. Please save the password in keyring.
icloud  | 2024-06-20 16:34:26,711 :: INFO :: root :: config_parser.py :: 67 :: Retrying login every 600 seconds.
icloud  | 2024-06-20 16:34:26,711 :: INFO :: root :: sync.py :: 118 :: Retrying login at Thu Jun 20 16:44:26 2024 ...

Reverting back to v1.17.0 or v1.16.1 I am getting this error:

icloud  | Loading config from /app/config.yaml ...
icloud  | Config file not found at /volume1/docker/icloud-drive/icloud/.
icloud  | 2024-06-20 16:35:40,712 :: DEBUG :: root :: config_parser.py :: 111 :: Checking root destination ...
icloud  | 2024-06-20 16:35:40,712 :: WARNING :: root :: config_parser.py :: 115 :: Warning: root destination is missing in app > root. Using default root destination: ./icloud
icloud  | 2024-06-20 16:35:40,722 :: DEBUG :: urllib3.connectionpool :: connectionpool.py :: 1019 :: Starting new HTTPS connection (1): wapar-api.mandarons.com:443
icloud  | 2024-06-20 16:35:41,369 :: DEBUG :: urllib3.connectionpool :: connectionpool.py :: 474 :: https://wapar-api.mandarons.com:443 "POST /api/installation HTTP/1.1" 201 45
icloud  | Traceback (most recent call last):
icloud  |   File "/app/./src/main.py", line 7, in <module>
icloud  | 2024-06-20 16:35:41,372 :: ERROR :: root :: config_parser.py :: 42 :: username is missing in app > credentials > username. Please set the username.
icloud  |     sync.sync()
icloud  |   File "/app/src/sync.py", line 120, in sync
icloud  |     if "drive" not in config and "photos" in config:
icloud  | TypeError: argument of type 'NoneType' is not iterable
icloud exited with code 1

My docker-compose.yml looks like this:

version: "3.4"
services:
  icloud:
    image: mandarons/icloud-drive
    environment:
      - PUID=1026
      - GUID=100
      - TZ=Europe/Berlin
    env_file:
      - .env.icloud
    container_name: icloud
    restart: unless-stopped
    volumes:
      #- /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - ./icloud/config.yaml:/app/config.yaml
      - ./icloud/data:/app/icloud
      - ./session_data:/app/session_data

Authentication with 2FA seems to work fine. There are two files under ./session_data: userdomainnet and userdomainnet.session (with icloud user/mail user@domain.net).

Any ideas?

SandraCHC commented 2 weeks ago

I have the same issue on Mac and Linux environment without Unraid. Other iCloud Container had the same issue but fixed: https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/871#issuecomment-2176792880

Verkhovskyi commented 1 week ago

@igno2k, you should place config.yaml file into corresponding folder before you start container

Reverting back to v1.17.0 or v1.16.1 I am getting this error:

icloud  | Loading config from /app/config.yaml ...
icloud  | Config file not found at /volume1/docker/icloud-drive/icloud/.
igno2k commented 1 week ago

Thanks, with 1.17.0 I am now getting the error icloud | 2024-06-21 08:40:54,428 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing PCS cookies from the request (423)

I am using ADP (Advanced Data Protection) - maybe this is the problem also in newer versions?

SandraCHC commented 1 week ago

I am using ADP (Advanced Data Protection) - maybe this is the problem also in newer versions?

ADP is not supported

Bytechanger commented 1 week ago

I´ve running mandarons/icloud-drive in docker. The programm runs perfect. But for some time I get the same error and nothing is synced. Password and 2FA is running well. session_data is created....

mandarons commented 1 week ago

I have the same issue on Mac and Linux environment without Unraid. Other iCloud Container had the same issue but fixed: icloud-photos-downloader/icloud_photos_downloader#871 (comment)

@SandraCHC: Do you believe bringing in this fix should help resolve the issue? I am not able to reproduce this issue on my end.

SandraCHC commented 1 week ago

No sorry. I'm not a developer. I have try your package and i have the same issue

weichmut commented 6 days ago

Going back to 1.8.0 resolves the issue using "mandarons/icloud-drive:1.18.0" as docker repo. Also look out for the changed path of /app/session_data and /app/config.yaml.

mandarons commented 4 days ago

Try setting the ENV_ICLOUD_PASSWORD variable.