Leonard Kee
Leonard Kee

Reputation: 21

@firebase/firestore: Firestore (8.3.3): Could not reach Cloud Firestore backend

After having added eslint and not having changed code, I ran my application that was working perfectly fine yesterday. I ended up getting the following error:

[2021-04-09T04:47:33.960Z]  @firebase/firestore: Firestore (8.3.3): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=invalid-argument]: 3 INVALID_ARGUMENT: Invalid resource field value in the request.
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.

I saw some other stackoverflow posts and github issues as well, and most seem to have encountered the same issue before. I've attempted some of the proposed solutions - downgrading firebase, checking my internet, etc - and nothing seems to do the trick.

Upvotes: 1

Views: 764

Answers (1)

Rod
Rod

Reputation: 41

(Edit — TLDR: If you're seeing this error, double check that the server config vars in your code match your runtime vars in nuxt.config.ts match your .env match the Firebase Project Settings)

Thanks, this helped me resolve the same error code in my app as yours. I looked into my server config and realized I didn't have all the Firebase config vars from Firebase Project Settings in my project's runtime config (nuxt.config.ts and .env file).

Was not easy to figure this out so I hope the info helps someone. It resolved that error for me, but now I'm getting code=permission-denied 7 PERMISSION_DENIED error instead so 🤷

Good luck!

Upvotes: 1

Related Questions