Cloud Functions suddenly stopped working.
v 2.2.19
DESCRIPTION Cloud code was working fine all the time. But for a certain time it stopped working. I am using the Android SDK and was getting the i/o error. I even updated to 2.2.21 (latest as of 4 Oct) and this was still occurring. Then I again reverted to 2.2.19 and the problem suddenly disappeared the next morning. (it crashed a few times after reverting). Why did this happen?
Run with VERBOSE=1 environment variable and check the logs. There is nothing that can be guessed out.
Same here the code below has suddenly stopped working
Parse.Cloud.beforeSave("Campaign", function(request, response) {
var campaign = request.object;
var end = campaign.get("end")
if (end == null) {
response.error("Campaign expiration required.")
} else {
if (campaign.existed() == false) {
campaign.set("executed", false);
campaign.set("countLikes", 0);
campaign.set("countShares", 0);
campaign.set("countCheckIns", 0);
campaign.set("countRSVP", 0);
campaign.set("countPeople", 0);
var business = campaign.get("business");
business.increment("countCampaigns");
business.save().then(function() {
response.success();
});
} else {
response.success();
}
}
});
Hey, thanks for reporting this issue.
Can you please add all the info specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.