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

Opening secretstorage not detected if closed during startup #616

Closed
samuel-w opened this issue Sep 4, 2020 · 0 comments · Fixed by #635
Closed

Opening secretstorage not detected if closed during startup #616

samuel-w opened this issue Sep 4, 2020 · 0 comments · Fixed by #635
Labels
os:linux Affects only Linux type:enhancement Improvement of an existing function

Comments

@samuel-w
Copy link
Contributor

samuel-w commented Sep 4, 2020

Describe the bug
Opening secretstorage after startup does not result in Vorta switching to it, instead prefering VortaDBKeyring.

To Reproduce
Steps to reproduce the behavior:

  1. Start Vorta with secretstorage fully closed
  2. Open the secretstorage program
  3. Do something that uses the keyring

Result
It uses VortaDBKeyring, and never VortaSecretStorageKeyring

Recommended Solution
This is caused by the keyring getting set once at runtime keyring = VortaKeyring.get_keyring(), resulting in it never detecting a new keyring.
Remove 'keyring' from utils, and just call VortaKeyring.get_keyring() every time you want to get or set a password.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Vorta: Latest master

Additional context

2020-09-04 15:39:23,498 - vorta.i18n - DEBUG - Loading translation failed for ['en', 'en-US', 'en-Latn-US'].
2020-09-04 15:39:23,507 - apscheduler.scheduler - INFO - Scheduler started
2020-09-04 15:39:23,891 - vorta.borg.borg_thread - INFO - Running command /home/user/.local/bin/borg --version
2020-09-04 15:39:33,040 - vorta.borg.borg_thread - DEBUG - Using VortaDBKeyring keyring to store passwords.
2020-09-04 15:39:33,051 - vorta.borg.borg_thread - INFO - Running command /home/user/.local/bin/borg info --info --json --log-json /mnt/data/borg-repokey
2020-09-04 15:39:33,618 - vorta.borg.borg_thread - DEBUG - Using VortaDBKeyring keyring to store passwords.
2020-09-04 15:39:33,628 - vorta.borg.borg_thread - INFO - Running command /home/user/.local/bin/borg list --info --log-json --json /mnt/data/borg-repokey
2020-09-04 15:40:04,325 - vorta.borg.borg_thread - DEBUG - Using VortaDBKeyring keyring to store passwords.
2020-09-04 15:40:04,335 - vorta.borg.borg_thread - INFO - Running command /home/user/.local/bin/borg info --info --json --log-json /tmp/asdf2
2020-09-04 15:40:04,641 - vorta.borg.borg_thread - ERROR - /tmp/asdf2 is not a valid repository. Check repo config.
2020-09-04 15:40:06,554 - vorta.borg.borg_thread - DEBUG - Using VortaDBKeyring keyring to store passwords.
2020-09-04 15:40:06,563 - vorta.borg.borg_thread - INFO - Running command /home/user/.local/bin/borg info --info --json --log-json /tmp/asdf2
2020-09-04 15:40:06,848 - vorta.borg.borg_thread - ERROR - /tmp/asdf2 is not a valid repository. Check repo config.
2020-09-04 15:40:07,693 - vorta.borg.borg_thread - DEBUG - Using VortaDBKeyring keyring to store passwords.
2020-09-04 15:40:07,703 - vorta.borg.borg_thread - INFO - Running command /home/user/.local/bin/borg info --info --json --log-json /tmp/asdf2
2020-09-04 15:40:08,001 - vorta.borg.borg_thread - ERROR - /tmp/asdf2 is not a valid repository. Check repo config.

Here I open secretstorage

2020-09-04 15:40:20,177 - vorta.borg.borg_thread - DEBUG - Using VortaDBKeyring keyring to store passwords.
2020-09-04 15:40:20,186 - vorta.borg.borg_thread - INFO - Running command /home/user/.local/bin/borg init --info --log-json --encryption=repokey-blake2 /tmp/asdf2
2020-09-04 15:40:20,474 - vorta.borg.borg_thread - INFO - Initializing repository at "/tmp/asdf2"
2020-09-04 15:40:20,513 - vorta.borg.borg_thread - INFO - Key in "<Repository /tmp/asdf2>" created.
2020-09-04 15:40:20,513 - vorta.borg.borg_thread - INFO - Keep this key safe. Your data will be inaccessible without it.
2020-09-04 15:40:20,546 - vorta.borg.borg_thread - INFO - Synchronizing chunks cache...
2020-09-04 15:40:20,546 - vorta.borg.borg_thread - INFO - Archives: 0, w/ cached Idx: 0, w/ outdated Idx: 0, w/o cached Idx: 0.
2020-09-04 15:40:20,547 - vorta.borg.borg_thread - INFO - Done.
2020-09-04 15:40:20,571 - vorta.borg.borg_thread - WARNING -

@samuel-w samuel-w added the os:linux Affects only Linux label Sep 4, 2020
@samuel-w samuel-w changed the title Opening secretstorage not detected Opening secretstorage not detected if closed during startup Sep 7, 2020
@m3nu m3nu added the type:enhancement Improvement of an existing function label Sep 13, 2020
@m3nu m3nu closed this as completed in #635 Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:linux Affects only Linux type:enhancement Improvement of an existing function
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants