bower: CERT_HAS_EXPIRED certificate has expired is thrown when I'm trying to update sinon package
Output of bower -v && npm -v && node -v:
C:\Users\daniel.ruse@cegeka.com\source\repos\Portals\CustomerAppNew> bower update sinon
bower sinon#* not-cached http://sinonjs.org/releases/sinon-1.17.6.0.js#*
bower sinon#* resolve http://sinonjs.org/releases/sinon-1.17.6.0.js#*
bower sinon#* download http://sinonjs.org/releases/sinon-1.17.6.0.js
bower sinon#^11.1.2 cached https://github.com/cjohansen/Sinon.JS.git#11.1.2
bower sinon#^11.1.2 validate 11.1.2 against https://github.com/cjohansen/Sinon.JS.git#^11.1.2
bower sinon#* CERT_HAS_EXPIRED certificate has expired
(paste your output here)
Additional environment details (proxy, private registry, etc.):
Steps to reproduce the issue:
Go to ‘cmd’ paste 'bower update sinon ’ Run See error CERT_HAS_EXPIRED Expected behavior Sinon update should be made without any error Describe the results you received:
Describe the results you expected: Sinon update should be made without any error
Additional information:

About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 40 (1 by maintainers)
Links to this issue
Commits related to this issue
- #1079 Workaround for bower/bower#2608 — committed to nemerosa/ontrack by dcoraboeuf a year ago
- Use alt bower registry - Workaround to https://github.com/bower/bower/issues/2608 — committed to CenterForOpenScience/osf.io by mfraezz a year ago
- Use alt bower registry - Workaround to https://github.com/bower/bower/issues/2608 — committed to yacchin1205/RDM2-osf.io by mfraezz a year ago
- Use alt bower registry - Workaround to https://github.com/bower/bower/issues/2608 — committed to RCOSDP/RDM-osf.io by mfraezz a year ago
- Use alt bower registry - Workaround to https://github.com/bower/bower/issues/2608 — committed to RCOSDP/RDM-osf.io by mfraezz a year ago
- Fix for bower SSL certificate problem https://github.com/bower/bower/issues/2608 — committed to spaceship-labs/actual-front by jipixz a year ago
- Fix for bower SSL certificate problem https://github.com/bower/bower/issues/2608 — committed to spaceship-labs/actual-front by jipixz a year ago
- Bower: disable `strict-ssl` I had to disable strict SSL on Bower due to an error with jQuery: https://github.com/bower/bower/issues/2608 I'm not sure if this is strictly required, but I'm creating a... — committed to readthedocs/readthedocs.org by humitos a year ago
- Bower: disable `strict-ssl` (#10370) I had to disable strict SSL on Bower due to an error with jQuery: https://github.com/bower/bower/issues/2608 I'm not sure if this is strictly required, but I'... — committed to readthedocs/readthedocs.org by humitos a year ago
- Use alt bower registry - Workaround to https://github.com/bower/bower/issues/2608 — committed to RCOSDP/RDM-osf.io by mfraezz a year ago
- Use alt bower registry - Workaround to https://github.com/bower/bower/issues/2608 — committed to RCOSDP/RDM-osf.io by mfraezz a year ago
- Use alt bower registry - Workaround to https://github.com/bower/bower/issues/2608 — committed to RCOSDP/RDM-osf.io by mfraezz a year ago
- Use alt bower registry - Workaround to https://github.com/bower/bower/issues/2608 — committed to RCOSDP/RDM-osf.io by mfraezz a year ago
When I added SSL disabling configuration
"strict-ssl": falseto .bowerrc file, everything fetched fine idk, something is wrong with the certificate 🙄Edited: (I don’t recommend this solution as production solution, disabling SSL can be dangerous, I did this just to check if the problem is with SSL)
We’re in a position where we can’t upgrade the application for various reasons, but instead of turning off ssl in
.bowerrcusing"strict-ssl": falsewe managed to solve it by pointing the registry to what I have now been told is a deprecated alternate mirror (thanks @wsergent)understand is the “new default” (someone please correct me here if I’m wrong, I read it somewhere but can’t remember where).Hi, I am getting “CERT_HAS_EXPIRED Request to https://registry.bower.io/packages/angular-aria failed: certificate has expired”. while doing bower install. Please suggest what could be the reason of it.
I found a workaround that was installing the bower with node 12, without changing my current version of node, running
npx -p node@12 bower install. Hope it helps!We brought it back to work by prefixing the following env-variable: NODE_OPTIONS=–use-openssl-ca
NODE_OPTIONS=--use-openssl-ca bower installAs to refer to https://github.com/bower/registry/issues/304#issuecomment-1520524290
Thank you for this solution, this worked for us for now, but I would treat it only as a temporary workaround (though better than disabling SSL). According to this tweet from 2017, bower.herokuapp.com was deprecated in favour of registry.bower.io - so I think you have your ‘new default’ understanding backwards.
Either way, it worked for now!
I’m having the same problem as well; is there any news on when the cert will be fixed?
Hello Guys,
The same problem here. It worked only by disabling “strict-ssl”: false in .bowerrc file but it doesn’t a good idea. Waiting for a better solution 😦
I’m curious. What are peoples reason for using Bower instead of NPM in 2023? Genuinely curious.
Adding SSL disabling configuration to .bowerrc file works for me.
Similar issue is open in the
bower/registryrepository: https://github.com/bower/registry/issues/304Yes, but not every system can be updated in a easy way, some companies strugle with daily problems and need to solv them to survive, int the ideal world the migration is easy and fast, but in reality the variables are greater.
Yes, well, I renamed the folder because I was scared of losing the files 😅
A $20 bounty has been put on this issue over at bountyhunt.io.
Top contributors:
What is this?
bountyhunt.io is an open source service that allows people to put bounties on issues, and allows bountyhunters to claim those bounties.
In a way, we’re helping people get paid for the open source work they do, and for people to live off of open source development.
Additionally, we help bring attention to the issues that matter most in the open source community.
This comment will only appear once ever, and will be modified if new bounties arrive, to reduce spam.
Hi,
Adding SSL disabling configuration to .bowerrc file works for me. It was not necessary add directory, in my project it is otherwise.
{ “registry”: “https://registry.bower.io”, “strict-ssl”: false }
Solution provided by @stormonster worked for me. Thank you!
bower installworks for newer versions of node.Only
bower installcommand I execute on the newer node (for example 12), and the rest of the commands for building the project I execute on the version I need.It worked for us.
@chhn03 I see that the Bower certificate was renewed on
Monday, 24 April 2023 at 03:43:54.bower installworks on my machine, but Bitbucket pipelines (dockerized) is failing with the sameCERT_HAS_EXPIREDerror. Still trying to figure out why the certificate isn’t renewed automatically there…Hi,
Thank you, I will test your solution.
I did it the way my friend went to release the Deploy.
@ffMathy legacy app, it’s being migrated to a new system. I gave the devs grief for not keeping these dependencies up to date though. 😉
@mchrapek any solution for this, except disabling SSL?
Yes, it still works after that: