Skip to content

Parse cloud code strange error #535

Description

@martinappberg

This cloud code function has been working perfectly until all of the sudden it gives me code: 141 error no reason and no description. It was working until I published a testflight and had two devices run the function after eachother. I run a ParseServer on Heroku with mongodb as database. I use masterkey and also have defined my server.

Parse.Cloud.define("ReadyUp", function(request, response) {
    Parse.Cloud.useMasterKey();
        var fbid = request.user.get("fbid");
        var query = new Parse.Query("Spel");
        query.equalTo("lobby", fbid);
        query.find().then(function(results) {
            results[0].addUnique("ready", fbid);
            return Parse.Object.saveAll(results);
        }).then(function(result) {
            response.success(result);
        }, function(error) {
            response.error(error);
        });
    });

This is the code to call the function from ios app:

    [PFCloud callFunctionInBackground:@"ReadyUp" withParameters:@{@"fbid":[[PFUser currentUser]objectForKey:@"fbid"]}
                                block:^(NSString *response, NSError *error) {
                                    if (!error) {
                                    }else {
                                        NSLog(@"%@",[error description]);
                                        [self fixParseBugsforUpdateWithLobby:nil];
                                    }
                                }];

Please, any ideas? I'm starting to rip out my hair...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions