# Studio does not connect to firestore database

**URL:** https://community.firebasestudio.dev/t/studio-does-not-connect-to-firestore-database/12438
**Category:** General
**Created:** [May 17, 2025, 1:23am UTC](https://community.firebasestudio.dev/t/studio-does-not-connect-to-firestore-database/12438 "2025-05-17T01:23:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ashton\_Bengtson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/ashton_bengtson/32/6370_2.png) [@Ashton\_Bengtson](https://community.firebasestudio.dev/u/Ashton_Bengtson)
#### Post date: [May 17, 2025, 1:23am UTC](https://community.firebasestudio.dev/t/studio-does-not-connect-to-firestore-database/12438/1 "2025-05-17T01:23:03Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Ashton\_Bengtson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/ashton_bengtson/32/6370_2.png) [@Ashton\_Bengtson](https://community.firebasestudio.dev/u/Ashton_Bengtson)
#### Post date: [May 18, 2025, 3:38pm UTC](https://community.firebasestudio.dev/t/studio-does-not-connect-to-firestore-database/12438/2 "2025-05-18T15:38:55Z")

</div>

I fixed it and I’m gonna reply in case anyone has the same issue in the future.

1. 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.
2. 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.

---

<div class="post-metadata">

### Author: ![Andrija](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/andrija/32/4475_2.png) [@Andrija](https://community.firebasestudio.dev/u/Andrija)
#### Post date: [May 19, 2025, 4:35pm UTC](https://community.firebasestudio.dev/t/studio-does-not-connect-to-firestore-database/12438/3 "2025-05-19T16:35:16Z")

</div>

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)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/idxcommunity/original/2X/7/747c8de24cec1f7408306539d96cc5da76fa4a37.png)

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.

---

<div class="post-metadata">

### Author: ![Ashton\_Bengtson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/ashton_bengtson/32/6370_2.png) [@Ashton\_Bengtson](https://community.firebasestudio.dev/u/Ashton_Bengtson)
#### Post date: [May 19, 2025, 6:22pm UTC](https://community.firebasestudio.dev/t/studio-does-not-connect-to-firestore-database/12438/4 "2025-05-19T18:22:29Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Andrija](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/andrija/32/4475_2.png) [@Andrija](https://community.firebasestudio.dev/u/Andrija)
#### Post date: [May 20, 2025, 10:31am UTC](https://community.firebasestudio.dev/t/studio-does-not-connect-to-firestore-database/12438/5 "2025-05-20T10:31:41Z")

</div>

Got it! Many thanks!!!
