Cloud function's call doesn’t trigger callback

I have this code;

PFCloud.callFunction(inBackground: "getUserLikesAndReactionsForIds", withParameters: parameters) { (response, error) in
    // it sometimes doesn’t get here

The issue is that it never goes inside the callback in one certain occasion, which is weird because that occasion doesn’t affect the way this gets called.

What could interrupt the callback from being executed?
I’m on 1.19.0.

The only way I can imagine something like this could happen:

  • your cloud code function is never returning
  • you have a high timeout in your server, let’s say 1 min
  • the SDK is trying 5 times to call the function
  • it would actually fire the callback but only 5 min later

This is a cross-post of a GitHub issue which has since been resolved.