Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

435
Vistas
Uncaught (in promise) FirebaseError: Expected type 'wc', but it was: a custom mc object

The error appears on line 49! I've already looked to see if it was a spare key and apparently it isn't... I've tried to add a key and I couldn't either, I've tried to put ; And it didn't work either, I don't know what else to try...

I can't find the error at all and I didn't find help with similar errors...

Thanks in advance for your help!

<script type="module">
  // Import the functions you need from the SDKs you need
  import { initializeApp } from "/firebase-app.js";
  import { getFirestore, doc, setDoc, getDoc, collection, addDoc, query, where } from "/firebase-firestore.js";
  // TODO: Add SDKs for Firebase products that you want to use
  // https://firebase.google.com/docs/web/setup#available-libraries

  // Your web app's Firebase configuration
  const firebaseConfig = {
    apiKey: "",
    authDomain: "",
    projectId: "",
    storageBucket: "",
    messagingSenderId: "",
    appId: ""
  };

  // Initialize Firebase
   const app = initializeApp(firebaseConfig);
   const db = getFirestore(app);

   const q = query(collection(db, "pacientes"));
   const x = query(q, where("cpf", "==", true));

async function GetADocument(){
   const querySnapshot = await getDoc(x);
   const docSnap = await getDocs(querySnapshot);

   querySnapshot.forEach((doc) => {
     then(docSnap.exists(pesquisa = cpf))
    nome.value = docSnap.data().nome;
    endereco.value = docSnap.data().endereco;
    bairro.value = docSnap.data().bairro;
    cidade.value = docSnap.data().cidade;
    uf.value = docSnap.data().uf;
    cep.value = docSnap.data().cep;
    rg.value = docSnap.data().rg;
    cpf.value = docSnap.data().cpf;
    nascimento.value = docSnap.data().nascimento;
    tel.value = docSnap.data().tel;
    cel.value = docSnap.data().cel;
    titulo.value = docSnap.data().titulo;
    zona.value = docSnap.data().zona;
    secao.value = docSnap.data().secao;
    pai.value = docSnap.data().pai;
    mae.value = docSnap.data().mae; 
    cath 
    alert("usuário não encontrado");
    
   });
} // line 49

btnbuscar.addEventListener("click", GetADocument);
</script>
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda