← Back to issue list

Error 2 on snapcraft on linux with multipass:

View original Github issue

Metadata

Project
snapcraft
Number
#4106
Type
issue
State
closed
Author
talregev
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed not a bug

Reason: Snapcraft generated a valid Multipass launch command; the failure was caused by the temporary unavailability of Multipass's image remote. The maintainer reported that CI recovered, after which the reporter confirmed it worked and self-closed the issue.

Evaluated by: mr-cal-bot

No scores available.

Issue body

**Please log issues on the project's [bug tracker](https://bugs.launchpad.net/snapcraft)** Alternatively, If you are looking for support, try [posting on the forums](https://forum.snapcraft.io) I found my issue here: https://askubuntu.com/questions/1460377/launch-failed-remote-snapcraft-is-unknown-or-unreachable-multipass-returned and similar here: https://forum.snapcraft.io/t/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/30155/3 I get an error while run the snapcraft with multipass: The error is come that snapcraft doesn't give the correct image name. I didn't sure if you meant to `core22` or `22.04` both images are in multipass. I have a workaround, to create the image with snapcraft chosen name and `22.04` image: ``` multipass launch 22.04 --name snapcraft-boinc-on-amd64-for-amd64-33569008 --cpus 2 --mem 2G --disk 64G ``` The error before the workaround: ``` > snapcraft --verbosity verbose pack --build-for amd64 Starting Snapcraft 7.3.1 Logging execution to '/home/tal/.local/state/snapcraft/log/snapcraft-20230419-042442.656224.log' Running on amd64 for amd64 Launching instance... | (4.6s) Traceback (most recent call last): File "/snap/snapcraft/8931/lib/python3.8/site-packages/craft_providers/multipass/multipass.py", line 183, in launch self._run(command) File "/snap/snapcraft/8931/lib/python3.8/site-packages/craft_providers/multipass/multipass.py", line 66, in _run return subprocess.run(command, check=True, capture_output=True, **kwargs) File "/snap/snapcraft/8931/usr/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['multipass', 'launch', 'snapcraft:22.04', '--name', 'snapcraft-boinc-on-amd64-for-amd64-33569008', '--cpus', '2', '--mem', '2G', '--disk', '64G']' returned non-zero exit status 2. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/snap/snapcraft/8931/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/snap/snapcraft/8931/lib/python3.8/site-packages/snapcraft/cli.py", line 243, in run _run_dispatcher(dispatcher) File "/snap/snapcraft/8931/lib/python3.8/site-packages/snapcraft/cli.py", line 219, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/8931/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/8931/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 259, in run super().run(parsed_args) File "/snap/snapcraft/8931/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 132, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/8931/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 215, in run _run_command( File "/snap/snapcraft/8931/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 256, in _run_command _run_in_provider(project, command_name, parsed_args) File "/snap/snapcraft/8931/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 540, in _run_in_provider with provider.launched_environment( File "/snap/snapcraft/8931/usr/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/snap/snapcraft/8931/lib/python3.8/site-packages/craft_providers/multipass/multipass_provider.py", line 105, in launched_environment instance = launch( File "/snap/snapcraft/8931/lib/python3.8/site-packages/craft_providers/multipass/_launch.py", line 76, in launch instance.launch( File "/snap/snapcraft/8931/lib/python3.8/site-packages/craft_providers/multipass/multipass_instance.py", line 309, in launch self._multipass.launch( File "/snap/snapcraft/8931/lib/python3.8/site-packages/craft_providers/multipass/multipass.py", line 185, in launch raise MultipassError( craft_providers.multipass.errors.MultipassError: Failed to launch VM 'snapcraft-boinc-on-amd64-for-amd64-33569008'. * Command that failed: 'multipass launch snapcraft:22.04 --name snapcraft-boinc-on-amd64-for-amd64-33569008 --cpus 2 --mem 2G --disk 64G' * Command exit code: 2 * Command output: b'warning: "--mem" long option will be deprecated in favour of "--memory" in a future release.Please update any scripts, etc.\n\r * Command standard error output: b'launch failed: Remote "snapcraft" is unknown or unreachable.\n' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug 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.
stealth/space-bunny-alpha — closed resolved Multipass's snapcraft remote recovered, restoring Snapcraft builds. CI and the reporter recovered; the reporter closed the issue without a Snapcraft code change.
qwen/qwen3.6-35b-a3b — — Resolved as fixed after a temporary Multipass remote image unavailability cleared. The reporter closed the issue.
qwen/qwen3.6-35b-a3b — — The author closed the issue after the transient Multipass remote error resolved itself, confirming it was a temporary service glitch. A maintainer advised ARM64 users to open a separate report for similar image availability problems.
qwen/qwen3.6-35b-a3b — — Closed after the multipass snapcraft image registry recovered. CI passed, the reporter confirmed functionality returned, and the failure was attributed to a temporary upstream connectivity issue. ARM64 users were directed elsewhere.
qwen3.6-35b-a3b-mtp-q6 — — Closed by author after the transient Multipass remote connectivity error resolved itself. Snapcraft successfully launched the VM once the external service stabilized. The problem was attributed to a temporary Multipass outage rather than a code defect.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#5145 (confidence 90%)

    Later report of the same generic Multipass remote failure, including unsupported arm64 images.

  • Related To: canonical/craft-providers#211 (confidence 88%)

    Open work to improve diagnostics when Multipass images are unavailable or unsupported.

Related issues

Issue Project State Summary Similarity
#5145 snapcraft fails to launch multipass instance when multipass isn't pre-installed snapcraft 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
77%
#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.
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.
76%
#1947914 concurrent snapcraft builds with multipass provider snapcraft (launchpad) open Snapcraft 5/Core 18 Multipass builds reportedly shared 10.30.202.6 and terminated silently; the old report has no maintainer assessment and needs triage against current versions.
74%
#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).
74%
#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.
73%
#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.
73%
#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.
72%
#1807125 After snapcraft refresh, old multipass containers no longer work snapcraft (launchpad) open Snapcraft 3.0.1 could reuse incompatible Multipass VMs after a 3.0.0 refresh, causing a misleading missing-project error until snapcraft clean; the report is untriaged.
72%
#1996511 snapcraft try with multipass provider crashes snapcraft (launchpad) closed Snapcraft try with Multipass and core22 was fixed by snapcore/snapcraft#3981 (commit 2691262b8) and shipped in Snapcraft 7.3.
72%