`Failed to install Charmcraft` when running `charmcraft pack`

[This was asked by a spectator at Operator Day]

I am having troubles building with charmcraft, any ideas ? (can provide the whole log file of course)

$ charmcraft pack
Failed to install Charmcraft snap from store channel 'stable' into target environment.
Full execution log: '/Users/xxx/Library/Logs/charmcraft/charmcraft-20220516-162725.487873.log

This is a weird error as it acknowledges the presence of the charmcraft snap by not returning the below

pedroleaoc@howler:~$ charmcraft pack

Command 'charmcraft' not found, but can be installed with:

sudo snap install charmcraft

and at the same time complains there was a failure in the installation of the snap.

Can you run charmcraft help?

If not, can you try purging this snap and reinstalling it with

sudo snap remove --purge charmcraft
sudo snap install charmcraft
Here are the logs:
$ cat /Users/xxx/Library/Logs/charmcraft/charmcraft-20220516-164043.365444.log|

2022-05-16 16:40:43.367 Starting charmcraft version 1.6.0
2022-05-16 16:40:43.367 Raw pre-parsed sysargs: args={'help': False, 'verbose': False, 'quiet': False, 'trace': False, 'project_dir': None} filtered=['pack']
2022-05-16 16:40:43.367 General parsed sysargs: command='pack' args=[]
2022-05-16 16:40:43.372 Command parsed sysargs: Namespace(debug=False, destructive_mode=False, entrypoint=None, requirement=None, shell=False, shell_after=False, bases_index=None, force=False)
2022-05-16 16:40:43.372 System details: OSPlatform(system='Darwin', release='21.4.0', machine='x86_64'); Environment: None
2022-05-16 16:40:43.372 Packing the charm.
2022-05-16 16:40:43.372 Working arguments: {'from': PosixPath('/Users/xxx/xxx/kubecon/zinc-k8s-operator'), 'destructive_mode': False, 'entrypoint': None, 'requirement': [], 'bases_indices': None, 'force': False, 'debug': False, 'shell': False, 'shell_after': False}
2022-05-16 16:40:43.372 Parsing '/Users/xxx/xxx/kubecon/zinc-k8s-operator/metadata.yaml'
2022-05-16 16:40:43.378 Executing on host: multipass version
2022-05-16 16:40:43.577 Building for 'bases[0]' as host matches 'build-on[0]'.
2022-05-16 16:40:43.577 Building for 'bases[0][0]'.
2022-05-16 16:40:43.578 Launching environment to pack for base name='ubuntu' channel='20.04' architectures=['amd64'] (may take a while the first time but it's reusable)
2022-05-16 16:40:43.578 Executing on host: multipass list --format json
2022-05-16 16:40:44.771 Executing on host: multipass start charmcraft-zinc-k8s-137326343-0-0-amd64
2022-05-16 16:40:44.879 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- cat /etc/os-release
2022-05-16 16:40:45.065 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- test -f /etc/craft-instance.conf
2022-05-16 16:40:45.218 Waiting for environment to be ready...
2022-05-16 16:40:45.219 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl is-system-running
2022-05-16 16:40:45.373 Waiting for networking to be ready...
2022-05-16 16:40:45.373 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- getent hosts snapcraft.io
2022-05-16 16:40:45.581 Failed to install Charmcraft snap from store channel 'stable' into target environment.
2022-05-16 16:40:45.594 Traceback (most recent call last):
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
2022-05-16 16:40:45.594     httplib_response = self._make_request(
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
2022-05-16 16:40:45.594     conn.request(method, url, **httplib_request_kw)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1285, in request
2022-05-16 16:40:45.594     self._send_request(method, url, body, headers, encode_chunked)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1331, in _send_request
2022-05-16 16:40:45.594     self.endheaders(body, encode_chunked=encode_chunked)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1280, in endheaders
2022-05-16 16:40:45.594     self._send_output(message_body, encode_chunked=encode_chunked)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1040, in _send_output
2022-05-16 16:40:45.594     self.send(msg)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 980, in send
2022-05-16 16:40:45.594     self.connect()
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests_unixsocket/adapters.py", line 41, in connect
2022-05-16 16:40:45.594     sock.connect(socket_path)
2022-05-16 16:40:45.594 FileNotFoundError: [Errno 2] No such file or directory
2022-05-16 16:40:45.594 
2022-05-16 16:40:45.594 During handling of the above exception, another exception occurred:
2022-05-16 16:40:45.594 Traceback (most recent call last):
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
2022-05-16 16:40:45.594     resp = conn.urlopen(
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
2022-05-16 16:40:45.594     retries = retries.increment(
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/util/retry.py", line 550, in increment
2022-05-16 16:40:45.594     raise six.reraise(type(error), error, _stacktrace)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
2022-05-16 16:40:45.594     raise value.with_traceback(tb)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
2022-05-16 16:40:45.594     httplib_response = self._make_request(
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
2022-05-16 16:40:45.594     conn.request(method, url, **httplib_request_kw)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1285, in request
2022-05-16 16:40:45.594     self._send_request(method, url, body, headers, encode_chunked)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1331, in _send_request
2022-05-16 16:40:45.594     self.endheaders(body, encode_chunked=encode_chunked)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1280, in endheaders
2022-05-16 16:40:45.594     self._send_output(message_body, encode_chunked=encode_chunked)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1040, in _send_output
2022-05-16 16:40:45.594     self.send(msg)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 980, in send
2022-05-16 16:40:45.594     self.connect()
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests_unixsocket/adapters.py", line 41, in connect
2022-05-16 16:40:45.594     sock.connect(socket_path)
2022-05-16 16:40:45.594 urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
2022-05-16 16:40:45.594 
2022-05-16 16:40:45.594 During handling of the above exception, another exception occurred:
2022-05-16 16:40:45.594 Traceback (most recent call last):
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/craft_providers/actions/snap_installer.py", line 114, in _get_store_snap_revision
2022-05-16 16:40:45.594     snap_info = requests_unixsocket.get(url)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests_unixsocket/__init__.py", line 51, in get
2022-05-16 16:40:45.594     return request('get', url, **kwargs)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests_unixsocket/__init__.py", line 46, in request
2022-05-16 16:40:45.594     return session.request(method=method, url=url, **kwargs)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
2022-05-16 16:40:45.594     resp = self.send(prep, **send_kwargs)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
2022-05-16 16:40:45.594     r = adapter.send(request, **kwargs)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests/adapters.py", line 501, in send
2022-05-16 16:40:45.594     raise ConnectionError(err, request=request)
2022-05-16 16:40:45.594 requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
2022-05-16 16:40:45.594 
2022-05-16 16:40:45.594 The above exception was the direct cause of the following exception:
2022-05-16 16:40:45.594 Traceback (most recent call last):
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/charmcraft/providers/_buildd.py", line 70, in _setup_charmcraft
2022-05-16 16:40:45.594     snap_installer.install_from_store(
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/craft_providers/actions/snap_installer.py", line 226, in install_from_store
2022-05-16 16:40:45.594     store_revision = _get_store_snap_revision(snap_name=snap_name, channel=channel)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/craft_providers/actions/snap_installer.py", line 116, in _get_store_snap_revision
2022-05-16 16:40:45.594     raise SnapInstallationError(
2022-05-16 16:40:45.594 craft_providers.actions.snap_installer.SnapInstallationError: Unable to connect to snapd service.
2022-05-16 16:40:45.594 
2022-05-16 16:40:45.594 The above exception was the direct cause of the following exception:
2022-05-16 16:40:45.594 Traceback (most recent call last):
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/charmcraft/providers/_multipass.py", line 166, in launched_environment
2022-05-16 16:40:45.594     instance = multipass.launch(
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/craft_providers/multipass/_launch.py", line 63, in launch
2022-05-16 16:40:45.594     base_configuration.warmup(executor=instance)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/charmcraft/providers/_buildd.py", line 134, in warmup
2022-05-16 16:40:45.594     self._setup_charmcraft(executor=executor)
2022-05-16 16:40:45.594   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/charmcraft/providers/_buildd.py", line 74, in _setup_charmcraft
2022-05-16 16:40:45.594     raise bases.BaseConfigurationError(
2022-05-16 16:40:45.594 craft_providers.bases.errors.BaseConfigurationError: Failed to install Charmcraft snap from store channel 'stable' into target environment.
2022-05-16 16:40:45.594 Full execution log: '/Users/xxx/Library/Logs/charmcraft/charmcraft-20220516-164043.365444.log'

I don’t have snap, am running on Mac OS X. I was asked to install Multipass, so did that

1 Like

Can we see the full logs, please? Thanks!

It’s just above :slight_smile: I think you need to refresh the page

The communication with the VM seems to work fine: tested the last shell command before the error:

multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- getent hosts snapcraft.io

2620:2d:4000:1::27 snapcraft.io
2620:2d:4000:1::26 snapcraft.io
2620:2d:4000:1::28 snapcraft.io

One more question, is it really required to have multipass ? Can’t I build with snapcraft using docker or a k8s cluster ?

Hello @nachtmaar!

If I understand correctly, the current failure is because it’s reusing a previously created instance that for some reason doesn’t have snapd properly installed or configured.

Please, remove that instance…

multipass delete charmcraft-zinc-k8s-137326343-0-0-amd64
multipass purge

… and try again running pack with the --verbose option so we can get all the logs even if it run ok.

Thanks!

Did run the mentioned commands.

Here is the new output:

charmcraft pack --verbose
2022-05-16 17:01:35.682 Starting charmcraft version 1.6.0
2022-05-16 17:01:35.682 Logging execution to '/Users/xxx/Library/Logs/charmcraft/charmcraft-20220516-170135.680544.log'
2022-05-16 17:01:35.687 Packing the charm.
2022-05-16 17:01:35.693 Executing on host: multipass version
2022-05-16 17:01:35.803 Launching environment to pack for base name='ubuntu' channel='20.04' architectures=['amd64'] (may take a while the first time but it's reusable)
2022-05-16 17:01:35.804 Executing on host: multipass list --format json
2022-05-16 17:01:36.725 Executing on host: multipass launch snapcraft:20.04 --name charmcraft-zinc-k8s-137326343-0-0-amd64 --cpus 2 --mem 2G --disk 64G
2022-05-16 17:02:05.934 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- cat /etc/os-release
2022-05-16 17:02:06.135 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- test -f /etc/craft-instance.conf
2022-05-16 17:02:06.295 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- mktemp
2022-05-16 17:02:06.588 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chown root:root /tmp/tmp.vhYZvXMZFH
2022-05-16 17:02:06.738 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chmod 0644 /tmp/tmp.vhYZvXMZFH
2022-05-16 17:02:06.886 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- mv /tmp/tmp.vhYZvXMZFH /etc/apt/apt.conf.d/20auto-upgrades
2022-05-16 17:02:07.049 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- mktemp
2022-05-16 17:02:07.335 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chown root:root /tmp/tmp.PY9bHwyhkE
2022-05-16 17:02:07.483 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chmod 0644 /tmp/tmp.PY9bHwyhkE
2022-05-16 17:02:07.631 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- mv /tmp/tmp.PY9bHwyhkE /etc/environment
2022-05-16 17:02:07.781 Waiting for environment to be ready...
2022-05-16 17:02:07.781 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl is-system-running
2022-05-16 17:02:07.936 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- test -f /etc/craft-instance.conf
2022-05-16 17:02:08.092 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- mktemp
2022-05-16 17:02:08.380 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chown root:root /tmp/tmp.yG86qGuUqY
2022-05-16 17:02:08.530 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chmod 0644 /tmp/tmp.yG86qGuUqY
2022-05-16 17:02:08.678 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- mv /tmp/tmp.yG86qGuUqY /etc/craft-instance.conf
2022-05-16 17:02:08.828 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- mktemp
2022-05-16 17:02:09.483 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chown root:root /tmp/tmp.WtNt9KliPm
2022-05-16 17:02:09.691 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chmod 0644 /tmp/tmp.WtNt9KliPm
2022-05-16 17:02:09.858 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- mv /tmp/tmp.WtNt9KliPm /etc/hostname
2022-05-16 17:02:10.020 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- hostname -F /etc/hostname
2022-05-16 17:02:10.173 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
2022-05-16 17:02:10.323 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl enable systemd-resolved
2022-05-16 17:02:10.716 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl restart systemd-resolved
2022-05-16 17:02:10.963 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- mktemp
2022-05-16 17:02:11.264 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chown root:root /tmp/tmp.OeJDD5RgIj
2022-05-16 17:02:11.430 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chmod 0644 /tmp/tmp.OeJDD5RgIj
2022-05-16 17:02:11.592 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- mv /tmp/tmp.OeJDD5RgIj /etc/systemd/network/10-eth0.network
2022-05-16 17:02:11.758 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl enable systemd-networkd
2022-05-16 17:02:12.278 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl restart systemd-networkd
2022-05-16 17:02:12.530 Waiting for networking to be ready...
2022-05-16 17:02:12.530 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- getent hosts snapcraft.io
2022-05-16 17:02:27.661 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- mktemp
2022-05-16 17:02:27.969 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chown root:root /tmp/tmp.FIJYyg0IxY
2022-05-16 17:02:28.119 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chmod 0644 /tmp/tmp.FIJYyg0IxY
2022-05-16 17:02:28.276 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- mv /tmp/tmp.FIJYyg0IxY /etc/apt/apt.conf.d/00no-recommends
2022-05-16 17:02:28.430 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- mktemp
2022-05-16 17:02:28.718 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chown root:root /tmp/tmp.6i1ZlttiyT
2022-05-16 17:02:28.874 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- chmod 0644 /tmp/tmp.6i1ZlttiyT
2022-05-16 17:02:29.027 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- mv /tmp/tmp.6i1ZlttiyT /etc/apt/apt.conf.d/00update-errors
2022-05-16 17:02:29.182 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- apt-get update
2022-05-16 17:02:43.187 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- apt-get install -y apt-utils
2022-05-16 17:02:50.724 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- apt-get install -y fuse udev
2022-05-16 17:03:07.897 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl enable systemd-udevd
2022-05-16 17:03:08.338 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl start systemd-udevd
2022-05-16 17:03:08.501 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- apt-get install -y snapd
2022-05-16 17:03:37.569 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl start snapd.socket
2022-05-16 17:03:37.876 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- systemctl restart snapd.service
2022-05-16 17:03:47.814 Executing on host: multipass exec charmcraft-zinc-k8s-137326343-0-0-amd64 -- sudo -H -- snap wait system seed.loaded
2022-05-16 17:03:48.055 Failed to install Charmcraft snap from store channel 'stable' into target environment.
2022-05-16 17:03:48.070 Traceback (most recent call last):
2022-05-16 17:03:48.070   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
2022-05-16 17:03:48.070     httplib_response = self._make_request(
2022-05-16 17:03:48.070   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
2022-05-16 17:03:48.070     conn.request(method, url, **httplib_request_kw)
2022-05-16 17:03:48.070   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1285, in request
2022-05-16 17:03:48.071     self._send_request(method, url, body, headers, encode_chunked)
2022-05-16 17:03:48.071   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1331, in _send_request
2022-05-16 17:03:48.071     self.endheaders(body, encode_chunked=encode_chunked)
2022-05-16 17:03:48.071   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1280, in endheaders
2022-05-16 17:03:48.071     self._send_output(message_body, encode_chunked=encode_chunked)
2022-05-16 17:03:48.071   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1040, in _send_output
2022-05-16 17:03:48.071     self.send(msg)
2022-05-16 17:03:48.071   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 980, in send
2022-05-16 17:03:48.072     self.connect()
2022-05-16 17:03:48.072   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests_unixsocket/adapters.py", line 41, in connect
2022-05-16 17:03:48.072     sock.connect(socket_path)
2022-05-16 17:03:48.072 FileNotFoundError: [Errno 2] No such file or directory
2022-05-16 17:03:48.072
2022-05-16 17:03:48.072 During handling of the above exception, another exception occurred:
2022-05-16 17:03:48.072 Traceback (most recent call last):
2022-05-16 17:03:48.073   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
2022-05-16 17:03:48.073     resp = conn.urlopen(
2022-05-16 17:03:48.073   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
2022-05-16 17:03:48.073     retries = retries.increment(
2022-05-16 17:03:48.073   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/util/retry.py", line 550, in increment
2022-05-16 17:03:48.073     raise six.reraise(type(error), error, _stacktrace)
2022-05-16 17:03:48.073   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
2022-05-16 17:03:48.074     raise value.with_traceback(tb)
2022-05-16 17:03:48.074   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
2022-05-16 17:03:48.074     httplib_response = self._make_request(
2022-05-16 17:03:48.074   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
2022-05-16 17:03:48.074     conn.request(method, url, **httplib_request_kw)
2022-05-16 17:03:48.074   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1285, in request
2022-05-16 17:03:48.074     self._send_request(method, url, body, headers, encode_chunked)
2022-05-16 17:03:48.074   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1331, in _send_request
2022-05-16 17:03:48.074     self.endheaders(body, encode_chunked=encode_chunked)
2022-05-16 17:03:48.074   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1280, in endheaders
2022-05-16 17:03:48.075     self._send_output(message_body, encode_chunked=encode_chunked)
2022-05-16 17:03:48.075   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1040, in _send_output
2022-05-16 17:03:48.075     self.send(msg)
2022-05-16 17:03:48.075   File "/usr/local/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 980, in send
2022-05-16 17:03:48.075     self.connect()
2022-05-16 17:03:48.075   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests_unixsocket/adapters.py", line 41, in connect
2022-05-16 17:03:48.075     sock.connect(socket_path)
2022-05-16 17:03:48.075 urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
2022-05-16 17:03:48.075
2022-05-16 17:03:48.076 During handling of the above exception, another exception occurred:
2022-05-16 17:03:48.076 Traceback (most recent call last):
2022-05-16 17:03:48.076   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/craft_providers/actions/snap_installer.py", line 114, in _get_store_snap_revision
2022-05-16 17:03:48.076     snap_info = requests_unixsocket.get(url)
2022-05-16 17:03:48.076   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests_unixsocket/__init__.py", line 51, in get
2022-05-16 17:03:48.076     return request('get', url, **kwargs)
2022-05-16 17:03:48.076   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests_unixsocket/__init__.py", line 46, in request
2022-05-16 17:03:48.076     return session.request(method=method, url=url, **kwargs)
2022-05-16 17:03:48.076   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
2022-05-16 17:03:48.076     resp = self.send(prep, **send_kwargs)
2022-05-16 17:03:48.076   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
2022-05-16 17:03:48.076     r = adapter.send(request, **kwargs)
2022-05-16 17:03:48.077   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/requests/adapters.py", line 501, in send
2022-05-16 17:03:48.077     raise ConnectionError(err, request=request)
2022-05-16 17:03:48.077 requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
2022-05-16 17:03:48.077
2022-05-16 17:03:48.077 The above exception was the direct cause of the following exception:
2022-05-16 17:03:48.077 Traceback (most recent call last):
2022-05-16 17:03:48.077   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/charmcraft/providers/_buildd.py", line 70, in _setup_charmcraft
2022-05-16 17:03:48.077     snap_installer.install_from_store(
2022-05-16 17:03:48.077   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/craft_providers/actions/snap_installer.py", line 226, in install_from_store
2022-05-16 17:03:48.077     store_revision = _get_store_snap_revision(snap_name=snap_name, channel=channel)
2022-05-16 17:03:48.078   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/craft_providers/actions/snap_installer.py", line 116, in _get_store_snap_revision
2022-05-16 17:03:48.078     raise SnapInstallationError(
2022-05-16 17:03:48.078 craft_providers.actions.snap_installer.SnapInstallationError: Unable to connect to snapd service.
2022-05-16 17:03:48.078
2022-05-16 17:03:48.078 The above exception was the direct cause of the following exception:
2022-05-16 17:03:48.078 Traceback (most recent call last):
2022-05-16 17:03:48.079   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/charmcraft/providers/_multipass.py", line 166, in launched_environment
2022-05-16 17:03:48.079     instance = multipass.launch(
2022-05-16 17:03:48.079   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/craft_providers/multipass/_launch.py", line 82, in launch
2022-05-16 17:03:48.079     base_configuration.setup(executor=instance)
2022-05-16 17:03:48.079   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/charmcraft/providers/_buildd.py", line 110, in setup
2022-05-16 17:03:48.080     self._setup_charmcraft(executor=executor)
2022-05-16 17:03:48.080   File "/usr/local/Cellar/charmcraft/1.6.0/libexec/lib/python3.9/site-packages/charmcraft/providers/_buildd.py", line 74, in _setup_charmcraft
2022-05-16 17:03:48.080     raise bases.BaseConfigurationError(
2022-05-16 17:03:48.080 craft_providers.bases.errors.BaseConfigurationError: Failed to install Charmcraft snap from store channel 'stable' into target environment.
2022-05-16 17:03:48.080 Full execution log: '/Users/xxx/Library/Logs/charmcraft/charmcraft-20220516-170135.680544.log'

@facundo

iled to install Charmcraft snap from store channel 'stable' into target environment.

Could this mean the computer’s architecture is not supported? Maybe M1 isn’t supported?

I don’t have an M1 Mac. It is an x86_64 Intel :slight_smile:

1 Like

Did run the command multiple times. Always fails in the same step. Tried it on the VM in a shell, looks actually good:

ubuntu@charmcraft-zinc-k8s-137326343-0-0-amd64:~$ sudo snap wait system seed.loaded
ubuntu@charmcraft-zinc-k8s-137326343-0-0-amd64:~$ echo $?
0

Can you revert charmcraft to 1.5.0 for now?

https://github.com/Homebrew/homebrew-core/commits/f50ea30c4546b822f455a26a40e42a9460215812/Formula/charmcraft.rb

We will fix the bug in the meantime.

I tried but there is a conflict. I will wait for the bugfix. Let me know then it is ready and I will try it :slight_smile:

$ brew extract charmcraft --version=1.5.0 homebrew/cask

$ brew install charmcraft@1.5.0
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 3 formulae.
==> Updated Casks
Updated 1 cask.

==> Downloading https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/d46628d315f103ea527907020cf5f6c94365bbb549783f75a794526482afb672--appdirs-1.4.4.tar.gz
==> Downloading https://files.pythonhosted.org/packages/d7/77/ebb15fc26d0f815839ecd897b919ed6d85c050feeb83e100e020df9153d2/attrs-21.4.0
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/fe6cdd0c4ee0b8da4037c0f8bc4a7ce1f6194ca0ca06f2812515c5ad0c565913--attrs-21.4.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/6c/ae/d26450834f0acc9e3d1f74508da6df1551ceab6c2ce0766a593362d6d57f/certifi-2021
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/86e8e1766c3528acc8bf98587c92ef116261087678a6158e4719100a9a30f3ac--certifi-2021.10.8.tar.gz
==> Downloading https://files.pythonhosted.org/packages/00/9e/92de7e1217ccc3d5f352ba21e52398372525765b2e0c4530e6eb2ba9282a/cffi-1.15.0.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/35b0a9dae6e72af7934b5fc3e33a3b40ae446e9a5694a2c4a4a70b8abc1f9826--cffi-1.15.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/48/44/76b179e0d1afe6e6a91fd5661c284f60238987f3b42b676d141d01cd5b97/charset-norm
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/d0a13f48588e2bbc1d1733a5ffcd6af6e77dd1d01fb28d840294f31cc316bee3--charset-normalizer-2.0.10.tar.gz
==> Downloading https://files.pythonhosted.org/packages/d4/c9/038fca354cf2ab2cd055e59805c536a68120d859135a5a23ec264e11c228/craft-cli-0.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/0c5d13fc5636327fb47ecef1ed0160e5bebaaa43ac5839744342498ff2b9d877--craft-cli-0.3.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/83/eb/e76a3c34bd13d2cd772122b0a7a52a8103885d971a6e49d43d8192fa2ebd/craft-parts-
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/228624b693606a7b97e654992c7a157ec9c3408629ddac1b3cec567d899d8e45--craft-parts-1.3.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/08/07/32dc5843ccc06ce9379d8c0a759cc01a297b51bf00a8033a7f86a68e22ac/craft-provid
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/821e81930eadebe50ea592b894af6a14e3ce9756d145fa0ee3c8a269fee0dbe9--craft-providers-1.1.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/63/52/9ab028dca14470fc1c95e3078b8e9750cffde5020edaad02cd1e22f87f4d/craft-store-
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/a71d95c82b058f3573a69b93db63770a51a341b9056c1918683cfd77b1606c48--craft-store-2.0.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/ea/d8/2afd2890fe451a3c109d2bdb6bc4ded55ec43059e524344d5e0004e36412/cryptography
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/dcad7f38af0ff53d23f3d6de11b2110b705ce39fae16bc2b8cea6c9a943a8000--cryptography-3.4.tar.gz
==> Downloading https://files.pythonhosted.org/packages/8a/b6/e7d99d1cc225a069f3f7a906a213cb1a0148dac27119290c41dc257ffe53/humanize-3.1
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/cd4e74a768872e9a2250bf5741e65e3ab23c76e3eb59f9246b41a1f452f08f63--humanize-3.13.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/62/08/e3fc7c8161090f742f504f40b1bccbfc544d4a4e09eb774bf40aafce5436/idna-3.3.tar
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/b61bd327cd7a0ba298cc7cdb6f314f028e8547bef2f814156ce50702a6faf562--idna-3.3.tar.gz
==> Downloading https://files.pythonhosted.org/packages/50/05/fef7fbb7e781e0632ebba4e6e37bcc88b9615e76338850dc31435091ddc0/importlib_me
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/eb2850b02a1379fd7470d9c29da9c564565628ef81cf613f3a41cecb3fce5a8a--importlib_metadata-4.10.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/91/a5/429efc6246119e1e3fbf562c00187d04e83e54619249eb732bb423efa6c6/Jinja2-3.0.3
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/9459b28e4118d509c4c03ad0168a5c125d5446c824380fd5bb36050751f4f465--Jinja2-3.0.3.tar.gz
==> Downloading https://files.pythonhosted.org/packages/26/67/36cfd516f7b3560bbf7183d7a0f82bb9514d2a5f4e1d682a8a1d55d8031d/jsonschema-4
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/dfbc310a5e554e015f18d4b9b0d77a742b989e8981a395c410e4324c13674e1d--jsonschema-4.4.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/22/2b/e840597838cc63f96926bd7daca67936031635cfe6c81ee12dc652bd2dce/keyring-23.5
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/764ad7f4f2d6c0d5c19dca3078b3c226e559f39036d26a14c8f056c2082b7f8c--keyring-23.5.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/52/40/2a8bb2f507ce1a6c5b896c1b98044d74d34b07a6dd771526b4fe84e3181f/macaroonbake
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/ef68d8aba3a7494a8ebead926944762a11b0ec912d061ac3c3b1c569123cd706--macaroonbakery-1.3.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/MarkupSafe-2
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/2f2488b4acce3f0f78d8d8a234cbcc0306b6789e9b18ada8269380a59131b350--MarkupSafe-2.0.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/52/86/7f70ed8b5957b094a432cc839ea99cffac62a41861d4d2075d742a45953b/overrides-6.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/5f2e6ea6d54c1a48b15c659b50abb49340f8166dbad13e0c24e37e7898535edf--overrides-6.1.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/df/9e/d1a7217f69310c1db8fdf8ab396229f55a699ce34a203691794c5d1cad0c/packaging-21
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/4e5cc302ac2525105e67cdfb598d16c5dd68105f5501546cc69887ddb63d6676--packaging-21.3.tar.gz
==> Downloading https://files.pythonhosted.org/packages/33/66/61da40aa546141b0d70b37fe6bb4ef1200b4b4cb98849f131b58faa9a5d2/platformdirs
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/fbb8545e9b766e831fa4f076b69c084cc903b80c68533757ba7b5b8a750667ad--platformdirs-2.5.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/d9/d5/bf6c307f58b4c486f6517341d2f2673cd889b7d3a83cae78a9081233c679/protobuf-3.1
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/9f69236b6006654ca13a1236d4108c2e31a48b7d02e8cb022482b31fe5d768c4--protobuf-3.19.3.tar.gz
==> Downloading https://files.pythonhosted.org/packages/5e/0b/95d387f5f4433cb0f53ff7ad859bd2c6051051cebbb564f139a999ab46de/pycparser-2.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/afd26a33c942c1a86b5bd298b2b7eeb80b73d361c2fd472977b130ed873f655b--pycparser-2.21.tar.gz
==> Downloading https://files.pythonhosted.org/packages/b9/d2/12a808613937a6b98cd50d6467352f01322dc0d8ca9fb5b94441625d6684/pydantic-1.8
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/45c36a640340f28576aeb0ea262603017bd49f7eb93a0ae608ebdb213aef367d--pydantic-1.8.2.tar.gz
==> Downloading https://files.pythonhosted.org/packages/47/ff/187bcb7afe2cb53c34be7ee71dca8a53bf9e83c0b2b0ad2b3781b18f5bd4/pydantic_yam
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/02e69d65a28fc3e0f135f9d910b8f37bdbfeb3b2df5ce88081a4adca063e2dd5--pydantic_yaml-0.4.3.tar.gz
==> Downloading https://files.pythonhosted.org/packages/37/b4/52ff00b59e91c4817ca60210c33caf11e85a7f68f7b361748ca2eb50923e/pymacaroons-
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/fe01603ac274cdbc3bb8f8915149656d1b1476a3c6cbd81d2e5188cbf0c24fd4--pymacaroons-0.13.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/92052797d509c2ffc5990e56a4f9b7588c7d51cb1f2590f818b8fa2d174e963d--PyNaCl-1.5.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/ab/61/1a1613e3dcca483a7aa9d446cb4614e6425eb853b90db131c305bd9674cb/pyparsing-3.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/2b06c6a32c0063a0027222c6ca4bfcf47c88d002a300c53e708426e99c30ee44--pyparsing-3.0.6.tar.gz
==> Downloading https://files.pythonhosted.org/packages/00/52/75ea0ae249ba885c9429e421b4f94bc154df68484847f1ac164287d978d7/pyRFC3339-1.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/028b301911054951c315593d93cd8963ef7bf341cbb4482eeaa3905379881036--pyRFC3339-1.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/f4/d7/0fa558c4fb00f15aabc6d42d365fcca7a15fcc1091cd0f5784a14f390b7f/pyrsistent-0
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/a4dfc676d9604a662d6421ce2657855f637cf820ca932fb9dca9646328f9b640--pyrsistent-0.18.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/4c/c4/13b4776ea2d76c115c1d1b84579f3764ee6d57204f6be27119f13a61d0a9/python-dateu
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/4e50a91c819e2305ec34acb9d8ae975fb83ed44ed8dac408ded43097f4fee848--python-dateutil-2.8.2.tar.gz
==> Downloading https://files.pythonhosted.org/packages/e3/8e/1cde9d002f48a940b9d9d38820aaf444b229450c0854bdf15305ce4a3d1a/pytz-2021.3.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/9add310b2ca5f5d8c452e8ff4eac17279970e78fb63449e5642adbf15f8a4f46--pytz-2021.3.tar.gz
==> Downloading https://files.pythonhosted.org/packages/6f/2e/2251b5ae2f003d865beef79c8fcd517e907ed6a69f58c32403cec3eba9b2/pyxdg-0.27.t
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/127992d731dd64b39135e53d2b76b1f1330f16e5bef2de1e77b8fd83ef2d195a--pyxdg-0.27.tar.gz
==> Downloading https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.t
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/83f6bef3a0a4fd3d9559a85acb4ab73b0e4544f8542e67bf54929e86653356e9--PyYAML-6.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/60/f3/26ff3767f099b73e0efa138a9998da67890793bfa475d8278f84a30fec77/requests-2.2
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/90c145252a2965e7f1248b97f07c92f2ef64d0908ff175de0a85c9b644725c4c--requests-2.27.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/28/30/7bf7e5071081f761766d46820e52f4b16c8a08fef02d2eb4682ca7534310/requests-too
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/a480f5958d6839a154abd0a1a0b4bf6b590f88a3addfb0bb5817e706a2e50c5f--requests-toolbelt-0.9.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/c3/ea/0fb87f844d8a35ff0dcc8b941e1a9ffc9eb46588ac9e4267b9d9804354eb/requests-uni
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/08a84cfeb0a77218f680d8863de4f330af397147a77af3509c4c096c22b851ef--requests-unixsocket-0.3.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/d4/52/3be868c7ed1f408cb822bc92ce17ffe4e97d11c42caafce0589f05844dd0/semantic_ver
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/08984b51cefb42a88bad3ed40a8a6a2d654a72a69f64fd7beb84a8187beb3258--semantic_version-2.8.5.tar.gz
==> Downloading https://files.pythonhosted.org/packages/31/a9/b61190916030ee9af83de342e101f192bbb436c59be20a4cb0cdb7256ece/semver-2.13.
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/74c909d1970813de0888546d9997524f8d03a8633787a8a0cfe3643e1e136175--semver-2.13.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/67/08/e1aa2c582c62ac76e4d60f8e454bd3bba933781a06a88b4e38797445822a/setuptools-r
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/1fedecfd79cc1bb589a33425ebda98830b9d2f3a0450151cd292df6b4699ca37--setuptools-rust-1.1.2.tar.gz
==> Downloading https://files.pythonhosted.org/packages/54/a4/7f11eb8d96826cfe17c4c68b907f8005d97ad1ef23dea67aa3d39287f6d7/snap-helpers
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/d32bfa01d137fdfb4318ab0a48d52119a25dab6bcbf5c8b8c00c3a5a22d40cf3--snap-helpers-0.2.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/0d/4a/60ba3706797b878016f16edc5fbaf1e222109e38d0fa4d7d9312cb53f8dd/typing_exten
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/afdb51418f7b4bd3b2b3d952dc96e8427aa98765791f793fcbd412e51f585a63--typing_extensions-4.0.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/c0/9f/ddc5ed9182f49d6ca5d87a7629dea81ca076db54f30f78d057a081f5ec50/typing_utils
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/7941869cf08c3af9dca8a98acf9cb618d7f124f4c995728230052139a170f6c7--typing_utils-0.1.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/b0/b1/7bbf5181f8e3258efae31702f5eab87d8a74a72a0aa78bc8c08c1466e243/urllib3-1.26
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/dbcf3b4c5bc93a2718a740d537e426bf79bbe6e767744fdf2a748d44d3811232--urllib3-1.26.8.tar.gz
==> Downloading https://files.pythonhosted.org/packages/94/64/3115548d41cb001378099cb4fc6a6889c64ef43ac1b0e68c9e80b55884fa/zipp-3.7.0.t
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/3560694b5d676218bac6aa0e040e9f05ff83de4d76a6939529ca7945e546cd4f--zipp-3.7.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/a2/1f/a92190a0a66c89b4aa92c9d0bafacaab914eee093bf504cb4960a2e462e4/charmcraft-1
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/a7aeadab983c206d126d35b3d77191c265ff62d61e40c06334adfd82de04c7e4--charmcraft-1.5.0.tar.gz
==> Installing charmcraft@1.5.0 from homebrew/cask
==> python3.9 -m venv --system-site-packages /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha
==> /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/cha

Last 15 lines from /Users/xxx/Library/Logs/Homebrew/charmcraft@1.5.0/11.pip:
  error: subprocess-exited-with-error

  × Building wheel for cryptography (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/python3.9 /usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /private/tmp/tmpwh6vjp7a
  cwd: /private/tmp/charmcraftA1.5.0--cryptography-20220517-76044-17eejtt/cryptography-3.4
  Building wheel for cryptography (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
WARNING: You are using pip version 22.0.4; however, version 22.1 is available.
You should consider upgrading via the '/usr/local/Cellar/charmcraft@1.5.0/1.5.0/libexec/bin/python3.9 -m pip install --upgrade pip' command.

READ THIS: https://docs.brew.sh/Troubleshooting

I just released charmcraft 1.7.0 to candidate channel which includes fixes for these issues, please give it a try and let me know, thanks!!

1 Like

@facundo I was able to install the newly released version.

I needed to reinstall multipass (because I uninstalled it).

Not I am running into a multipass error:

$ charmcraft version
1.7.0

$ multipass version
multipass   1.9.1+mac
multipassd  1.9.1+mac

$ charmcraft pack
Failed to launch VM 'charmcraft-template-operator-139566981-0-0-amd64'.chitectures=['amd64'] (may take a while the first time but it's reusable)
* Command that failed: 'multipass launch snapcraft:20.04 --name charmcraft-template-operator-139566981-0-0-amd64 --cpus 2 --mem 2G --disk 64G'
* Command exit code: 2
* Command output: b'\r                                                                                \r\r                                                                                \r'
* Command standard error output: b'launch failed: Remote "snapcraft" is unknown or unreachable.\n'                                                                 
Full execution log: '/Users/xxx/Library/Logs/charmcraft/charmcraft-20220527-174003.824218.log'

$ cat /Users/xxx/Library/Logs/charmcraft/charmcraft-20220527-174607.523165.log
2022-05-27 17:46:07.528 Starting charmcraft version 1.7.0
2022-05-27 17:46:07.529 Raw pre-parsed sysargs: args={'help': False, 'verbose': False, 'quiet': False, 'trace': False, 'project_dir': None} filtered=['pack']
2022-05-27 17:46:07.530 General parsed sysargs: command='pack' args=[]
2022-05-27 17:46:07.539 Command parsed sysargs: Namespace(debug=False, destructive_mode=False, entrypoint=None, requirement=None, shell=False, shell_after=False, bases_index=None, force=False)
2022-05-27 17:46:07.539 System details: OSPlatform(system='Darwin', release='21.4.0', machine='x86_64'); Environment: None
2022-05-27 17:46:07.539 Packing the charm.
2022-05-27 17:46:07.540 Working arguments: {'from': PosixPath('/Users/xxx/SAPDevelop/repos/github.com/template-operator'), 'destructive_mode': False, 'entrypoint': None, 'requirement': [], 'bases_indices': None, 'force': False, 'debug': False, 'shell': False, 'shell_after': False}
2022-05-27 17:46:07.540 Reading '/Users/xxx/SAPDevelop/repos/github.com/template-operator/metadata.yaml'
2022-05-27 17:46:07.543 Validating metadata format
2022-05-27 17:46:07.543 Executing on host: multipass version
2022-05-27 17:46:07.805 Building for 'bases[0]' as host matches 'build-on[0]'.
2022-05-27 17:46:07.805 Building for 'bases[0][0]'.
2022-05-27 17:46:07.806 Launching environment to pack for base name='ubuntu' channel='20.04' architectures=['amd64'] (may take a while the first time but it's reusable)
2022-05-27 17:46:07.806 Executing on host: multipass list --format json
2022-05-27 17:46:07.906 Executing on host: multipass launch snapcraft:20.04 --name charmcraft-template-operator-139566981-0-0-amd64 --cpus 2 --mem 2G --disk 64G
2022-05-27 17:46:10.936 Failed to launch VM 'charmcraft-template-operator-139566981-0-0-amd64'.
* Command that failed: 'multipass launch snapcraft:20.04 --name charmcraft-template-operator-139566981-0-0-amd64 --cpus 2 --mem 2G --disk 64G'
* Command exit code: 2
* Command output: b'\r                                                                                \r\r                                                                                \r'
* Command standard error output: b'launch failed: Remote "snapcraft" is unknown or unreachable.\n'
2022-05-27 17:46:10.943 Traceback (most recent call last):
2022-05-27 17:46:10.943   File "/Users/xxx/.local/share/virtualenvs/charmcraft-hjE-_CDL/lib/python3.9/site-packages/craft_providers/multipass/multipass.py", line 176, in launch
2022-05-27 17:46:10.943     self._run(command)
2022-05-27 17:46:10.943   File "/Users/xxx/.local/share/virtualenvs/charmcraft-hjE-_CDL/lib/python3.9/site-packages/craft_providers/multipass/multipass.py", line 66, in _run
2022-05-27 17:46:10.943     return subprocess.run(command, check=True, capture_output=True, **kwargs)
2022-05-27 17:46:10.943   File "/usr/local/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
2022-05-27 17:46:10.943     raise CalledProcessError(retcode, process.args,
2022-05-27 17:46:10.943 subprocess.CalledProcessError: Command '['multipass', 'launch', 'snapcraft:20.04', '--name', 'charmcraft-template-operator-139566981-0-0-amd64', '--cpus', '2', '--mem', '2G', '--disk', '64G']' returned non-zero exit status 2.
2022-05-27 17:46:10.943
2022-05-27 17:46:10.943 The above exception was the direct cause of the following exception:
2022-05-27 17:46:10.943 Traceback (most recent call last):
2022-05-27 17:46:10.943   File "/Users/xxx/.local/share/virtualenvs/charmcraft-hjE-_CDL/lib/python3.9/site-packages/charmcraft/providers/_multipass.py", line 166, in launched_environment
2022-05-27 17:46:10.943     instance = multipass.launch(
2022-05-27 17:46:10.943   File "/Users/xxx/.local/share/virtualenvs/charmcraft-hjE-_CDL/lib/python3.9/site-packages/craft_providers/multipass/_launch.py", line 76, in launch
2022-05-27 17:46:10.943     instance.launch(
2022-05-27 17:46:10.943   File "/Users/xxx/.local/share/virtualenvs/charmcraft-hjE-_CDL/lib/python3.9/site-packages/craft_providers/multipass/multipass_instance.py", line 287, in launch
2022-05-27 17:46:10.943     self._multipass.launch(
2022-05-27 17:46:10.943   File "/Users/xxx/.local/share/virtualenvs/charmcraft-hjE-_CDL/lib/python3.9/site-packages/craft_providers/multipass/multipass.py", line 178, in launch
2022-05-27 17:46:10.943     raise MultipassError(
2022-05-27 17:46:10.943 craft_providers.multipass.errors.MultipassError: Failed to launch VM 'charmcraft-template-operator-139566981-0-0-amd64'.
2022-05-27 17:46:10.943 * Command that failed: 'multipass launch snapcraft:20.04 --name charmcraft-template-operator-139566981-0-0-amd64 --cpus 2 --mem 2G --disk 64G'
2022-05-27 17:46:10.943 * Command exit code: 2
2022-05-27 17:46:10.943 * Command output: b'\r                                                                                \r\r                                                                                \r'
2022-05-27 17:46:10.943 * Command standard error output: b'launch failed: Remote "snapcraft" is unknown or unreachable.\n'
2022-05-27 17:46:10.943 Full execution log: '/Users/xxx/Library/Logs/charmcraft/charmcraft-20220527-174607.523165.log'

Hello! This is a bug in multipass, fixed in 1.9.2, which should be released to Mac soon.

1 Like

Works now :slight_smile:

 charmcraft pack
Packing the charm
Created 'zinc-k8s_ubuntu-20.04-amd64.charm'.
Charms packed:
    zinc-k8s_ubuntu-20.04-amd64.charm
2 Likes