Skip to main content
Solved

Firebase Extension on a Project with Multiple Firestores

  • November 2, 2024
  • 3 replies
  • 69 views

Forum|alt.badge.img+2

Hey folks!

 

I have a Firebase setup where I have multiple Firestores in one project. I have enabled RevenueCat’s Firebase extension, but I’m not seeing the events being written to the DB. I presume this is due to the fact that I have multiple of these DBs. 

 

Handler function is being called but erroring with this below:

 

FAILED_PRECONDITION: The Cloud Firestore API is not available for Firestore in Datastore Mode database projects/{my_project}/databases/(default).

 

I’m not using the (default) DB to begin with. Is there any way to pass in my DB name here somehow?

Best answer by kaitlin

Hey @orcun,

Thanks for clarifying. In the case, I don’t believe we have a workaround for supporting more than one database or a database outside of the default one - I can definitely pass along this feedback to our team.

A possible work around could be to manually send RevenueCat webhook events to Firebase and the specific database you’d like the events in.

View original
Did this post help you find an answer to your question?
This post has been closed for comments

3 replies

kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 398 replies
  • November 6, 2024

Hey @orcun,

When you set your Cloud Firestore security rules, are you defining your database with the proper path?  https://www.revenuecat.com/docs/integrations/third-party-integrations/firebase-integration#set-your-cloud-firestore-security-rules

It’s optional, but you should be able to add the name of the collection where you’d like events to be stored and where you’d like collections to be stored as part of the installation process:

https://www.revenuecat.com/docs/integrations/third-party-integrations/firebase-integration#4-send-customer-information-to-firestore


Forum|alt.badge.img+2
  • Author
  • New Member
  • 1 reply
  • November 7, 2024

Thank you for the response @kaitlin! I have the rules and revenue cat collections set up properly!

 

The issue is that I have 2 databases in my firebase setup. I’m not using the (default) database that revenuecat expects. So I’m looking for an override for the expected DB name.

 


kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 398 replies
  • Answer
  • November 13, 2024

Hey @orcun,

Thanks for clarifying. In the case, I don’t believe we have a workaround for supporting more than one database or a database outside of the default one - I can definitely pass along this feedback to our team.

A possible work around could be to manually send RevenueCat webhook events to Firebase and the specific database you’d like the events in.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings