← Back to issue list

snapcraft login doens't work on fresh multipass or lxd

View original Launchpad issue

Metadata

Project
snapcraft
Number
#2031494
Type
issue
State
open
Author
~gbeuzeboc
Labels
Created
2023-08-16 08:01:26.582940+00:00
Updated
2023-08-16 08:01:26.582940+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Creating a fresh Ubuntu VM or container with multipass or LXD doesn't seem to let me login with snapcraft. After installing snapcraft, calling snapcraft login fails with: craft-store error: No keyring found to store or retrieve credentials from. Recommended resolution: Ensure the keyring is working or SNAPCRAFT_STORE_CREDENTIALS is correctly exported into the environment For more information, check out: https://snapcraft.io/docs/snapcraft-authentication So I followed the instructions on https://snapcraft.io/docs/snapcraft-authentication#heading--keyring I install gnome-keyring. Then run ubuntu@ubuntu:~$ dbus-run-session -- sh $ gnome-keyring-daemon --unlock The last command gives no output at all, instead of prompting for a passphrase. It doesn't even return. If I press ctrl+D, I drop back into my dbus-run-session -- sh shell. If I try again the call snapcraft login it gives me: ubuntu@ubuntu:~$ snapcraft login Enter your Ubuntu One e-mail address and password. If you do not have an Ubuntu One account, you can create one at https://snapcraft.io/account Email: MYEMAIL Password: Traceback (most recent call last): File "/snap/snapcraft/8674/lib/python3.8/site-packages/secretstorage/util.py", line 48, in send_and_get_reply raise DBusErrorResponse(resp_msg) jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ('No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/secrets/collection/login',) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/snap/snapcraft/8674/lib/python3.8/site-packages/secretstorage/collection.py", line 177, in get_default_collection return Collection(connection) File "/snap/snapcraft/8674/lib/python3.8/site-packages/secretstorage/collection.py", line 45, in __init__ self._collection.get_property('Label') File "/snap/snapcraft/8674/lib/python3.8/site-packages/secretstorage/util.py", line 67, in get_property (signature, value), = self.send_and_get_reply(msg) File "/snap/snapcraft/8674/lib/python3.8/site-packages/secretstorage/util.py", line 52, in send_and_get_reply raise ItemNotFoundException('Item does not exist!') from resp secretstorage.exceptions.ItemNotFoundException: Item does not exist! During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/snap/snapcraft/8674/lib/python3.8/site-packages/keyring/backends/SecretService.py", line 61, in get_preferred_collection collection = secretstorage.get_default_collection(bus) File "/snap/snapcraft/8674/lib/python3.8/site-packages/secretstorage/collection.py", line 179, in get_default_collection return create_collection(connection, 'Default', 'default', session) File "/snap/snapcraft/8674/lib/python3.8/site-packages/secretstorage/collection.py", line 159, in create_collection raise PromptDismissedException('Prompt dismissed.') secretstorage.exceptions.PromptDismissedException: Prompt dismissed. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/snap/snapcraft/8674/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/snap/snapcraft/8674/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in run _run_dispatcher(dispatcher) File "/snap/snapcraft/8674/lib/python3.8/site-packages/snapcraft/cli.py", line 204, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/8674/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run return self._loaded_command.run(self._parsed_command_args) File "/snap/snapcraft/8674/lib/python3.8/site-packages/snapcraft/commands/account.py", line 113, in run store.StoreClientCLI().login() File "/snap/snapcraft/8674/lib/python3.8/site-packages/snapcraft/store/client.py", line 216, in login credentials = self.store_client.login( File "/snap/snapcraft/8674/lib/python3.8/site-packages/craft_store/base_client.py", line 130, in login self._auth.ensure_no_credentials() File "/snap/snapcraft/8674/lib/python3.8/site-packages/craft_store/auth.py", line 131, in ensure_no_credentials if self._keyring.get_password(self.application_name, self.host) is not None: File "/snap/snapcraft/8674/lib/python3.8/site-packages/keyring/backends/SecretService.py", line 78, in get_password collection = self.get_preferred_collection() File "/snap/snapcraft/8674/lib/python3.8/site-packages/keyring/backends/SecretService.py", line 63, in get_preferred_collection raise InitError("Failed to create the collection: %s." % e) keyring.errors.InitError: Failed to create the collection: Prompt dismissed.. snapcraft 7.5.2 snap 2.59.5 snapd 2.59.5 series 16 ubuntu 22.04 kernel 5.15.0-79-generic

Evaluation history

No evaluation history available.