nodejs-docker: Error installing node.js: The Node.js binary could not be verified.
When I run the build I receive the following error:
Sending build context to Docker daemon 75MB
Step 1/15 : FROM launcher.gcr.io/google/nodejs
---> d8132d024114
Step 2/15 : RUN install_node v12.16.2
---> Running in 80fefff9837f
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22.0M 100 22.0M 0 0 8969k 0 0:00:02 0:00:02 --:--:-- 8969k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4029 100 4029 0 0 11964 0 --:--:-- --:--:-- --:--:-- 11991
gpg: Signature made Wed Apr 8 19:22:22 2020 UTC using RSA key ID 5599653C gpg: Can't check signature: public key not found
The Node.js binary could not be verified.
This means it may not be an officially released Node.js binary
or may have been tampered with.
Aborting the installation.
The installation can be forced using the --ignore-verification-failure
flag. However, it is strongly recommended that you install a version
of Node.js that can be verified.
Node installation failed: /opt/gcp/runtime/bootstrap_node exited with a non-zero exit code: 1
The command '/bin/sh -c install_node v12.16.2' returned a non-zero code: 1
I have the following configuration:
# Dockerfile extending the generic Node image with application files for a
# single application.
FROM launcher.gcr.io/google/nodejs
# Check to see if the the version included in the base runtime satisfies
# '>=8.12.0', if not then do an npm install of the latest available
# version that satisfies it.
# RUN /usr/local/bin/install_node '>=12.13.0'
RUN install_node v12.16.2
When I do what is suggested it installs the node:
RUN install_node v12.16.2 --ignore-verification-failure
but clearly there is a problem somewhere.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 70 (6 by maintainers)
Commits related to this issue
- Bugfix for GAE deployment * There is a bug with the latest LTS `14.17.0` during cloud-build for GAE Flex, so fallback to the latest, working version of NodeJS. * See here: https://github.com/GoogleC... — committed to icmaa/vue-storefront by cewald 3 years ago
- Bugfix for GAE deployment (#655) * There is a bug with the latest LTS `14.17.0` during cloud-build for GAE Flex, so fallback to the latest, working version of NodeJS. * See here: https://github.com/... — committed to icmaa/vue-storefront by cewald 3 years ago
- Update latest key for Danielle Adams GPG key for Danielle Adams have been changed in https://github.com/nodejs/node/pull/36793. Because of that, installing latest node versions gets an error as repo... — committed to takayukioda/nodejs-docker by takayukioda 3 years ago
- Adding Danielle Adam's latest key as noted in https://github.com/nodejs/node/pull/36793 Deprecate her old key as DanielleAdamOld Updated the keyserver from "pool.sks-keyservers.net" -> "hkp://pgp.mit... — committed to louisgv/nodejs-docker by louisgv 3 years ago
- Adding Danielle Adam's latest key as noted in https://github.com/nodejs/node/pull/36793 (#225) Deprecate her old key as DanielleAdamOld Updated the keyserver from "pool.sks-keyservers.net" -> "hkp... — committed to GoogleCloudPlatform/nodejs-docker by louisgv 3 years ago
I confirm: Node
14.17.0
is having that same issue. Note: Node14.16.0
works fine.The issue is possibly that the KEYS file in this repository has not been updated to contain @danielleadams’s new key (updated in January, https://github.com/nodejs/node/pull/36793).
The Node.js project has recently started to maintain https://github.com/nodejs/release-keys/tree/main/keys as a source of truth for our release keys, which might be a useful resource for keeping this repository in sync with Node.js key updates.
FYI, fix is almost ready. We plan to release it to prod tomorrow 4/5/2022.
Any releases signed by @danielleadams’s key will not verify until the keys are updated in this repository, which include the latest security releases released on 2021-10-12 (v12.22.7, v14.18.1, and v16.11.1).
How is this still an issue, trying to use node v16 and getting this, trying to use node LTS v18 and getting glib errors https://github.com/GoogleCloudPlatform/buildpacks/issues/198
almost impossible to use app engine for anything critical these days
@jinglundong
Thanks for sharing.
We’ve used that pinned solution in the past and have, indeed, already deployed such a fix today.
I recognize that this isn’t your problem per se, but I do want to explicitly point out the fact that a recommendation to fix a deployment issue in one Google Infrastructure component actually introduces a new issue in a separate Google infrastructure component.
Google Cloud Functions deployments will raise an error if a
package.json
when engine is not a whole number (anything other than 12,14,16, etc…) … but the solution recommended here requires specifying an engine value other than the above (e.g. 16.17.1).The result is that, without additional work, app engine deploys succeed and function deployments fail. This is in a monorepo where splitting the systems is impractical, even if possible.
To support both, our build systems basically do a
sed
to modify the pinned version for AppEngine to just a whole number for Functions.In any case, thansk for hearing me out.
We really appreciate the work y’all do to keep GCP stable and performant.
It should probably remain open until ongoing fix is found. On Fri, 3 Dec 2021 at 12:50, Oleksii Kachan @.***> wrote:
Same as what @brunogabuzomeu said, we tempoarily solved it by using
=16.10.0
which still works.tl;dr: I can take a look at the new key and probably update it. To mitigate the problem, please pin it to the previous patch version of Node.js 16.17.x or Node.js 16.17.1. https://nodejs.org/en/download/releases/
I haven’t looked into the exact problem, but I’d suspect that it’s broken because there’s a new pgp key in Node.js 16.18. This means our builder (or nodejs itself) is not entirely backward compatible between minor version upgrades.
This is a known issue where we don’t really have a short term automation on our side. The best option in to pin to a patch version of nodejs version. Because new pgp keys are getting added along with new patch version of nodejs. We don’t have a way to detect that, or block anyone from picking it up immediately when they have something like 16.x.
We are still working on a project to improve our build system. Once that’s complete, we should be able to control this behavior - we will qualify the new minor or patch version before the builder using it.
This started failing again today for node 16.x. Observed that node published a release circa 11AM today.
What can we do to be insulated from this error without having to pin versions in our application itself?
Occurring in GAE flex again with
14.x
set.Edit: setting the package engine version to the last successfully deployed version (
14.6.1
) instead of14.x
works around the issue for now.Hello @plegner
in our case, it was the same as for @aiimtechdev.
We had broken deployment to App Engine because it installed Node 14.10.0 as we had
"node": "14.x"
in the package.json. Seems like the latest release has some issues.I fixed deploy by changing the engine to a fixed version:
If you are using 12.x - try some of the previous version that worked.
Obviously it does not solve the overall issue with the latest release but at least get things working.
Hope it will help!
Hi folks - We hit this issue as well with our NodeJS app engine deployment. We were running 16.x. Pinning did end up working at a pin of 16.17.x. For future devs that hit this issue, make sure you pin to the precise version -
16.17.x
NOT^16.17.x
Here’s a trace:
Experiencing this error today with Node 18.5.0.
Setting
14.18.0
works as a short term solution – unfortunately, if you are deploying, say, cloud functions from the same project,"engines": {"node": "14.18.0"}
is invalid according to a separate Google technology platform.In addition to my signing key, whoever maintains this repository may also want to add the keys for @ruyadorno (https://github.com/nodejs/node/pull/34628) and @danielleadams (https://github.com/nodejs/node/pull/35545) who have also been recently onboarded as releasers and may sign future releases: https://github.com/nodejs/node/blob/master/README.md#release-keys
@jinglundong is there any reason why it would not even try and run an install of the node version specifed in the package.json? We have our engine specified and have tried pinning to 16.17.1 but it doesn’t even attempt an install. Please see the output below:
We updated the key at https://github.com/GoogleCloudPlatform/nodejs-docker/pull/254 and https://github.com/GoogleCloudPlatform/nodejs-docker/pull/256. I verified this in prod with a 16.x app that got resolved to 16.18.1. Please let us know if you have any other questions.
To be clear, this doesn’t solve the problem of 18.x. Node.js 18 support requires a bigger effort. We have it planned in the first half of 2023.
I experienced this issue today. I couldn’t see which version the system was attempting to install anywhere in the logs.
In the failing case, I saw:
Looking at the signature date of Sep 23rd and our restriction to Node 14.x, we can infer that it’s
14.20.1
as it was released on that day, but it would have been helpful if the logs showed which version was being attempted. Better yet, it would be helpful if the system didn’t try to use unsupported versions at all.For reference, in a successful installation (package.json engine version restricted to 14.19), the immediate next step shows the full installed version number:
Is there an explicit list of which specific minor versions of Node aren’t going to trigger this problem?
That is correct. I’m listing a few ideas below following my preferred order, but I haven’t had a chance to figure out the details. Please advice if anyone has better solutions.
Just to note, this is going to have to be re-opened the next time a new GPG key is added, the problem wasn’t solved.
@jinglundong I have almost the same configuration:
@niciliketo the 😕 was for the maintainers, sorry. Disappointing this hasn’t been taken care of yet?
I am sseing a similar issue for 16.4.x It seems to have started from 2022-03-26
@geiszla your issue seems irrelevant to this issue. The fix mentioned in above is about using latest version fails due to GPG key mismatch.
Your issue is about mismatch of runtime node version and engine version specified in package.json.
works for me now with 14.18.2. I think this issue is good to close
@chiefy ah, thanks a lot! I haven’t check repository close enough 🤦🏽♂️ I’ll keep in my mind in case we have next update.
@pete-beresford-bzy, Hmm…I extended my key back in March but it seems it hasn’t properly propagated/synced with the servers - I’ll try resyncing/resubmitting.
I’ve the same problem using Google App Engine Flex & Standard: if I downgrade to
14.16.x
using"engines": { "node": "14.16.x" }
in mypackage.json
I’d work but if I deploy the package in another environment using the standard environment it would again result in an error-message because of the wrong version:So this should be updated in both environments.
This error also occurs with the latest release of Node 10
10.23.0
which was released by @richardlau. His signing key is missing in the KEYS file https://github.com/GoogleCloudPlatform/nodejs-docker/blob/master/runtime-image/contents/KEYS, it was added back in july in the Node repo https://github.com/nodejs/node/pull/34397/files