Getting an internal error for fetch-libs
Metadata
Current evaluation
Fixed by merged PR #1741 (commit 5fa2a47c): Charmcraft now falls back to an ephemeral keyring when no system keyring is available.
Resolution: closed resolved
Reason: PR #1741 was merged as commit 5fa2a47c and added an ephemeral-keyring fallback after NoKeyringError, allowing authentication-dependent commands to work in headless SSH and Multipass sessions.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
I'm getting an internal error when running the fetch-libs command:
```bash
charmcraft fetch-libs
charmcraft internal error: NoKeyringError('No keyring found to store or retrieve credentials from.')
```
### To Reproduce
- `charmcraft init --profile flask-framework`
- `charmcraft fetch-libs`
### Environment
Ubuntu 22.04
charmcraft --version: charmcraft 3.0.0.post59+g775a0fc
### charmcraft.yaml
```shell
# This file configures Charmcraft.
# See https://juju.is/docs/sdk/charmcraft-config for guidance.
name: flask-hello-world
type: charm
bases:
- build-on:
- name: ubuntu
channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"
# (Required)
summary: A very short one-line summary of the Flask application.
# (Required)
description: |
A comprehensive overview of your Flask application.
extensions:
- flask-framework
# Uncomment the integrations used by your application
# Integrations set to "optional: false" will block the charm
# until the applications are integrated.
# requires:
# mysql:
# interface: mysql_client
# optional: false
# limit: 1
# postgresql:
# interface: postgresql_client
# optional: false
# limit: 1
# mongodb:
# interface: mongodb_client
# optional: false
# limit: 1
# redis:
# interface: redis
# optional: false
# limit: 1
# s3:
# interface: s3
# optional: false
# limit: 1
# saml:
# interface: saml
# optional: false
# limit: 1
```
### Relevant log output
```shell
2024-07-04 16:41:26.914 Starting charmcraft, version 3.0.0.post59+g775a0fc
2024-07-04 16:41:26.914 Log verbosity level set to BRIEF
2024-07-04 16:41:26.914 Configuring application...
2024-07-04 16:41:26.914 Preparing application...
2024-07-04 16:41:26.914 Build plan: platform=None, build_for=None
2024-07-04 16:41:26.915 Loading project file '/home/ubuntu/flask-hello-world/charm/charmcraft.yaml'
2024-07-04 16:41:26.917 Processing grammar (on amd64 for amd64)
2024-07-04 16:41:26.917 Processing grammar for plugin: charm
2024-07-04 16:41:26.917 Processing grammar for source: .
2024-07-04 16:41:26.918 Running charmcraft fetch-libs on host
2024-07-04 16:41:26.922 Setting up StoreService
2024-07-04 16:41:26.969 charmcraft internal error: NoKeyringError('No keyring found to store or retrieve credentials from.')
2024-07-04 16:41:26.982 Traceback (most recent call last):
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/craft_application/application.py", line 517, in run
2024-07-04 16:41:26.982 return_code = dispatcher.run() or 0
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 487, in run
2024-07-04 16:41:26.982 return self._loaded_command.run(self._parsed_command_args)
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/charmcraft/application/commands/store.py", line 1672, in run
2024-07-04 16:41:26.982 store = self._services.store
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/craft_application/services/service_factory.py", line 95, in __getattr__
2024-07-04 16:41:26.982 instance.setup()
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/charmcraft/services/store.py", line 173, in setup
2024-07-04 16:41:26.982 super().setup()
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/charmcraft/services/store.py", line 80, in setup
2024-07-04 16:41:26.982 self.client = self.ClientClass(
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/charmcraft/store/client.py", line 139, in __init__
2024-07-04 16:41:26.982 super().__init__(
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/craft_store/store_client.py", line 93, in __init__
2024-07-04 16:41:26.982 super().__init__(
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/craft_store/base_client.py", line 77, in __init__
2024-07-04 16:41:26.982 self._auth = Auth(
2024-07-04 16:41:26.982 File "/snap/charmcraft/4025/lib/python3.10/site-packages/craft_store/auth.py", line 201, in __init__
2024-07-04 16:41:26.982 raise errors.NoKeyringError
2024-07-04 16:41:26.982 craft_store.errors.NoKeyringError: No keyring found to store or retrieve credentials from.
2024-07-04 16:41:26.982 Full execution log: '/home/ubuntu/.local/state/charmcraft/log/charmcraft-20240704-164126.909389.log'
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #1741 (commit 5fa2a47c): Charmcraft now falls back to an ephemeral keyring when no system keyring is available. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #1741 (commit 5fa2a47c), which falls back to an ephemeral keyring when no system keyring is available. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #1741 (commit 5fa2a47c), which falls back to an ephemeral keyring when no keyring is available, including in fresh Multipass SSH environments. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without a public fix. The report detailed a NoKeyringError during fetch-libs and login in fresh Multipass environments. After clarifying the SSH session context, the issue was closed and escalated to internal tracking via Jira ticket CRAFT-3134. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and internally tracked via Jira ticket CRAFT-3134. No public fix was provided, as maintainers could not reproduce the NoKeyringError in a fresh Multipass environment. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and deferred to Jira ticket CRAFT-3134 for further investigation. The NoKeyringError during fetch-libs and login in headless environments remains unresolved. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. A Jira ticket (CRAFT-3134) was created to track the NoKeyringError in fresh Multipass environments, deferring the fix to future development. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/charmcraft#1741
(confidence 100%)
Merged fix implementing the ephemeral-keyring fallback for environments without an available keyring.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2034 fix(store): nicer error message when getting nonexistent libs | charmcraft | merged | Merged PR #2034 (commit c9b51038), fixing #1754 by replacing Charmhub's unclear missing-library response with a clearer fetch-libs error. |