I\'m currently testing out the new firestore but I always get the same problem that it tells me something about Deadline exceeded
With Cloud Functions triggers, you need to return a promise that becomes resolved when the work is complete. The set() method on the document return a promise, so you should return it to let Cloud Functions know when it's safe to clean up the function:
exports.registerUser = functions.auth.user().onCreate(event => {
return admin.firestore().collection('users').doc(event.data.uid).set(...)
});