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

429
Views
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
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!