UPDATE: I was getting this error because of a bug that Parse-Server 2.2.17 has. I fixed it by going back to 2.2.16.
Does anyone know why I am getting this error? Here is my cloud code:
`Parse.Cloud.define("Messages", function(request, response) {
var pushQuery = new Parse.Query(Parse.Installation);
Parse.Push.send({
where: pushQuery,
data: {
alert: "New Event Added",
sound: "default"
}
},{
success: function(){
console.log("Push Sent!")
},
error: function (error) {
console.log(error)
},
useMasterKey: true
}); });`
Here is the error I am getting:
And then this is how I am calling the code: `PFCloud.callFunctionInBackground("Messages", withParameters: nil) { (object, error) in
if error == nil {
print("Success!")
} else {
print(error)
}
}