Snapcraft suddenly crashes - cant build my app anymore :-(

Hi there :slight_smile: In the past I have built my flutter application FluffyChat without any problems (need to make it precompiled and then snap it but it worked) but now when I try to build a new version of it (without any changes in the snapcraft.yaml) I only get errors and timeouts:

Repo: https://gitlab.com/famedly/fluffychat snapcraft.yaml: https://gitlab.com/famedly/fluffychat/-/blob/main/snap/snapcraft.yaml

$ snapcraft
Launching a VM.
Launched: snapcraft-fluffychat                                                  
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease                                                               
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                                                       
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable)
Err:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                     
  Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out
Reading package lists... Done                             
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable)
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'apt' instead of 'apt-transport-https'
apt is already the newest version (1.6.12ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2021-06-23T09:57:46+02:00 INFO Waiting for automatic snapd restart...
snapd 2.51 from Canonical✓ installed
"snapd" switched to the "latest/stable" channel

core18 20210611 from Canonical✓ installed
"core18" switched to the "latest/stable" channel

snapcraft 4.8.2 from Canonical✓ installed
"snapcraft" switched to the "latest/stable" channel

mount failed: Error enabling mount support in 'snapcraft-fluffychat'            

Please install the 'multipass-sshfs' snap manually inside the instance.
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 have already tried to:

  • reinstall multipass
  • fully clean and delete the snapcraft-fluffychat image
  • reinstall snapcraft

I do not know how to solve this :-/ Does anyone have an idea?

Hi, sorry to see this going on, I personally don’t see this. What OS are you running on the host?

@Saviq can you help troubleshoot this?

Hi @krille, do you have VPN or firewalls running on your host? It can easily prevent Multipass instances from accessing the Internet.

Have a look at our docs on the topic:

Hey there, thanks for the quick responde. I am using Ubuntu 21.04 on my desktop PC and I dont have a VPN or a firewall. It worked some days ago without any problems, thats why I’m confused

Got the same and can’t get what’s wrong. Looks like network issue as can’t access internet when shell to the multiplass instance to install manually ‘multiplass-sshfs’. And can’t ping as ping is not installed … apt fails … disaster.

So … we solved the problem by removing all additional ethernet controllers that were in that computer (but not connected to internet). Without checking the code I speculate that probably Multipass enumerates the network adapters and picks the first one from the list not the one that’s connected to internet.

With the new method to build it I ran into other problems. Now every build needs a manual review and the olm library is no longer found…