Hi, I’m following the tutorial for creating a snap (Python apps). I’m working on a native ubuntu desktop 22.04 machine and I make use of a proxy server with IP and port 192.168.137.254:8080.
After cloning the “liquidctl” repo in my workspace I created a “snap” folder containing a “snapcraft.yaml” file, identical to the one shown in the tutorial, into the root of the package.
Then I ran the command “snapcraft”, but, after around 70 sec of “creating new base instance from remote…”, it fails issuing the following error:
craft-providers error: Timed out waiting for networking to be ready.
Hereafter the log is shown:
2024-02-02 11:16:46.609 Executing on host: lxc --project snapcraft config set local:base-instance-snapcraft-buildd-base-v40--fd08e731c976fdc7c5bc user.craft_providers.timer 2024-02-02T10:16:46.609452+00:00
2024-02-02 11:16:46.696 Set instance timer to '2024-02-02T10:16:46.609452+00:00'
2024-02-02 11:16:46.797 Executing in container: lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v40--fd08e731c976fdc7c5bc -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 http_proxy=http://192.168.137.254:8080/ https_proxy=http://192.168.137.254:8080/ no_proxy=localhost,127.0.0.0/8,::1 getent hosts snapcraft.io
2024-02-02 11:16:46.823 craft-providers error: Timed out waiting for networking to be ready.
2024-02-02 11:16:46.823 Full execution log: '/home/automation/.local/state/snapcraft/log/snapcraft-20240202-111539.362869.log'
It might be useful to know that I’ve already specified the proxy server within the snap environment, through the commands:
sudo snap set system proxy.https="http://192.168.137.254:8080"
sudo snap set system proxy.http="http://192.168.137.254:8080"
Does somebody know what the problem is? If the answer is yes, how can I solve this?
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
parts:
gnu-hello:
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
plugin: autotools
Running snapcraft -v gives:
Starting Snapcraft 8.0.2
Logging execution to '/home/dancrumb/.local/state/snapcraft/log/snapcraft-20240203-172840.342932.log'
Running on amd64 for amd64
Launching instance...
Creating new instance from remote
Creating new base instance from remote
craft-providers error: Timed out waiting for networking to be ready.
Full execution log: '/home/dancrumb/.local/state/snapcraft/log/snapcraft-20240203-172840.342932.log'
I see snapcraft is passing http_proxy, https_proxy, and no_proxy to the LXD container (3rd line of your log file).
Where did you execute the sudo snap set system proxy.http... commands? On your host or inside the LXD instance? Snapcraft sets those inside the LXD instance automatically.
And @dancrumb is correct about Docker interfering with iptables and causing network issues for LXD. Do you happen to have Docker installed?
I haven’t seen snapcraft fail on the lxc --project snapcraft info command before. If you happen to have full logs, will you please provide them? Thanks
Hello, thank you for the feedback everybody, I kind of solved the problem by changing workstation. The pc I currently work on doesn’t have any proxy server (or firewall) configured and now everything is working fine