canonical / craft-providers

Python interfaces for instantiating and executing builds for a variety of target environments.
https://canonical-craft-providers.readthedocs-hosted.com/en/latest/
GNU Lesser General Public License v3.0
6 stars 22 forks source link

multipass: better error handling when images are unavailable #211

Open mr-cal opened 1 year ago

mr-cal commented 1 year ago

Overview

Sometimes the snapcraft images for multipass aren't available and produce an error when launching a multipass instance.

Details

The multipass error is launch failed: Remote "snapcraft" is unknown or unreachable.

snap restart multipass may fix the error.

You can also reproduce it with:

  1. disconnecting network
  2. snap restart multipass
  3. multipass launch snapcraft:core22

Solution

Possible solutions:

Either way, we should also recommend the user to restart multipass. This can be done directly in the error message or point to documentation.

Sources

mr-cal commented 1 year ago

A similar problem was reported in launchpad: https://bugs.launchpad.net/snapcraft/+bug/2012074

This problem will occur for anyone using craft-providers on Apple silicon or arm64 hardware (raspberry pi et al.).

In this case, the problem is that the snapcraft:core[18|20|22] images are only available for amd64, whereas the developer was using arm64. So the error message or documentation should mention this caveat.

Notes: