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] With new version the path to config.yaml is wrong #226

Closed nicx closed 1 week ago

nicx commented 1 week ago

Just updated to the last version, but due to the changes of the paths "/config" instead of "/app" ist no more working. I get the error

====================================================
To support this project, please consider sponsoring.
https://github.com/sponsors/mandarons
https://www.buymeacoffee.com/mandarons

User UID:    911
User GID:    911
====================================================

Loading config from /app/config.yaml ...
Loading config from /app/config.yaml ...
2024-06-25 08:16:28,370 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing apple_id field
Loading config from /app/config.yaml ...
Loading config from /app/config.yaml ...
2024-06-25 08:16:37,033 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing apple_id field

** Press ANY KEY to close this window ** 

Using Docker on Unraid. When logging in to the console I can see there is still a default config.yaml located in /app which is used. I changed my docker config regarding the documentation from /app/config.yaml to /config/config.yaml. Seems that the app itself needs some additional parameters that the new location is working?!

mandarons commented 1 week ago

Did you set the environment variable to correct config path ENV_CONFIG_PATH=/config/config.yaml?

nicx commented 1 week ago

@mandarons no, because this was not in the documentation. found it now ;)

anyway: just tried it with no effect. the error is still the same.

nicx commented 1 week ago

@mandarons here is the log output, changed a little bit:


====================================================
To support this project, please consider sponsoring.
https://github.com/sponsors/mandarons
https://www.buymeacoffee.com/mandarons

User UID:    911
User GID:    911
====================================================

Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 362, in _authenticate_with_token
    req = self.session.post(
          ^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
2024-06-27 07:21:54,195 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing apple_id field
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 158, in request
    self._raise_error(code, reason)
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 187, in _raise_error
    raise api_error
icloudpy.exceptions.ICloudPyAPIResponseException: Missing apple_id field

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/./src/main.py", line 7, in <module>
    sync.sync()
  File "/app/src/sync.py", line 77, in sync
    api = get_api_instance(
          ^^^^^^^^^^^^^^^^^
  File "/app/src/sync.py", line 42, in get_api_instance
    else ICloudPyService(
         ^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 277, in __init__
    self.authenticate()
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 346, in authenticate
    self._authenticate_with_token()
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 368, in _authenticate_with_token
    raise ICloudPyFailedLoginException(msg, error) from error
icloudpy.exceptions.ICloudPyFailedLoginException: ('Invalid authentication token.', ICloudPyAPIResponseException('Missing apple_id field'))
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 362, in _authenticate_with_token
    req = self.session.post(
          ^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
2024-06-27 07:21:57,891 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing apple_id field
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 158, in request
    self._raise_error(code, reason)
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 187, in _raise_error
    raise api_error
icloudpy.exceptions.ICloudPyAPIResponseException: Missing apple_id field

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/./src/main.py", line 7, in <module>
    sync.sync()
  File "/app/src/sync.py", line 77, in sync
    api = get_api_instance(
          ^^^^^^^^^^^^^^^^^
  File "/app/src/sync.py", line 42, in get_api_instance
    else ICloudPyService(
         ^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 277, in __init__
    self.authenticate()
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 346, in authenticate
    self._authenticate_with_token()
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 368, in _authenticate_with_token
    raise ICloudPyFailedLoginException(msg, error) from error
icloudpy.exceptions.ICloudPyFailedLoginException: ('Invalid authentication token.', ICloudPyAPIResponseException('Missing apple_id field'))
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 362, in _authenticate_with_token
    req = self.session.post(
          ^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
2024-06-27 07:22:01,197 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing apple_id field
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 158, in request
    self._raise_error(code, reason)
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 187, in _raise_error
    raise api_error
icloudpy.exceptions.ICloudPyAPIResponseException: Missing apple_id field

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/./src/main.py", line 7, in <module>
    sync.sync()
  File "/app/src/sync.py", line 77, in sync
    api = get_api_instance(
          ^^^^^^^^^^^^^^^^^
  File "/app/src/sync.py", line 42, in get_api_instance
    else ICloudPyService(
         ^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 277, in __init__
    self.authenticate()
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 346, in authenticate
    self._authenticate_with_token()
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 368, in _authenticate_with_token
    raise ICloudPyFailedLoginException(msg, error) from error
icloudpy.exceptions.ICloudPyFailedLoginException: ('Invalid authentication token.', ICloudPyAPIResponseException('Missing apple_id field'))
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 362, in _authenticate_with_token
    req = self.session.post(
          ^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
2024-06-27 07:22:04,815 :: ERROR :: icloudpy.base :: base.py :: 186 :: Missing apple_id field
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 158, in request
    self._raise_error(code, reason)
  File "/lsiopy/lib/python3.11/site-packages/icloudpy/base.py", line 187, in _raise_error
    raise api_error
icloudpy.exceptions.ICloudPyAPIResponseException: Missing apple_id field
mandarons commented 1 week ago

That's weird. Can you please post your config.yaml and Unraid app values? It is working fine in my Unraid.

nicx commented 1 week ago

@mandarons just found the problem: its not "ENV_CONFIG_PATH" but "ENV_CONFIG_FILE_PATH". There is a bug in the documentation.

It's correct in the documentation section "Installation using Docker Hub", but it's wrong in the section "Installation using docker-compose". :)

mandarons commented 1 week ago

Ugh... sorry about that. I will fix it soon. Thanks for pointing it out.

nicx commented 1 week ago

@mandarons your welcome. keep up your great work, I love iCloud-drive-docker! 👍