Snapcraft tutorial errors out on OSX with multipass error, "returned exit code 2"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Triaged
|
High
|
Sergio Schvezov |
Bug Description
Attempting to run through the Go tutorial on OSX results in the following when running `snapcraft` the first time:
```
Launching a VM.
Launched: snapcraft-
2019-12-
snapd 2.42.5 from Canonical✓ installed
core18 20191126 from Canonical✓ installed
snapcraft 3.8 from Canonical✓ installed
Ign:1 http://
Ign:2 http://
Ign:3 http://
Err:4 http://
404 Not Found [IP: 91.189.91.14 80]
Ign:5 http://
Err:6 http://
404 Not Found [IP: 91.189.88.24 80]
Err:7 http://
404 Not Found [IP: 91.189.88.24 80]
Err:8 http://
404 Not Found [IP: 91.189.88.24 80]
Reading package lists... Done
E: The repository 'http://
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Failed to update the package cache: Some files could not be downloaded:
failed to run apt update
Check that the sources on your host are configured correctly.
An error occurred when trying to execute 'sudo -i env SNAPCRAFT_
```
On subsequent runs:
```
Launching a VM.
snap "snapd" has no updates available
snap "core18" has no updates available
snap "snapcraft" has no updates available
mount failed: Error enabling mount support in 'snapcraft-
An error occurred with the instance when trying to mount with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
```
I've confirmed that multipass is running, though unclear how to confirm that it's set up "correctly."
Based on others' incidents I attempted to run `snapcraft clean`, the result was the following:
```
Sorry, an error occurred in Snapcraft:
module 'os' has no attribute 'sched_getaffinity'
Traceback (most recent call last):
File "/usr/local/
sys.exit(run())
File "/usr/local/
return self.main(*args, **kwargs)
File "/usr/local/
rv = self.invoke(ctx)
File "/usr/local/
return _process_
File "/usr/local/
return super().invoke(ctx)
File "/usr/local/
return ctx.invoke(
File "/usr/local/
return callback(*args, **kwargs)
File "/usr/local/
return f(get_current_
File "/usr/local/
lifecycle.
File "/usr/local/
config = project_
File "/usr/local/
return Config(project)
File "/usr/local/
self.data = self._expand_
File "/usr/local/
snapcraft_
File "/usr/local/
"SNAPCRAFT_
File "/usr/local/
return len(os.
AttributeError: module 'os' has no attribute 'sched_getaffinity'
We would appreciate it if you created a bug report at
https:/
You can find the traceback in file '/var/folders/
```
Which led me here.
It seems that networking is not fully up.
We will work on the snapcraft side to better expose this and cleanup if bootstrapping fails.