The Cloud Firestore API is not available for Firestore in Datastore Mode database.

94 views
Skip to first unread message

KINGSLEY DARKO ASOMANING (NANA DARKO)

unread,
Mar 1, 2024, 4:04:22 AMMar 1
to Angular and AngularJS discussion
I have an angular 8 app integrated into firebase chat which uses Datastore Mode database. I am integrating the same chat into an angular 13 app but the new angular/fire library uses firstore API. I have done the necessary configurations but I get the following error when I try to retrieve messages.

Error:
Firestore (9.8.2): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=failed-precondition]: The Cloud Firestore API is not available for Firestore in Datastore Mode database projects/xyz/databases/(default).

Code:
loadMessages = (key: any): Observable<any[]> => {
  const parsePhrase = `/issue_chat/${key}/${key}`;
  const chatCollection = collection(this.firestore, parsePhrase);
  return collectionData(chatCollection);
};

My research shows that Firestore in Datastore Mode doesn't support the Cloud Firestore API, which is necessary for AngularFire to communicate with Firestore.

How do I go about this?
Reply all
Reply to author
Forward
0 new messages