Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

553
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda