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] Keyring never seen as saved - ERROR :: root :: sync.py :: 116 :: Password is not stored in keyring. Please save the password in keyring. #238

Open TheCase opened 5 days ago

TheCase commented 5 days ago

I know this is a duplicate of the previous report, but am filing separately as that issue is awaiting a response. I am using the new /config directory layout for local config and session_data storage (as seen in the included docker-compose and config file)

Describe the bug The authentication information is not correctly stored in the keyring, according to the app

App was working fine before the recent updates. Love the app. So dearly want it to be working again!

Platform: Synology NAS

To Reproduce

  1. delete all session data in ./config
  2. docker-compose up -d
  3. log in using following command (outside docker container):
  4. docker exec -it icloud /bin/sh -c "icloud --username=actualusername@mac.com --session-directory=/config/session_data"
  5. answer "y" to save keyring prompt
  6. enter TFA
  7. assume that nothing returned means login was successful
  8. either a) wait 10 minutes or b) stop container and restart
  9. see error "Password is not stored in keyring"

Expected behavior keyring save should result in successful login

Configuration docker-compose.yaml

version: "3.4"
services:
  iCloud:
    container_name: icloud
    image: mandarons/icloud-drive:latest
    environment:
      - PUID=1000
      - GUID=1000
      - ENV_CONFIG_FILE_PATH=/config/config.yaml
      - TZ=America/Boise
    volumes:
      - ./config:/config
      - ./icloud:/icloud

I've also set the config to have logs at debug level. I don't see debug level logs. I know the config is somewhat working, as the Discord notifications about TFA requirements are working

./config/config.yaml:

app:
  logger:
    level: "debug"
    filename: "/config/icloud.log"
  credentials:
    username: "actualusername@mac.com"
    retry_login_interval: 600
  root: "/icloud"
  discord:
    webhook_url: https://discord.com/api/webhooks/XXXwebookidXXX
    username: iCloud-Files
  region: global
drive:
  destination: "drive"
  remove_obsolete: false
  sync_interval: 600
photos:
  destination: "photos"
  remove_obsolete: false
  sync_interval: 300
  all_albums: true 
  folder_format: "%Y/%m" 
  filters:
    file_sizes:
      - "original"
TheCase commented 5 days ago

I'll add that subsequent attempts to authenticate do not prompt for password - just exits code 0.

mandarons commented 4 days ago

Try setting the ENV_ICLOUD_PASSWORD variable.