title: FOLLOW UP anchor:1 Uncaught (in promise) ReferenceError Recaptcha
body: <p>This is a follow up to my <code>Recaptcha call back can be found when it is the only function but not when other ones are included</code>.</p>
  <p>Here is the link: <a href="https://stackoverflow.com/questions/70776103/recaptcha-call-back-can-be-found-when-it-is-the-only-function-but-not-when-other">Recaptcha call back can be found when it is the only function but not when other ones are included</a></p>
  <p>Now I am not getting an error where ReCaptcha cannot find the callback function but instead I am getting this error: <code>anchor:1 Uncaught (in promise) ReferenceError</code></p>
  <p>Here is a picture:
  <a href="https://i.stack.imgur.com/BCsfZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BCsfZ.png" alt="enter image description here" /></a></p>
  <p>When you click on <code>anchor:1</code>, it takes you to a page which I guess is where the ReCaptcha checkbox is hosted.</p>
  <p>Here is a picture:
  <a href="https://i.stack.imgur.com/Qc3Tl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qc3Tl.png" alt="enter image description here" /></a></p>
  <p>This was the URL <code>https://www.google.com/recaptcha/api2/anchor?ar=1&amp;k=I_SUPPOSE_THIS_IS_SITE_KEY&amp;hl=en&amp;v=TDBxTlSsKAUm3tSIa0fwIqNu&amp;size=normal&amp;cb=52k0t5ji16jq</code></p>
  <p>That is how I know this has something to do with ReCaptcha...</p>
  <p>Here is my code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Jerry Bot Verication&lt;/title&gt;
          &lt;script src="https://www.google.com/recaptcha/api.js" async defer&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          
  
          &lt;form action="?" method="post" class="recaptchaDIV"&gt;
              &lt;div class="g-recaptcha" data-callback="onloadCallback" data-sitekey="MY_SITE_KEY_WAS_HERE"&gt;&lt;/div&gt;
          &lt;/form&gt;
  
          &lt;script type="text/javascript"&gt;
              function onloadCallback() {
                  addPerson();
              }
          &lt;/script&gt;
  
          &lt;script type="module"&gt;
  
              window.addPerson = addPerson;
  
              const queryString = window.location.search;
              const urlParams = new URLSearchParams(queryString);
              const userVar = urlParams.get('user')
  
              userVarSplitted = userVar.split('#')
              userVarFormatted = userVarSplitted[0] + ":" + userVarSplitted[1]
  
              // Import the functions you need from the SDKs you need
              import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.4/firebase-app.js";
              import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.6.4/firebase-analytics.js";
              import { getDatabase } from "firebase/database";
              // 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
              // For Firebase JS SDK v7.20.0 and later, measurementId is optional
              const firebaseConfig = {
                  #firebase config
              };
  
              // Initialize Firebase
              const app = initializeApp(firebaseConfig);
              const analytics = getAnalytics(app);
              const db = getDatabase();
  
              function addPerson() {
                  set(ref(db, "verified/" + userVarFormatted), {
                      name: userVarSplitted[0],
                      discriminator: userVarSplitted[1]
                  });
  
                  console.log("added")
              }
          &lt;/script&gt;
  
          &lt;style&gt;
              html, body{
                  height: 100%;
              }
              body{
                  display: flex;
                  background: #fff;
                  padding: 0px;
                  margin: 0px;
              }
              .recaptchaDIV{
                  margin: auto;
              }
          &lt;/style&gt;
      &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Do you know what's happened?</p>
  <p>Thanks</p>