The error I get is this: @firebase/firestore: “Firestore (11.7.1): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: The operation could not be completed\nThis 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.”
However, when I publish the app, the app is able to write to the database just fine. How do I get it to connect correctly in firebase studio so that I can test it properly? My Internet connection is fine.
I fixed it and I’m gonna reply in case anyone has the same issue in the future.
- Ensure you’re not trying to run on emulators. Studio defaulted to emulators on mine and I didn’t realize, but you obviously can’t access your live data on an intentionally mock-up emulator.
- Indexes - if you’re trying to retrieve a composite index (several data elements as one item) you need to create it yourself. Studio can’t make it automatically, and it may try to reference it without it actually existing. It is a tab within firestore.
Ashton, many thanks in providing a solution as well!!!
I am getting this error when I try to make a section where people would log in (with Firebase Authentication)
I am just wondering if that was the issue you had?
Also is the error message you quote above from the server logs? If so, Would you know where to find those? I have seen people mentioned server logs can be presented in Terminal but I can not seem to find the way to do it.
Hi Andrija!
That is not the same issue I had. I have not seen that error before so you may want to start a new topic if you need help for that. As for the terminal, you can access it by viewing the code. Click on the </> button (Next to the publish button), and on the side panel of the screen, where it shows the three lines, click on that and the terminal should be an option. Hope this helps!