title: Can not access firebase Realtime database in my web app
body: <p>I am developing firebase webapp and faced one problem.
  I cannot access(read/write) firebase realtime database.</p>
  
  <pre><code> &lt;script src="https://www.gstatic.com/firebasejs/4.12.0/firebase.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  var config = {
      apiKey: "AIzaSyCPYu_iqHjNoXjMfdMVLoYs5Graf2gdz7I",
      authDomain: "sharing-is-caring-967c8.firebaseapp.com",
      databaseURL: "https://sharing-is-caring-967c8.firebaseio.com",
      projectId: "sharing-is-caring-967c8",
      storageBucket: "sharing-is-caring-967c8.appspot.com",
      messagingSenderId: "884406512169"
    };
  firebase.initializeApp(config);
  
      firebase.auth().signInWithEmailAndPassword("myemail@gmail.com", "Qqqq123").then(function(info) {
          var uid = info.uid;
          firebase.database().ref('users/' + uid + '/userDetails').once('value').then(function(data) {
              alert(data)
          }).catch(function(error) {
              alert(error.message);
          });
      }).catch(function(error) {
          // Handle Errors here.
          var errorCode = error.code;
          var errorMessage = error.message;
          alert(errorMessage);
          // ...
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>SignInWithEmailAndPassword work fine.
  And At database part, 
  once('value') function does not response anymore.
  There is no success and no fail.
  There isn't any error message and always silence</p>
  
  <p>Rules of Realtime Database</p>
  
  <pre><code>{
    "rules": {
      ".read": "auth != null",
      ".write": "auth != null",
        "threads": {
          "$tid": {
            "messages": {
              ".indexOn": ["read", "date"]
            }
          }
        }
    }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/dtpAL.png" rel="nofollow noreferrer">Fire base Web Setup Guide Screenshot of my Firebase</a></p>
  
  <p>Database structure</p>
  
  <pre><code>{
    "users" : {
      "BzucCBivhiRUogK5GeNrMV6k6M83" : {
        "userDetails" : {
          "displayName" : "Stanislav Sergeev",
          "email" : "stanislav.atos@yahoo.com",
          "notifications" : true,
          "phoneNumber" : "",
          "profile_image" : "",
          "pushToken" : "ec7iJ7Mt7Lg:APA91bFb8NK2XeaLVUgr-DEPRFuLMDCk9_tIr_eHBjmuZPnHDUvFuCsj3kez4F5-Y9CjVXOY6VlsFi5nlazSZys4KBjwCKcpINbV5S2ZEaH09aWZ6sLga8dOja-UIp3Iz3DSOAb4bcH4"
        }
      }
    }
  }
  </code></pre>