Reputation: 325
Earlier it took me around 3-4 minutes to deploy functions to Firebase Cloud. Now when I'm trying to deploy my changes, CMD runs for good 10-15 minutes and then gives me this Deploy Error: Operation interrupted
and a little message to my Cloud function log also saying Operation interrupted
.
CMD and Log are not very helpful since they do not tell what is causing this problem. Is there something wrong with the code I made? It's very simple and I don't think that's causing the problem but here it is:
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
var roomID = "cheufer_923sfd98";
exports.findRoom = functions.database
.ref('/Players Searching For Room/{uid}')
.onWrite(event => {
if(!event.data.exists())
{
return;
}
admin.database().ref('/Test Array/' + roomID).transaction(function(content){
if(content == null)
{
content.push( {onGoing: false} );
content.push( {players: [] } );
}
content.players.push(event.params.uid);
return content;
}, function(error, committed){
if(committed)
{
console.log("Committed successfully. New data was inserted in table called 'TestArray'");
}
});
});
Upvotes: 0
Views: 2331
Reputation: 25134
There was an incident with Cloud Functions deployments from 3:01pm to 5:23pm (PST) on 5/10/2017. It has been resolved.
https://status.firebase.google.com/incident/Functions/17001
Upvotes: 3