title: Uncaught (in promise) FirebaseError: Expected type 'wc', but it was: a custom mc object
body: <p>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...</p>
  <p>I can't find the error at all and I didn't find help with similar errors...</p>
  <p>Thanks in advance for your help!</p>
  <pre><code>&lt;script type=&quot;module&quot;&gt;
    // Import the functions you need from the SDKs you need
    import { initializeApp } from &quot;/firebase-app.js&quot;;
    import { getFirestore, doc, setDoc, getDoc, collection, addDoc, query, where } from &quot;/firebase-firestore.js&quot;;
    // 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: &quot;&quot;,
      authDomain: &quot;&quot;,
      projectId: &quot;&quot;,
      storageBucket: &quot;&quot;,
      messagingSenderId: &quot;&quot;,
      appId: &quot;&quot;
    };
  
    // Initialize Firebase
     const app = initializeApp(firebaseConfig);
     const db = getFirestore(app);
  
     const q = query(collection(db, &quot;pacientes&quot;));
     const x = query(q, where(&quot;cpf&quot;, &quot;==&quot;, true));
  
  async function GetADocument(){
     const querySnapshot = await getDoc(x);
     const docSnap = await getDocs(querySnapshot);
  
     querySnapshot.forEach((doc) =&gt; {
       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(&quot;usuário não encontrado&quot;);
      
     });
  } // line 49
  
  btnbuscar.addEventListener(&quot;click&quot;, GetADocument);
  &lt;/script&gt;
  </code></pre>