← Back to issue list

snapcraft fails to launch multipass instance when multipass isn't pre-installed

View original Github issue

Metadata

Project
snapcraft
Number
#5145
Type
issue
State
open
Author
sed-i
Labels
—
Created
Updated
Closed
—

Current evaluation

Snapcraft emits cryptic 'Remote "snapcraft" is unknown or unreachable / exit code 2' when Multipass can't launch the build instance; maintainer traced it to image-server unavailability or non-amd64 hosts, fix tracked in craft-providers#211

Suggested action: keep open

Reason: The report includes full logs, a repo-to-reproduce, and environment, and maintainer @mr-cal explicitly root-caused it: 'This comes up when someone is running on a non-amd64 platform or when the image servers are unavailable... We have an open issue to improve how this error is presented to the user' (craft-providers#211, still open). No Snapcraft commit resolves it — providers.py still only emits the generic ProviderError path and the misleading instance name — so it remains a valid, triaged bug whose remediation lives upstream, and its 567-day age alone is not grounds for closure. Note the reporter's secondary claim that the instance should be named 'snapcraft-<snap_name>' appears to be a red herring, since get_instance_name() in snapcraft/providers.py uses a different schema, adding some uncertainty about the exact scope of the remaining work.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 16 Complexity: 50 Confidence: 78 Actionability: 72

Issue body

### Bug Description I'm on 22.04, trying to build a core20 snap, and snapcraft fails to launch a `snapcraft` instance. Turns out it doesn't exist after snapcraft finished configuring multipass: ``` ~/grafana-agent-snap> snapcraft Support for 'multipass' needs to be set up. Would you like to do it now? [y/N]: y snapd is not logged in, snap install commands will use sudo multipass 1.14.1 from Canonical✓ installed Waiting for multipass... Launching a VM. launch failed: Remote "snapcraft" is unknown or unreachable. If image mirror is enabled, please confirm it is valid. An error occurred with the instance when trying to launch with 'multipass': returned exit code 2. Ensure that 'multipass' is setup correctly and try again. ~/grafana-agent-snap> multipass list No instances found. ``` Moreover, the multipass instance name isn't "snapcraft" but rather "snapcraft-<snap_name>": ``` ~/grafana-agent-snap> snapcraft Launching a VM. Build environment is in unknown state, cleaning first. info failed: The following errors occurred: instance "snapcraft-grafana-agent" does not exist Launched: snapcraft-grafana-agent ``` ### To Reproduce From a host that doens't have multipass pre-installed: ```bash git clone https://github.com/canonical/grafana-agent-snap.git cd grafana-agent-snap ./make-classic.sh snapcraft ``` ### Environment Ubuntu 22.04.5 Snapcraft 8.4.4 (12961) ### snapcraft.yaml ```yaml name: grafana-agent version: '0.40.4' summary: A telemetry collector for sending metrics, logs, and trace data license: Apache-2.0 contact: simon.aronsson@canonical.com issues: https://github.com/canonical/grafana-agent-snap/issues source-code: https://github.com/canonical/grafana-agent-snap website: https://grafana.com description: "Grafana Agent is a telemetry collector for sending metrics, \nlogs, and trace data to the opinionated Grafana observability stack.\n" base: core20 grade: stable confinement: classic compression: lzo apps: grafana-agent: daemon: simple command: agent-wrapper install-mode: disable restart-condition: on-failure architectures: - build-on: amd64 - build-on: arm64 parts: wrapper: plugin: dump source: ./snap/local source-type: local override-build: | cp agent-wrapper.classic $SNAPCRAFT_PART_INSTALL/agent-wrapper grafana-agent: plugin: go source: https://github.com/grafana/agent source-type: git source-tag: "v0.40.4" build-snaps: - go/1.22/stable build-packages: - build-essential - libsystemd-dev stage-packages: - libsystemd0 override-build: | export USE_CONTAINER=0 export GOFLAGS="-mod=readonly -tags=promtail_journal_enabled" make agent agentctl cp build/grafana-agent $SNAPCRAFT_PART_INSTALL/agent cp build/grafana-agentctl $SNAPCRAFT_PART_INSTALL/agentctl ``` ### Relevant log output ```shell (Inlined in bug description) ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 16
Complexity: 50
Confidence: 78
Actionability: 72
keep open Snapcraft emits cryptic 'Remote "snapcraft" is unknown or unreachable / exit code 2' when Multipass can't launch the build instance; maintainer traced it to image-server unavailability or non-amd64 hosts, fix tracked in craft-providers#211
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 22
Complexity: 60
Confidence: 70
Actionability: 80
keep open Snapcraft fails to launch multipass instance when multipass isn't pre-installed, showing 'Remote snapcraft is unknown or unreachable' error. Acknowledged by maintainer as related to image server unavailability or non-amd64 platforms.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 27
Staleness: 70
Complexity: 40
Confidence: 80
Support Request: 20
keep open Snapcraft fails to launch a multipass VM with 'Remote snapcraft is unknown or unreachable' when multipass is installed on-demand. Maintainer triaged it as an image-server availability issue and linked craft-providers#211 for better error messaging; still open.
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 30
Confidence: 85
Support Request: 10
keep open snapcraft fails to launch multipass VM when multipass is installed on-demand. Error indicates unreachable image server or unknown remote. Acknowledged by maintainer, linked to craft-providers issue for better error messaging.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 45
Confidence: 80
Support Request: 20
keep open Snapcraft fails to launch a multipass instance when multipass isn't pre-installed, citing unreachable remote and instance naming mismatches. Maintainer acknowledged the error and linked it to a tracking issue for improved error messaging.

Update history

No update history recorded yet.

Related work

  • Blocked By: canonical/craft-providers#211 (confidence 90%)

    Maintainer-linked open upstream issue 'multipass: better error handling when images are unavailable' that covers the amd64-only image limitation and clearer error/restart guidance; the actual fix must land there.

  • Related To: snapcraft#4106 (confidence 85%)

    Maintainer cited it as 'similar reports'; that issue was closed only because the multipass image server recovered, with no Snapcraft code change — confirming an infrastructure/messaging problem rather than a snapcraft logic bug.

Related issues

Issue Project State Summary Similarity
#1806083 snapcraft fails to locate multipass (inside a multipass session) snapcraft (launchpad) open Snapcraft 3.0.1 falsely reported Multipass missing inside a Multipass guest; Darwin-only detection in e9ae8d29f addressed the old path, but the Launchpad record remains open.
85%
#1975468 Snapcraft build fails, because multipass cannot download cloudimg snapcraft (launchpad) closed Snapcraft core20 builds were disrupted by Multipass cloud-image download failures; Launchpad closed the report without documenting a fix, resolving PR, commit, or follow-up.
80%
#1810915 snapcraft can't tell when multipass is installed but disabled snapcraft (launchpad) open Snapcraft misclassified an installed but disabled Multipass snap as missing, prompting installation before failing. The 2018 report remains untriaged, and its behavior needs validation against the current provider architecture.
79%
#4106 Error 2 on snapcraft on linux with multipass: snapcraft closed Multipass's Snapcraft image remote recovered; CI and the reporter succeeded again, and the reporter closed the report as solved without a Snapcraft code change.
77%
#1869542 snapcraft unable to find snap/snapcraft.yaml file snapcraft (launchpad) open Snapcraft 3.11 on Multipass intermittently lost the project dir in the VM ('Could not find snap/snapcraft.yaml'), only fixable by `snapcraft clean`. Reproducer never supplied; reporter redirected it to the Multipass tracker and never followed up.
77%
#1794955 snapcraft erroneously errors when deleting non-existent multipass container snapcraft (launchpad) open snapcraft clean treats an absent Multipass instance as a deletion error after Multipass was reinstalled; the report is concrete but untriaged and may need validation against the current clean path.
76%
#1813979 snapcraft cleanbuild wants to install multipass but it's already installed snapcraft (launchpad) closed Deb-packaged Snapcraft 2.43.1 failed while Multipass worked in 3.0.1. Legacy cleanbuild was later removed because builds are clean by default.
75%
#211 multipass: better error handling when images are unavailable craft-providers open Multipass launch gives generic errors when Snapcraft images are unreachable or unsupported on arm64; this acknowledged enhancement remains open with a downstream report and internal ticket.
75%
#1794361 use new multipass snapcraft remote snapcraft (launchpad) closed Snapcraft switched Multipass builds to the new snapcraft: remote via merged PR snapcore/snapcraft#2293 (commit 66060e839).
75%
#2293 build providers: use the new snapcraft: remote for multipass snapcraft merged Merged PR #2293 as commit 66060e839, switching Multipass builds to the snapcraft: remote and delegating unsupported-base errors to Multipass.
75%