title: Firebase Node.js admin SDK timeouts when trying to access Realtime DB
body: <p>Using the Node.js admin SDK with Firebase Functions I get a timeout whenever I try to access the Realtime Database. This occurs only when testing a function locally (<code>firebase serve --only functions,hosting</code>) and when the default app is initialized using the <code>functions.config().firebase</code>. </p>
  
  <p>This is a new behavior that started just a couple a days ago. However, if I try to initialize the default app with the <code>serviceAccount.json</code> file everything works as expected.</p>
  
  <p>I'm using <code>firebase-admin</code> version <em>4.2.1</em> and <code>firebase-functions</code> version <em>0.5.9</em>.</p>
  
  <p>I wrote a straight forward <code>http triggered</code> function that fails due to timeout:</p>
  
  <pre><code>const functions = require('firebase-functions');
  const admin = require('firebase-admin');
  
  admin.initializeApp(functions.config().firebase);
  const db = admin.database();
  
  exports.testDbConnection = functions.https.onRequest((req, res) =&gt; {
    return admin.database().ref().once('value')
    .then(function(snapshot) {
        res.json(snapshot);
    }).catch(function(error) {
        res.json(error);
    });
  });
  </code></pre>