BalenaOS v2.47.1+rev2 build from source: balena package fetcher error

Anyone seeing fetcher errors with the balena package when attempting to build BalenaOS v2.47.1+rev2? I’ve been seeing this over the last couple of days.

Here is the bitbake output:

$ bitbake resin-image-flasher
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
Loading cache: 100% |#######################################################################################################################################| Time: 0:00:01
Loaded 3414 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.40.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "beaglebone-green-wifi"
DISTRO               = "balena-os"
DISTRO_VERSION       = "2.47.1"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky            = "HEAD:cb26830f765f03309c0663352cc5849491271be8"
meta-oe
meta-filesystems
meta-networking
meta-python          = "HEAD:2d088d252624b19df384aecc434d23afb636178f"
meta-ti              = "HEAD:727411f95ef1f66034beac08702f21b30a1b84c9"
meta-balena-common
meta-balena-thud     = "HEAD:c6a9c9490c1ef8ef854b4afc96d4fcfae0c9928b"
meta-balena-beaglebone = "HEAD:a6efdd49f84c0e4e143251e94dba0b46eba2c852"
meta-rust            = "HEAD:c5ff05d1e99c1e80844c1673456e2368499918c7"

Initialising tasks: 100% |##################################################################################################################################| Time: 0:00:05
Sstate summary: Wanted 793 Found 0 Missed 793 Current 597 (0% match, 42% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: balena-18.09.10-dev+git7cb464a406748016f2df0c31a9851d20456a3d31-r0 do_fetch: Failed to fetch URL git://github.com/resin-os/balena.git;branch=master;destsuffix=git/src/import, attempting MIRRORS if available
WARNING: bindmount-0.0.1.AUTOINC+f597fb0266-r0 do_fetch: Failed to fetch URL git://git@github.com/resin-os/resinos-bindmount.git;protocol=ssh, attempting MIRRORS if available
ERROR: balena-18.09.10-dev+git7cb464a406748016f2df0c31a9851d20456a3d31-r0 do_fetch: Fetcher failure: Unable to find revision 7cb464a406748016f2df0c31a9851d20456a3d31 in branch master even from upstream
ERROR: balena-18.09.10-dev+git7cb464a406748016f2df0c31a9851d20456a3d31-r0 do_fetch: Fetcher failure for URL: 'git://github.com/resin-os/balena.git;branch=master;destsuffix=git/src/import'. Unable to fetch URL from any source.
ERROR: balena-18.09.10-dev+git7cb464a406748016f2df0c31a9851d20456a3d31-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/eric/workspace/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/balena/18.09.10-dev+git7cb464a406748016f2df0c31a9851d20456a3d31-r0/temp/log.do_fetch.9449
ERROR: Task (/home/eric/workspace/balena-beaglebone/build/../layers/meta-balena/meta-balena-common/recipes-containers/balena/balena_git.bb:do_fetch) failed with exit code '1'

I’ve seen this with both Ubuntu 16.04 and 18.04 build machines. Here’s how I’ve been setting up my workspace and kicking off the build:

sudo apt-get update
sudo apt-get install apt-transport-https  ca-certificates curl \ 
    gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

# add the docker user group and add the standard user
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker


sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 \
libegl1-mesa libsdl1.2-dev pylint3 xterm
sudo apt-get install npm jq
mkdir ~/workspace; cd ~/workspace/
git clone https://github.com/balena-os/balena-beaglebone
cd balena-beaglebone
git submodule update --init --recursive
git checkout v2.47.1+rev2 --recurse-submodules
./balena-yocto-scripts/build/barys -d --dry-run
source layers/poky/oe-init-build-env
# <edit build/conf/local.conf, enable the beaglebone-green-wireless machine, debug image, and image compression>
bitbake resin-image-flasher

Any input would be super helpful. I have been able to clone the balena repository and checkout the tag which the fetcher says it cannot find.

Can you work around the problem for the time being by doing a “bitbake balena -c cleansstate && bitbake resin-image-flasher” ?

Sorry, no need to do that, I just reproduced this issue

Created https://github.com/balena-os/meta-balena/pull/1911

Thanks for the quick response and PR.

I’ve cherry-picked the two commit locally, cleaned the sstates, and I am still seeing the same fetcher error. Except it references the new balena-engine URL instead of the old resin one. I see that the BalenaOS CI is failing, so I expect the build failure is happen on your side as well? If not, do you have any suggestions? Thank you!

Hi,

By “BalenaOS CI” do you mean balena-cli? If so, what version are you using?

Thanks,
John

Can you do a fresh clone of the repo and try a fresh build? Just to make sure we start from scratch. Also, after you clone the repo again, before you build it just “cd layers/meta-balena && git checkout master && git pull” and then start the new build

@floion Thanks. Pulling fresh and kicking off a new build allowed me to build.

@jtonello By BalenaOS CI I was referring the continuous integration Jenkins build.