Consistent error when using apt on Ubuntu 20.04

Bitrise Build Issue Report template

Description of the issue

Every build fails when trying to use apt to install a package or add a ppa repo;

+ add-apt-repository --yes ppa:rpardini/adoptopenjdk
Ign:1 https://deb.nodesource.com/node_12.x focal InRelease
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:3 https://download.docker.com/linux/ubuntu focal InRelease
Err:4 https://deb.nodesource.com/node_12.x focal Release
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 104.124.58.145 443]
Get:5 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
Get:6 http://packages.cloud.google.com/apt cloud-sdk InRelease [6,739 B]
Hit:7 http://archive.ubuntu.com/ubuntu focal InRelease
Get:9 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:10 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu focal InRelease
Get:11 https://dl.yarnpkg.com/debian stable/main all Packages [10.5 kB]
Get:12 http://packages.cloud.google.com/apt cloud-sdk/main i386 Packages [153 kB]
Get:13 https://dl.yarnpkg.com/debian stable/main i386 Packages [10.5 kB]
Get:14 https://dl.yarnpkg.com/debian stable/main amd64 Packages [10.5 kB]
Get:15 http://packages.cloud.google.com/apt cloud-sdk/main amd64 Packages [190 kB]
Get:16 http://ppa.launchpad.net/rpardini/adoptopenjdk/ubuntu focal InRelease [18.1 kB]
Get:17 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [580 kB]
Get:8 https://packagecloud.io/github/git-lfs/ubuntu focal InRelease [24.4 kB]
Get:18 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [794 kB]
Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,133 kB]
Get:20 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [358 kB]
Get:21 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [628 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:22 https://packagecloud.io/github/git-lfs/ubuntu focal/main amd64 Packages [2,012 B]
Get:24 https://packagecloud.io/github/git-lfs/ubuntu focal/main i386 Packages [1,986 B]
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [630 kB]
Get:26 http://ppa.launchpad.net/rpardini/adoptopenjdk/ubuntu focal/main amd64 Packages [11.1 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,082 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [794 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [681 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,580 kB]
Reading package lists...
E: The repository 'https://deb.nodesource.com/node_12.x focal Release' no longer has a Release file.

Environment:

Android / Ubuntu 20.04

Which build Step causes the issue and which version of the step?

Either the apt-get install “step”, or invoked apt in a “script” step

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : Every Time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Sep 30th

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( Bitrise CLI )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Build log

Interestingly, I am able to remote into the box and run the apt command successfully. The system requires you to use sudo. I confirmed using sudo in our build script doesn’t change the failure.

The solution mentioned in this thread worked for us in the meantime until a proper solution is applied: The certificate for deb.nodesource seems to be expired · Issue #1266 · nodesource/distributions · GitHub

sudo rm /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt
sudo update-ca-certificates

Can confirm the workaround works. But I think the proper solution is that Bitrise needs to roll an updated Ubuntu docker image with an updated ca-certificates package.

1 Like

Issue seems resolved, workaround can be removed

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.