Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

543
Views
Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=permission-denied]

I am getting the following error: Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=permission-denied]: Permission denied on resource project disneyplus-clone-a33d5.

I am learning React and the tutorial I am learning from uses firebase. I have very little knowledge about firebase. I cannot find any solution for this error. here is my fbconfig.js :

import { initializeApp } from 'firebase/app';
import { getAuth, GoogleAuthProvider } from "firebase/auth";
import { getStorage } from "firebase/storage";
import { getFirestore } from "firebase/firestore"

const firebaseConfig = {
  apiKey: "---",
  authDomain: "--.firebaseapp.com",
  projectId: "--",
  storageBucket: "--",
  messagingSenderId: "--",
  appId: "--",
  measurementId: "---",
};

const firebaseApp = initializeApp(firebaseConfig);
const db = getFirestore(firebaseApp);
const auth = getAuth();
const provider = new GoogleAuthProvider();
const storage = getStorage(firebaseApp);

export { auth, provider, storage };
export default db;

Here is my Home.js :

import db from '../fbconfig'
import { doc, onSnapshot, collection, query, where } from "firebase/firestore";

function Home() {

    useEffect(() => {
        const q = query(collection(db, "movies"))
        const unsub = onSnapshot(q, (snapshot)=>{
            let tempMovies = snapshot.docs.map((doc)=>{
                console.log(doc.data());
                return { id: doc.id, ...doc.data() }
            })
        });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

code=permission-denied when working with Firestore is always a permissions problem on the collection you are trying to read, in this case "movies". To set permissions on a collection you can use the Firebase web gui or the command line tools.

The specific rule you will need for read access to "movies" is

match /movies {
      allow get: if true;
      allow list: if true;

      allow update: if false;
      allow create: if false;
      allow delete: if false;
    }

https://firebase.google.com/docs/rules/manage-deploy

Or the web ui

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!