Local Snapcraft build fails because of network error

I am trying to run a local Snapcraft build. The build fails with the following error.

nadir@nadir-X551MA:~/Projects/islam-companion$ snapcraft --debug --enable-experimental-extensions EXPERIMENTAL extensions enabled. Launching a VM. Build environment is in unknown state, cleaning first. info failed: The following errors occurred: instance “snapcraft-islamcompanion” does not exist Launched: snapcraft-islamcompanion
Err:1 http://archive.ubuntu.com/ubuntu focal 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.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out Err:2 http://archive.ubuntu.com/ubuntu focal-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 focal-security InRelease
Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) 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:1360:8001::24). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.88.152), connection timed out 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.88.142), 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/focal-security/InRelease Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) 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:1360:8001::24). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.88.152), connection timed out 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.88.142), 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/focal/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.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-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 (2.0.6). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2021-12-09T16:34:13+05:00 INFO Waiting for automatic snapd restart… snapd 2.53.4 from Canonical✓ installed “snapd” switched to the “latest/stable” channel

core20 20211129 from Canonical✓ installed “core20” switched to the “latest/stable” channel

snapcraft 6.0 from Canonical✓ installed “snapcraft” switched to the “latest/stable” channel

mount failed: Error enabling mount support in ‘snapcraft-islamcompanion’

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 used the following command: snapcraft --debug --enable-experimental-extensions

I think the problem is caused by a lack of network connectivity in the multpass instance. I logged in to the multipass instance and could not run sudo apt-get update command. It gave a network connectivity error.