Skip to content

Commit d8e9f88

Browse files
committed
Add FAQs section for common Firestore errors
1 parent 5f51293 commit d8e9f88

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

docs/integrations/firebase.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ To enable billing on your Firebase project, open the Firebase Console. On the pr
296296
<p></p>
297297

298298

299+
## FAQs
299300
<details>
300301
<summary> Why do cloud function deployments fail? </summary>
301302

@@ -324,4 +325,66 @@ Follow the steps below to fix the issue:
324325
With the required permissions granted and correct configurations, you should now be able to deploy cloud functions from Dreamflow without any issues.
325326
</p>
326327

328+
</details>
329+
330+
<details>
331+
<summary>
332+
Why do I see the error `[cloud_firestore/failed-precondition] The query requires an index`?
333+
</summary>
334+
335+
<p>
336+
This error occurs when Firestore needs a composite index to run your query, but the index has not been created yet.
337+
338+
When this error appears, it includes a link to the Firebase Console. Open that link, and it will redirect directly to the required index creation page in your Firestore project. Simply click **Save** to create the index.
339+
340+
After the index is built (this may take a few minutes), retry running your app. The query should now work without errors.
341+
342+
<div style={{
343+
position: 'relative',
344+
paddingBottom: 'calc(52.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
345+
height: 0,
346+
width: '100%'}}>
347+
<iframe
348+
src="https://demo.arcade.software/xJppTqks1wSl1xE5yw5p?embed&show_copy_link=true"
349+
title=""
350+
style={{
351+
position: 'absolute',
352+
top: 0,
353+
left: 0,
354+
width: '100%',
355+
height: '100%',
356+
colorScheme: 'light'
357+
}}
358+
frameborder="0"
359+
loading="lazy"
360+
webkitAllowFullScreen
361+
mozAllowFullScreen
362+
allowFullScreen
363+
allow="clipboard-write">
364+
</iframe>
365+
</div>
366+
<p></p>
367+
368+
</p>
369+
</details>
370+
371+
<details>
372+
<summary>
373+
Why do I see the error `[cloud_firestore/permission-denied] Missing or insufficient permissions on screen`?
374+
</summary>
375+
376+
<p>
377+
378+
379+
![missing-permission.avif](imgs/missing-permission.avif)
380+
381+
This error occurs when your app tries to read or write data in the Firestore Database without the correct security rules in place.
382+
383+
To fix this:
384+
385+
- **Redeploy rules:** Go to the Firebase panel in Dreamflow and [**redeploy**](#4-deploy-to-firebase) your Firestore security rules.
386+
- **Update rules if needed:** If your current rules are incorrect (e.g., don’t match your app’s data model or intended access control), you need to update them. You can edit the rules manually in the `firestore.rules` file or update them using the Dreamflow Agent, and then [**redeploy**](#4-deploy-to-firebase) to apply the changes.
387+
388+
Once the correct rules are applied, the error should no longer appear when adding or retrieving data.
389+
</p>
327390
</details>
29.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)