Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local volume path cannot be used #142

Open
M-Gregoire opened this issue Nov 5, 2024 · 0 comments
Open

Local volume path cannot be used #142

M-Gregoire opened this issue Nov 5, 2024 · 0 comments

Comments

@M-Gregoire
Copy link

M-Gregoire commented Nov 5, 2024

Hello 👋 ,

I've encountered a weird bug where using a local volume instead of a docker volume prevents the config.ini from being created.

Works as expected:

docker run -it --restart unless-stopped --name macless-haystack -p 6176:6176 --volume mh_data:/app/endpoint/data --network mh-network christld/macless-haystack

Replacing --volume mh_data:/app/endpoint/data with --volume /tmp/mh-data:/app/endpoint/data leads to :

2024-11-05 15:09:34,756 - INFO - No auth-token found.
2024-11-05 15:09:34,757 - INFO - Trying to register new device.
2024-11-05 15:09:34,757 - INFO - Trying to login
Apple ID: [email protected]
Password: 
2024-11-05 15:09:40,060 - INFO - Authentication request initialization
Traceback (most recent call last):
  File "/app/endpoint/mh_endpoint.py", line 159, in <module>
    apple_cryptography.registerDevice()
  File "/app/endpoint/register/apple_cryptography.py", line 77, in registerDevice
    getAuth(regenerate=True)
  File "/app/endpoint/register/apple_cryptography.py", line 50, in getAuth
    mobileme = icloud_login_mobileme(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/endpoint/register/pypush_gsa_icloud.py", line 40, in icloud_login_mobileme
    g = gsa_authenticate(username, password)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/endpoint/register/pypush_gsa_icloud.py", line 76, in gsa_authenticate
    r = gsa_authenticated_request(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/endpoint/register/pypush_gsa_icloud.py", line 134, in gsa_authenticated_request
    "Request": {"cpd": generate_cpd()},
                       ^^^^^^^^^^^^^^
  File "/app/endpoint/register/pypush_gsa_icloud.py", line 168, in generate_cpd
    cpd.update(generate_anisette_headers())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/endpoint/register/pypush_gsa_icloud.py", line 173, in generate_anisette_headers
    h = json.loads(requests.get(config.getAnisetteServer(), timeout=5).text)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/endpoint/config.py", line 22, in getAnisetteServer
    value = config.get('Settings', 'anisette_url')
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/configparser.py", line 759, in get
    d = self._unify_values(section, vars)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/configparser.py", line 1132, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'Settings'

I've tried changing the permissions of the folder but the result seems to always be the same.

Edit: I ran docker exec -it macless-haystack bash to touch /app/endpoint/data/config.ini and can confirm it works, so probably not a permission issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant