Does snapcraft Remote-build blocks outside request?

I have scripts that do staff from the internet for example wget to download files into my project.

Using snapcraft locally is working and the links to download the files are ok.

But when I use snapcraft Remote-build I am getting

Could not resolve URL “https://TheUrlThatIUsed…”

Does snapcraft Remote-build blocks outside request?.

Actual examples of the errors:
This is one:

It looks like is having some trouble.
Pub will wait for a while before trying to connect again.
Could not resolve URL “”.

This is other one:
Command: wget

Resolving (… failed: Name or service not known.
wget: unable to resolve host address ‘

I have found this post about “launchpad builds are limited to 120 minutes of network connectivity”, could it be the same cause?, and if that so, is there a fix for that?.

Moving the steps requiring network access to the start of the build should work.

It is currently like this:

    plugin: dump
    source: .
    override-build: |

      sudo scripts/bashScripts/  # Downloading dart-sdk for the correct architecture.

      cd scripts/bashScripts/
      ./ # Have to be executed when working directory is this file location
      cd ../..

      git clone
      cd WiringNP/
      chmod 755 build
      cd ..

      rm -r SmartDeviceDart

      snapcraftctl build

As you can see it is the first line in override-build part (./..../ and before the snapcraftctl build line.
If this is the “start of the build” than it does not work, if it is not where should I put it?.

The actual problem is that you run the script over sudo, which doesn’t preserve the proxy-related environment variables to allow network access.

As the build is already run as root dropping the sudo call should work.

Refer: Launchpad build fails with "Could not resolve ''"