dalenguyen / firestore-import-export

An application that can help you to backup and restore from Cloud Firestore | Firebase
https://www.npmjs.com/package/firestore-export-import
401 stars 109 forks source link

invalid authentication credentials. #5

Closed umer7 closed 6 years ago

umer7 commented 6 years ago

i am getting this error

{ Error: 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential.

dalenguyen commented 6 years ago

Hi @umer7 , please describe the steps that you take and take a snapshot if it is possible.

umer7 commented 6 years ago

I followed all steps that you describe but i stuck at this error . Are there any prerequisite steps i need(i have previously deployed firebase functions ) Thanks in Advance err11

dalenguyen commented 6 years ago

Hi @umer7 , did you download your serviceAccountKey.json file from firebase and change your databaseURL?

[](// You should replace databaseURL with your own admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: "https://your-databaseURL.firebaseio.com" });)

umer7 commented 6 years ago

i have done both thing still have this error

dalenguyen commented 6 years ago

@umer7 not sure what happens. Could you please give this one a try?

https://github.com/dalenguyen/firestore-backup-restore

umer7 commented 6 years ago

Currently I am using Free Plan of Fire-base ...does it has any thing to do with that ?

dalenguyen commented 6 years ago

@umer7 It shouldn't have anything to do with that. Did the second method work?

birchb commented 6 years ago

I had a similar error response. I figured out that I had changed a parameter on my database, perhaps the public facing name or something.

Generating a new service key solved the problem.

dalenguyen commented 6 years ago

Hi @birchb , I'm glad that there are some methods to fix this :)