title: Cloud Functions with Firestore error "Deadline Exceeded"
body: <p>I'm currently testing out the new <strong>firestore</strong> but I always get the same problem that it tells me something about <strong>Deadline exceeded</strong></p>
  
  <pre><code>{ Error: Deadline Exceeded
      at /user_code/node_modules/firebase-admin/node_modules/grpc/src/node/src/client.js:554:15
    code: 16,
    metadata: Metadata { _internal_repr: {} },
    note: 'Exception occurred in retry method that was not classified as transient' }
  </code></pre>
  
  <p>This is my current code which seems  fine (and works when I deploy it to Firebase)</p>
  
  <pre><code>const functions = require('firebase-functions');
  
  const admin = require('firebase-admin');
  var serviceAccount = require("./xxxxxxxx-firebase-adminsdk.json");
  
  admin.initializeApp({
    credential: admin.credential.cert(serviceAccount),
    databaseURL: "https://xxxxxxxxx-xxxx.firebaseio.com"
  });
  
  exports.registerUser = functions.auth.user().onCreate(event =&gt; {
    admin.firestore().collection('users').doc(event.data.uid).set({
      name: 'Test User',
      country: 'USA'
    }).catch(error =&gt; {
      console.log(error);
    })
  });
  </code></pre>
  
  <p>It also shows this message <strong>Function returned undefined, expected Promise or value</strong></p>