Balena-cli, balena-engine and SecretRemovalError

Tried to reduce complexity and executed balena-engine only on a simple Dockerfile which may hint about the issue since this produce “unexpected EOF”.

The output are as follows:

balena-engine build --file Dockerfile .
Sending build context to Docker daemon 50.18kB
Step 1/2 : FROM balenalib/intel-nuc-ubuntu:bionic
—> f111f749c49e
Step 2/2 : RUN apt-get update && apt-get install -y --no-install-recommends wget
—> Running in c1de4ef01e58
Get:1 Index of /ubuntu bionic-security InRelease [88.7 kB]
Get:2 Index of /ubuntu bionic InRelease [242 kB]
Get:3 Index of /ubuntu bionic-updates InRelease [88.7 kB]
Get:4 Index of /ubuntu bionic-backports InRelease [74.6 kB]
Get:5 Index of /ubuntu bionic-security/main amd64 Packages [649 kB]
Get:6 Index of /ubuntu bionic-security/multiverse amd64 Packages [4952 B]
Get:7 Index of /ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:8 Index of /ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:9 Index of /ubuntu bionic-security/universe amd64 Packages [766 kB]
Get:10 Index of /ubuntu bionic-security/restricted amd64 Packages [8385 B]
Get:11 Index of /ubuntu bionic/main amd64 Packages [1344 kB]
Get:12 Index of /ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:13 Index of /ubuntu bionic-updates/main amd64 Packages [946 kB]
Get:14 Index of /ubuntu bionic-updates/restricted amd64 Packages [19.0 kB]
Get:15 Index of /ubuntu bionic-updates/universe amd64 Packages [1284 kB]
Get:16 Index of /ubuntu bionic-updates/multiverse amd64 Packages [7998 B]
Get:17 Index of /ubuntu bionic-backports/main amd64 Packages [2496 B]
Get:18 Index of /ubuntu bionic-backports/universe amd64 Packages [4227 B]
Fetched 17.1 MB in 4s (4577 kB/s)
Reading package lists…
Reading package lists…
Building dependency tree…
Reading state information…
The following NEW packages will be installed:
wget
0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded.
Need to get 316 kB of archives.
After this operation, 954 kB of additional disk space will be used.
Get:1 Index of /ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2 [316 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 316 kB in 0s (1370 kB/s)
Selecting previously unselected package wget.
(Reading database … 7269 files and directories currently installed.)
Preparing to unpack …/wget_1.19.4-1ubuntu2.2_amd64.deb …
Unpacking wget (1.19.4-1ubuntu2.2) …
Setting up wget (1.19.4-1ubuntu2.2) …
unexpected EOF

balena-engine-eof.log (74.4 KB)

NOTE: I got a ubuntu 16.04.6, using balena-cli 11.9.3 and balena-engine 17.12.0 which works as expected.

I will try downgrade balena-engine to 17.12.0.