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

After first run on Ubuntu fails with "keyring.errors.KeyringLocked: Failed to unlock the collection" #1032

Open
Gorbush opened this issue Dec 28, 2024 · 3 comments
Labels

Comments

@Gorbush
Copy link

Gorbush commented Dec 28, 2024

Overview

$ uname -a
Linux 5.15.0-127-generic #137-Ubuntu SMP Fri Nov 8 15:21:01 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$  icloudpd --version
version:1.25.0, commit sha:96f9451, commit timestamp:Tue Dec  3 12:01:43 2024 EST

Steps to Reproduce

  1. Run the download command as recommeneded with my user name
icloudpd --directory /data/to_import/iCloud-User --username [email protected] --watch-with-interval 3600
  1. First run was correct, it started downloading the photos.
  2. I had to turn the PC off, and next morning I tried to re-start the command to continue downloading, but it fails with exception.

Expected Behavior

Re-authenticates and continue the download of phtos.

Actual Behavior

Fails with exception:

2024-12-28 10:33:50 DEBUG    Authenticating...
Traceback (most recent call last):
  File "starters/icloudpd.py", line 6, in <module>
  File "click/core.py", line 1157, in __call__
  File "click/core.py", line 1078, in main
  File "click/core.py", line 1434, in invoke
  File "click/core.py", line 783, in invoke
  File "icloudpd/base.py", line 753, in main
  File "icloudpd/base.py", line 1196, in core
  File "icloudpd/authentication.py", line 51, in authenticate_
  File "pyicloud_ipd/utils.py", line 37, in get_password_from_keyring
  File "keyring/core.py", line 56, in get_password
  File "keyring/backends/chainer.py", line 49, in get_password
  File "keyring/backends/SecretService.py", line 79, in get_password
  File "keyring/backends/SecretService.py", line 68, in get_preferred_collection
keyring.errors.KeyringLocked: Failed to unlock the collection!
[84394] Failed to execute script 'icloudpd' due to unhandled exception!

Context

@Gorbush Gorbush added the bug label Dec 28, 2024
Gorbush added a commit to Gorbush/icloud_photos_downloader that referenced this issue Dec 28, 2024
…e reason broken or fail - skips it to proceed with next method of authentication
@zhaobenx
Copy link

same on debian 12

Linux NUC 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux

version:1.25.1, commit sha:fc02ed2, commit timestamp:Sun Dec 29 00:10:30 2024 CST

@AndreyNikiforov
Copy link
Collaborator

Setting ENV var can help avoiding the issue. IIUC it switches keyring to dummy provider, so password cannot be stored in keyring with this setting

@AndreyNikiforov
Copy link
Collaborator

You may also find relevant info here

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

No branches or pull requests

3 participants