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

Service account does not recognize project_id #38

Open
vicdotdevelop opened this issue Oct 22, 2021 · 5 comments
Open

Service account does not recognize project_id #38

vicdotdevelop opened this issue Oct 22, 2021 · 5 comments

Comments

@vicdotdevelop
Copy link

Hey,

I wanted to use your library to upload a json with an auto-generated id to firestore.
As I was using firestore-import-export and it worked quite well, I wanted to switch over to this lib, as it has the auto-generated id.
Nevertheless, when I try to call initializeApp with the serviceAccount it says:

Error: Service account object must contain a string "project_id" property.

Even though it has this value in the serviceaccount.json file I have downloaded from firebase. It is also the same file that was working with the firestore-import-export lib.

any help :) ?

@dalenguyen
Copy link
Owner

One thing that I can think of is to manually add the project_id to the serviceAccount. Let me know if it works.

@vicdotdevelop
Copy link
Author

the project_id is actually in the serviceAccount.json file. @dalenguyen

@dalenguyen
Copy link
Owner

Does your serviceAccount.json look something like this?

image

@vicdotdevelop
Copy link
Author

Does your serviceAccount.json look something like this?

image

Yes it looks exactly like this

@dalenguyen
Copy link
Owner

Hi @victorblaess, it's hard to tell what happened. It would be great if you can share some snapshots of your project structure. The command & errors that occur. You can sensor sensitive information before posting.

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

2 participants