title: Firebase Sign In With Email fails without providing an error
body: <p>In my JavaScript Firebase application, I have tried to set up user authentication via email, and at the same time sync user data to Firebase's realtime database. While our Google sign in worked with no problems, the function that makes accounts, <code>firebase.auth().createUserWithEmailAndPassword(email, password);</code> fails to execute and (annoyingly) does not throw any error messages. Here is the code:
  main.js: (The problematic section is submitAcc())</p>
  
  <pre><code>var config = {
      apiKey: "censored",
      authDomain: "censored",
      databaseURL: "censored",
      projectId: "censored",
      storageBucket: "censored",
      messagingSenderId: "censored"
  };
  firebase.initializeApp(config);
  var database = firebase.database();
  function showAccCreate() { //Hides and shows account create button
      var x = document.getElementById("hiddenaccountcreation");
      if (x.style.display === "none") {
          x.style.display = "block";
      } else {
          x.style.display = "none";
      }
  }
  function submitAcc() { //On submit button pressed
      alert("Signing in");
      var email = document.getElementById("emailinput").value;
      var password = document.getElementById("passinput").value;
      var username = document.getElementById("usernameinput").value;
      //console.log(email + password +username);
      var user;
      alert("recorded values");
      firebase.auth().createUserAndRetrieveDataWithEmailAndPassword(email,password).then(function(result) {
          alert("Gets into .then");
          var user = firebase.auth().currentUser;
          var uidvalue = user.uid;
          console.log(uidvalue);
          console.log(uidvalue);
          alert("User value recorded");
          writeUserDataFromEmailSignin(email, username,uidvalue);
          alert(user.uid);
      }).catch(function(error) {
          alert(error.message);
          console.log(error.message);
          console.log(error.code);
      });
  }
  
  
  //Testing if auth state changes
  firebase.auth().onAuthStateChanged(function (user) {
      if (user) {
          alert("User is signed in.");
          document.getElementById("debugtest").innerHTML = "Signed in";
      }
  });
  function writeUserDataFromEmailSignin(email, name, uuid) { //Writes user data to database if user signs in
      alert("Entered function");
      database.ref('users/' + uuid).set({
          "name": name,
          "email": email,
          "uid": uuid,
      }).then(function() {
          alert("Completed");
      }).catch(function() {
          console.log(error.message);
          console.log(error.code);
      })
  }
  function showsignin() {
      var x = document.getElementById("hiddensignin");
      if (x.style.display === "none") {
          x.style.display = "block";
      } else {
          x.style.display = "none";
      }
  }
  function googlesignin() { //Signs people into app via Google
      var provider = new firebase.auth.GoogleAuthProvider();
      provider.addScope("https://www.googleapis.com/auth/contacts.readonly");
      firebase.auth().languageCode = 'en';
      firebase.auth().signInWithPopup(provider).then(function(result) {
          var token = result.credential.accessToken; //Google Auth access token
          var user = result.user; //Contains all user info that Google provided us
          writeToDatabaseFromGoogle(user.email, user.displayName, user.uid, user.photoUrl);
      }).catch(function(error) {
          console.log(error.message);
          console.log(error.code);
      });
  
  
  }
  function writeToDatabaseFromGoogle(email, name, uuid, image_url) { //Writes user data to database from Google signin
      database.ref("users/" + uuid).set({
          "name": name,
          "email": email,
          //"imageUrl": image_url,
          "uid": uuid,
      }).catch(function(error) {
          console.log(error.message);
          console.log(error.code);
      });
  }
  function signInUser() { //Uses email sign-in so signin to existing account
      var email = document.getElementById("emailreauth");
      var pass = document.getElementById("passreauth");
      // noinspection JSUnresolvedFunction
      firebase.auth().signInWithEmailAndPassword(email, pass).catch(function (error) {
          //Handle errors here
          let errorCode = error.code;
          let errorMessage = error.MESSAGE;
          console.log(errorCode);
          console.log(errorMessage);
      });
  }
  </code></pre>
  
  <p>and the index.html file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;!--suppress HtmlRequiredLangAttribute --&gt;
         &lt;html&gt;
      &lt;head&gt;
          &lt;script src="https://www.gstatic.com/firebasejs/5.8.5/firebase.js"&gt;&lt;/script&gt;
          &lt;script&gt;
              // Initialize Firebase
              var config = {
                  apiKey: "AIzaSyAhglAXFWaJhtvOrfeugAMgJHrBw5CUNEc",
                  authDomain: "projectcrosscomm.firebaseapp.com",
                  databaseURL: "https://projectcrosscomm.firebaseio.com",
                  projectId: "projectcrosscomm",
                  storageBucket: "projectcrosscomm.appspot.com",
                  messagingSenderId: "412861101382"
              };
              firebase.initializeApp(config);
          &lt;/script&gt;
          &lt;!-- Firebase App is always required and must be first --&gt;
          &lt;script src="https://www.gstatic.com/firebasejs/5.8.5/firebase-app.js"&gt;&lt;/script&gt;
  
          &lt;!-- Add additional services that you want to use --&gt;
          &lt;script src="https://www.gstatic.com/firebasejs/5.8.5/firebase-auth.js"&gt;&lt;/script&gt;
          &lt;script src="https://www.gstatic.com/firebasejs/5.8.5/firebase-database.js"&gt;&lt;/script&gt;
  
  
          &lt;!-- Comment out (or don't include) services that you don't want to use --&gt;
          &lt;!-- &lt;script src="https://www.gstatic.com/firebasejs/5.8.5/firebase-storage.js"&gt;&lt;/script&gt; --&gt;
  
  
          &lt;script src="main.js" rel="script"&gt;&lt;/script&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
          &lt;title&gt;Project Cross Comm!&lt;/title&gt;
          &lt;link rel="stylesheet" href="stylesheet.css"&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;button id="accountcreate" onclick="showAccCreate()"&gt;Create your account here!&lt;/button&gt;
      &lt;button id="showsignin" onclick="showsignin()"&gt;Already have an account?&lt;/button&gt;
      &lt;button2 id="googlesignin" onclick="googlesignin()"&gt;Sign in with Google&lt;/button2&gt;
  
          &lt;h1&gt;Project Cross Comm!&lt;/h1&gt;
          &lt;h2 id="subtitle"&gt;
          Welcome to &lt;strong&gt;Project Cross Comm!&lt;/strong&gt;
          &lt;/h2&gt;
          &lt;img height="200px" src="https://i.kym-cdn.com/entries/icons/mobile/000/013/564/doge.jpg" width="260px" alt="If you can't see this image you're a pleb"&gt;
          &lt;h2&gt;&lt;/h2&gt;
          &lt;p id="desc"&gt; Project Cross Comm is a free to use chatting program that runs in your browser. All the chats are encrypted, so no one can read your chats. Enjoy the program and chat away.&lt;/p&gt;
          &lt;div id="hiddenaccountcreation"&gt;
              &lt;form&gt;
                  &lt;fieldset&gt;
                      &lt;legend&gt;Account Creation&lt;/legend&gt; &lt;!--Create account via email sign-in--&gt;
                      &lt;p&gt;
                          &lt;label for="usernameinput"&gt;Username&lt;/label&gt;
                          &lt;input type="text" id="usernameinput" name="createUsername" placeholder="Username"&gt;
                      &lt;p&gt;
                          &lt;label for="emailinput"&gt;Email&lt;/label&gt;
                          &lt;input type="email" id="emailinput" value="" placeholder="example@example.com" name="createEmail"&gt;
                      &lt;/p&gt;
                      &lt;p&gt;
                          &lt;label for="passinput"&gt;Password&lt;/label&gt;
                          &lt;input type="password" id="passinput" value="" placeholder="password" name="createPass"&gt;
                      &lt;/p&gt;
                      &lt;button id="submit" onclick="submitAcc()"&gt;SUBMIT&lt;/button&gt;
                  &lt;/fieldset&gt;
              &lt;/form&gt;
          &lt;/div&gt;
          &lt;div id="hiddensignin"&gt;
              &lt;form&gt;
                  &lt;fieldset&gt;
                      &lt;legend&gt;Sign In&lt;/legend&gt;
                      &lt;p&gt;
                          &lt;label for="usernamereauth"&gt;Username&lt;/label&gt;
                          &lt;input type="text" id="usernamereauth" value=""&gt;
                      &lt;p&gt;
                          &lt;label for="emailreauth"&gt;Email&lt;/label&gt;
                          &lt;input type="email" id="emailreauth" value=""&gt;
                      &lt;/p&gt;
                      &lt;p&gt;
                          &lt;label for="passreauth"&gt;Password&lt;/label&gt;
                          &lt;input type="password" id="passreauth" value=""&gt;
                      &lt;/p&gt;
                      &lt;button id="signin" onclick="signInUser()"&gt;SUBMIT&lt;/button&gt;
                  &lt;/fieldset&gt;
              &lt;/form&gt;
          &lt;/div&gt;
          &lt;div id="getthisblockoutofmygoddamnedway"&gt; &lt;!--Problematic code block that another member of my team put there --&gt;
              &lt;a style = "color: white; "id="link" href="InfoPage.html"&gt;Click here for more information.&lt;/a&gt;
              &lt;h6&gt;&lt;/h6&gt;
              &lt;a style = "color: white; "id="link2" href="ChatLayout.html"&gt;Click Here To Chat&lt;/a&gt;
              &lt;h6&gt;&lt;/h6&gt;
              &lt;a style = "color: white; "id="link3" href="https://app.termly.io/document/privacy-policy/0ae020d8-ee05-4202-a0c7-d4ff19e8f661"&gt;Privacy Policy &lt;/a&gt;
  
          &lt;/div&gt;
      &lt;/body&gt;
      &lt;footer&gt;
          &lt;p id="debugtest" class="debug"&gt;Haven't Been Signed In Yet&lt;/p&gt;
          &lt;noscript&gt;Man, sucks for you! We only support modern, functioning browsers. Maybe you should get JavaScript &lt;/noscript&gt;
      &lt;/footer&gt;
  &lt;/html&gt;
  
  </code></pre>
  
  <p>The farthest alert my program gets to is <code>alert("recorded values");</code>, no further alerts are executed. Javascript does not throw any errors during the process; the console is empty. Is there any way to find out what's wrong, or even to force Javascript to be more verbose and log its memory every so often?</p>