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
969 stars 46 forks source link

[BUG] 2023-10-19 23:00:24,456 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing PCS cookies from the request (423) #165

Closed dmuiX closed 8 months ago

dmuiX commented 8 months ago

Describe the bug

2023-10-19 23:00:24,456 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing PCS cookies from the request (423) Traceback (most recent call last): File "/app/./src/main.py", line 7, in sync.sync() File "/app/src/sync.py", line 74, in sync sync_drive.sync_drive(config=config, drive=api.drive) File "/app/src/sync_drive.py", line 323, in sync_drive items=drive.dir(), File "/app/venv/lib/python3.10/site-packages/icloudpy/services/drive.py", line 239, in getattr return getattr(self.root, attr) File "/app/venv/lib/python3.10/site-packages/icloudpy/services/drive.py", line 234, in root self, self.get_node_data("FOLDER::com.apple.CloudDocs::root") File "/app/venv/lib/python3.10/site-packages/icloudpy/services/drive.py", line 35, in get_node_data request = self.session.post( File "/app/venv/lib/python3.10/site-packages/requests/sessions.py", line 635, in post return self.request("POST", url, data=data, json=json, **kwargs) File "/app/venv/lib/python3.10/site-packages/icloudpy/base.py", line 158, in request self._raise_error(code, reason) File "/app/venv/lib/python3.10/site-packages/icloudpy/base.py", line 187, in _raise_error raise api_error icloudpy.exceptions.ICloudPyAPIResponseException: Missing PCS cookies from the request (423)

To Reproduce Steps to reproduce the behavior:

  1. docker-compose -f iCloudBackup.yml down
  2. delete session_data
  3. docker-compose -f iCloudBackup.yml up -d
  4. Login via docker exec -it icloud /bin/sh -c 'icloud --username=mail --session-directory=/app/session_data'

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Configuration

app:
  logger:
    level: "debug"
    filename: "icloud.log"
  credentials:
    username: "mail"
    retry_login_interval: 10
  root: "icloud"
  region: global
drive:
  destination: "drive"
  remove_obsolete: false
  sync_interval: 30
  ignore:
    - "node_modules"
    - "*.md"
photos:
  destination: "photos"
  remove_obsolete: false
  sync_interval: 30

Additional context Add any other context about the problem here.

mandarons commented 8 months ago

Looks like you have Advanced Data Protection enabled. ADP isn't supported yet with this app. You'll need to disable it to use the app.

dmuiX commented 8 months ago

Hmm okay. Too bad then I cannot use it, I won’t disable adp. Thanks for your answer. will it be possible to implement adp or does Apple somehow make it impossible? Just created a feature request you can answer there if you want to. And I will close it here as it’s clear what’s going on. okay so far seems inimplementable…pretty bad

jpatriarca commented 8 months ago

Facing the same issue, but my account don't have yet ADP enabled, despite receiving the error. This could help on the investigation of this issue that seems to be related with additional changes?