0
votes

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. enter image description here

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'");
            }
        });
    });
1
I am getting the same error in all my functions, even in a test function with nothing on it. Everything is working fine with the local emulator. Did the problem solve automatically or you had to do something? - EmilioSG
I did nothing but waited. Problem was with Firebase as stated in the answer, not the code. - Jonathan

1 Answers

3
votes

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