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

Unable to login, ADP is off and WebUI access works #280

Closed
steeeeev0 opened this issue Jun 28, 2023 · 5 comments
Closed

Unable to login, ADP is off and WebUI access works #280

steeeeev0 opened this issue Jun 28, 2023 · 5 comments
Assignees
Labels
class(documentation) Improvements or additions to documentation status(previewed) This issue or pull request should be fixed in a released beta version

Comments

@steeeeev0
Copy link

Checklist before opening an issue

Describe the bug

Hello! I have just put together a docker instance of the app and can't seem to authenticate. The exact error message isn't covered in any other issues, so I figured I'd post here.

I have Access iCloud Data on the Web turned on (I enabled this earlier today using Settings on my Mac) and have Advanced Data Protection turned off. I am able to log into icloud.com using Chrome: when I type in my email address and password, I get a push notification on my devices that I accept and then see an MFA code.

Using this app, I get the following error and am never prompted to accept a login attempt on any of my devices. My Apple ID user and password entries in the environment variables are correct, they are exactly the same as I input them into Chrome which got me into the WebUI successfully.

Here is my docker-compose.yml file:

version: '2'
services:
  icloud-photos-sync:
    image: 'steilerdev/icloud-photos-sync:latest'
    container_name: icloud-photos-sync
    user: '1000:1000'
    environment:
      APPLE_ID_USER: 'email@domain.com'
      APPLE_ID_PWD: 'password'
      TZ: 'America/Chicago'
      SCHEDULE: '* 16 * * *'
      ENABLE_CRASH_REPORTING: true
    volumes:
      - '/media/internal/streaming/Files/iCloud-Photos:/opt/icloud-photos-library'

Error code

---------------------------------------------------------------------------------------------------------------------------
Welcome to icloud-photos-sync, v.1.1.0!
Made with <3 by steilerDev
---------------------------------------------------------------------------------------------------------------------------
Authenticating user...
---------------------------------------------------------------------------------------------------------------------------
Experienced fatal error at 6/28/2023, 3:11:45 PM: APP_TOKEN (FATAL): Unable to acquire trust token caused by AUTH_FAILED (FATAL): iCloud Authentication failed caused by AUTH_UNAUTHORIZED (FATAL): Username/Password does not seem to match caused by Request failed with status code 401 (Error Code: 0c717c88-4b15-4ccf-bc42-cb6896438d36)
---------------------------------------------------------------------------------------------------------------------------

Logs

Please paste the log file (preferably with LOG_LEVEL=debug), located in .icloud-photos-sync.log, stored in the DATA_DIR.

[2023-06-28T20:11:44.406Z] INFO i-Cloud: Initiating iCloud connection
[2023-06-28T20:11:44.504Z] INFO i-Cloud: Authenticating user
[2023-06-28T20:11:45.614Z] ERROR Error-Handler: APP_TOKEN (FATAL): Unable to acquire trust token caused by AUTH_FAILED (FATAL): iCloud Authentication failed caused by AUTH_UNAUTHORIZED (FATAL): Username/Password does not seem to match caused by Request failed with status code 401 (Error Code: 0c717c88-4b15-4ccf-bc42-cb6896438d36)

Operating environment

  • OS: Ubuntu 22.04
  • Version: v.1.1.0
  • Execution environment: Docker
@steeeeev0 steeeeev0 added the status(open) A new issue - not yet classified label Jun 28, 2023
@steilerDev
Copy link
Owner

Are you 100% certain that the password you entered into Chrome matches the one in the docker-compose.yml?

Could you go into the container docker exec -it icloud-photos-sync /bin/bash and check if the environment variable is available (echo $APPLE_ID_PWD)

Because 401 sounds a lot like there is something wrong with your username and password.

If all of this checks out, try again with the latest beta please (by specifying image: steilerdev/icloud-photos-sync:beta in your docker-compose.yml.

@steilerDev steilerDev added status(investigating) Currently looking for the root cause of the issue and removed status(open) A new issue - not yet classified labels Jul 4, 2023
@steeeeev0
Copy link
Author

steeeeev0 commented Jul 4, 2023

Ah, checking the environment variable was helpful. The second character in my password is $ and for some reason the environment variable is getting only the one character before it, not that character, and nothing behind it.

So, yes, there is an issue with auth and my password, but after some brief searching, I can't seem to figure out how to get my password (with $) to accurately pass as an environment variable.

Additionally, I have tried: icloud-photos-sync token -u email@domain.com -p pas$$word and get the same 401 error.

Does this mean I need to change my password to not include $?

@steilerDev
Copy link
Owner

steilerDev commented Jul 4, 2023

Give double-dollar-sign a try - so in your example pa$$$$word instead of pa$$word (however this might be a bad example 😃 )

When running from the cli try to wrap the password in single quotes.

@steilerDev steilerDev added the class(documentation) Improvements or additions to documentation label Jul 5, 2023
@steilerDev steilerDev self-assigned this Jul 5, 2023
@steilerDev steilerDev added status(in progress) This item is currently in scope for the next release and removed status(investigating) Currently looking for the root cause of the issue labels Jul 5, 2023
steilerDev added a commit that referenced this issue Jul 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This issue should be resolved with version v1.1.1-beta.2, please confirm.

@github-actions github-actions bot added the status(previewed) This issue or pull request should be fixed in a released beta version label Jul 5, 2023
@steilerDev steilerDev removed the status(in progress) This item is currently in scope for the next release label Jul 5, 2023
@steeeeev0
Copy link
Author

I was able to sign in now using v1.1.1-beta.2 and $$ in the password environment variable. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
class(documentation) Improvements or additions to documentation status(previewed) This issue or pull request should be fixed in a released beta version
Projects
None yet
Development

No branches or pull requests

2 participants