[Solved] Error: Certificate has expired

Same here. Fixed it. Thanks.

Oh my God! Thank you so much.
My meteor was completely dead, and obviously uninstalling and re-installing did no good.

I really wonder how that little vicious line ended up in that file…

My application was running fine in production. But all of a sudden I am getting “code”:“CERT_HAS_EXPIRED”. This is causing huge problem. Looking forward to help on this.

1 Like

Same here really hoping someone has a workaround

Hi, if you are in a Meteor version before 1.9 it runs old Node.js.

Node.js before 10 (and Meteor before 1.9) doesn’t include let’s encrypt’s newest root certificate: DST Root CA X3 Expiration (September 2021) - Let's Encrypt

A workaround, for now, is to run all the meteor commands with the following environment variable NODE_TLS_REJECT_UNAUTHORIZED, for example in the deploy command:

NODE_TLS_REJECT_UNAUTHORIZED=0 meteor deploy .....

We are investigating if we can find a better workaround for old Meteor versions.

14 Likes

Thank you for sharing the fix on such short notice. After setting the environment variable, the error is gone. Thanks again.

If your getting this error inside your app in runtime I believe this topic in the docs will be helpful to you Expired Certificates | Meteor API Docs

I just came across this with a custom kadira deployment connecting to meteor for oauth - I resolved it with NODE_EXTRA_CA_CERTS=[path to letsencrypt root] - this may not be practical for galaxy hosted apps, but works nicely if you have access to the file system of the server you’re deployed on, and is safer than disabling TLS entirely

@znewsham I’m curious, what you use for letsencrypt root?

I tried downloading the pem file from https://letsencrypt.org/certs/isrgrootx1.pem[1] and all I’m getting is the following error:

(node:2056) Warning: Ignoring extra certs from `/root/isrgrootx1.pem`, load failed: error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table

[1] it’s the self-signed version BTW

I went to meteor.com, clicked the padlock and I thought exported the root certificate. Though as I’m now thinking about it, it’s possible I actually exported meteors certificate. I’ll check that today, in any case, it fixed the issue while we work on upgrading

Hi @filipenevola, I use WSL instance to run the meteor app(v1.4) and getting this below errors. Any insights will be helpful.

While downloading webapp@1.3.12…: error: certificate has expired
While downloading webapp-hashing@1.0.9…:
error: certificate has expired

While downloading ziarno:restrict-mixin@0.0.4…:
error: certificate has expired

While downloading zimme:active-route@2.3.2…:
error: certificate has expired

=> Your application has errors. Waiting for file change.

That solution worked for me, thanks a lot!!

1 Like

This worked for me too, thanks a lot :smile: :raised_hands:

Hello, Where would you change environment variables in windows or does meteor have its own settings page for environment variables.?

I am using Meteor version 1.6.1.2, Node version 8.8.1.
I added in settings.json as following
galaxy.meteor.com”: {
“NODE_TLS_REJECT_UNAUTHORIZED” : “0”
}

And before running meteor, I run the command also.
set NODE_TLS_REJECT_UNAUTHORIZED=0
But
error: certificate has expired
always happen and cannot run this project.
And in the hosts file, there isn’t the entry 54.192.225.217 warehouse.meteor.com.
Please help me.

1 Like

Which OS are you using? Can you run it neither locally nor on Meteor Cloud?

I have same issue. Could anyone please help me to fix this issue?

1 Like

Hi @leostar, did you follow our instructions here?

1 Like

非常感谢,完美解决了我的问题,真的太棒了