Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Error. certificate has expired #2285

Closed
theTechGoose opened this issue Jan 12, 2020 · 23 comments
Closed

Server Error. certificate has expired #2285

theTechGoose opened this issue Jan 12, 2020 · 23 comments

Comments

@theTechGoose
Copy link

theTechGoose commented Jan 12, 2020

** Screenshots **

image

image

Expected behavior

I am running ng add @angular/fire and it should let me select a project from my firebase projects

Actual behavior

the terminal is saying: Server Error. certificate has expired

@theTechGoose
Copy link
Author

I'm having an issue with my ng add @angular/fire command and I think this might have something to do with it. below is a screenshot of me checking my login by running firebase login, it clearly says I'm logged in. then I run a deploy to firebase command and it says "🚨 You're not logged into Firebase. Logging you in..."

Date: 2020-01-12T23:18:12.366Z - Hash: 0398eefc1b5a238b8b7e - Time: 37932ms
🚀 Your application is now available at https://devinterface-78409.firebaseapp.com/
Raphaels-MacBook-Pro:devInterface raphael_castro$ firebase login
Already logged in as raphael@rcincorporated.net
Raphaels-MacBook-Pro:devInterface raphael_castro$ ng run devInterface:deploy
🚨 You're not logged into Firebase. Logging you in...
📦 Building "devInterface"
Browserslist: caniuse-lite is outdated. Please run next command npm update
I've reinstalled npm, firebase, angular/fire, and angular to try and resolve this issue; no dice. here is my angular versions:

Package Version

@angular-devkit/architect 0.803.20
@angular-devkit/build-angular 0.803.20
@angular-devkit/build-optimizer 0.803.20
@angular-devkit/build-webpack 0.803.20
@angular-devkit/core 8.3.20
@angular-devkit/schematics 8.3.20
@angular/cdk 8.2.3
@angular/cli 8.3.20
@angular/fire 5.2.3
@angular/material 8.2.3
@ngtools/webpack 8.3.20
@schematics/angular 8.3.20
@schematics/update 0.803.20
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2

@theTechGoose
Copy link
Author

Edit, I changed the time on my system to before this started happening and it fixed the issue, how do I put the correct time on my system and still have angular/fire work?

@theTechGoose
Copy link
Author

January 5th 2020 seems to be the last day that I can use the ng add @angular/fire command

@Jean-OIKONOMOU
Copy link

Guess we'll have to do it all manually then. Here's a little tutorial about how to make your Angular app into a PWA, then just host that on FIrebase, more lengthy but at least you learn more I guess ?
https://itnext.io/build-a-production-ready-pwa-with-angular-and-firebase-8f2a69824fcc
https://www.todesktop.com/
https://developers.google.com/web/progressive-web-apps/desktop

@wSedlacek
Copy link

Isn't Firebase Tools up to versions 7.12.1 maybe updating from version 6.10.0 would resolve this issue?

@theTechGoose
Copy link
Author

theTechGoose commented Jan 18, 2020

hmmmmm.... maybe I'm missing something; here is my firebase version, where does it say firebase is version 6.10.0?

image

maybe @angular fire has a different version of firebase tools its using?

@wSedlacek
Copy link

From what I can tell from the package.json, yes.
https://github.com/angular/angularfire/blob/master/package.json#L46

I can confirm I am having the same issue with ng add @angular/fire I haven't found any other work arounds or solutions other then what you had mentioned about rolling back the clock.

From what I could gather from the the source code and behavior the issue seems to be coming from the this block of code for listing the projects, however I could be wrong.
https://github.com/angular/angularfire/blob/master/src/schematics/utils.ts#L5-L11

Given that it is pretty simple and it seems like this is a HTTPS cert expiring the only conclusion I could draw is maybe the older version of firebase-tools in the package.json had a cert that expired on either January 5th or 6th 2020.

I did attempt for force the project to resolve a newer version of firebase-tools using resolutions in package.json with yarn. However that did not yield any results.

I would definitely like if someone took a look at this when they got a chance. It likely will be a quick fix of updating a package or cert somewhere given that just rolling back the clock makes it work correctly.

@theTechGoose
Copy link
Author

the roll back the clock solution only works for a month or so, its says your credentials are no longer valid, anyone have anything new?

@mbleigh
Copy link

mbleigh commented Jan 23, 2020

I'm not super familiar with AngularFire but I'm pretty sure I found the issue. It's here:

return firebase.list().catch(

firebase.list() is a deprecated command and the backend it talks to has been decommissioned. This should be changed to firebase.projects.list() instead (the response signature may have changed a bit as well).

/cc @davideast @jamesdaniels

@theTechGoose
Copy link
Author

@alan-agius4

@jamesdaniels
Copy link
Member

@mbleigh thanks! I'll get on that.

@AdrienVictor
Copy link

Any update on fixing the issue? I was trying to get a small pwa ready to deploy on firebase but I also get the error: "Server Error. certificate has expired".

Does anyone know a fix or workaround? I'm just starting with angular so I don't know too much about it yet :).

@theTechGoose
Copy link
Author

try rolling your clock back to January 4th

@AdrienVictor
Copy link

try rolling your clock back to January 4th

Just to be sure, you are talking to my os clock right ? So setting my windows clock back to January 4th?

Or did you mean something else 😁. In that case I'd like to know how to do it.

@theTechGoose
Copy link
Author

roll the os clock back to January 4th, use the ng add command, put it back on the right day; this stopped working for me but its possible that it works for you.

@AdrienVictor
Copy link

roll the os clock back to January 4th, use the ng add command, put it back on the right day; this stopped working for me but its possible that it works for you.

So I did manage to install @angular/fire using your method, thanks a lot.
BUT now I have another error when trying to deploy and I have no idea what to do about it.

image

I have no idea what happens here, do you know what is the issue? I am a bit lost here. I have the file firebaserc in my directory.

Can you help me again?

@Splaktar
Copy link
Member

Splaktar commented Jan 26, 2020

@AdrienVictor that 2nd issue appears to be a separate issue. Can you please open a new issue with reproduction steps?

Edit: that appears to be a known issue (#2088) that was just fixed in PR #2279. The fix should be in the next release.

@jamesdaniels
Copy link
Member

jamesdaniels commented Jan 29, 2020

I've addressed the ng add error in the version 6 branch, I will cherry pick and release a patch tomorrow eafa16e

thanks for pointing me in the right direction @mbleigh

@lovetodream
Copy link

I am experiencing the same issue, any updates?

@theTechGoose
Copy link
Author

I uninstalled and reinstalled angular fire, the changes seem to be in the git repository but not in downloading when I run sudo npm install @angular/fire --save @jamesdaniels

@jamesdaniels
Copy link
Member

Sorry, got sidetracked working on the 6.0 rc; I'll get a patch out for the stable version.

@jamesdaniels
Copy link
Member

This has been fixed in 5.3.1

@sylvesterdas
Copy link

npm uninstall @angular/fire 
ng add @angular/fire

worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants