Skip to content

Occasional "Missing push configuration" error  #2439

Closed
@royherma

Description

@royherma

I've been able to set up parse server push notifications on my Ubuntu backend, however I seem to be running into an issue which results in the "Missing push configuration" error. I've definitely been able to send and receive push notifications at certain times, but at other times I am running into that error. I'm not changing the parse environment file, but rather only conducting changes the main.js cloud code file, which does seem to affect it oddly enough. I get the error both in the parse-dashboard when trying to send to all users, and in the xcode console when running a more targeted push function using a custom cloud code method. It is here below btw:

Parse.Cloud.define('sendPostToPerson', function(request, response) {

    var Person = Parse.Object.extend("Person");
    var person = new Person();
    person.id = request.params.person;

    // Find devices associated with these users
    var pushQuery = new Parse.Query(Parse.Installation);
    pushQuery.equalTo("person",person);
    console.log("enterred send push to person");
    Parse.Push.send({
      where: pushQuery, // Set our Installation query
      data: {
        alert: "Willie Hayes injured by own pop fly."
      }
    },
     {
      success: function() {
        console.log("push sucess");
        // Push was successful
        response.success();
      },
      error: function(error) {
        // Handle error
        response.error("Error: " + error.code + " " + error.message);           
        console.log("push failure " + error.message);
      }, useMasterKey: true });
});

It is being called in on the client as so:

[PFCloud callFunctionInBackground:@"sendPostToPerson" withParameters:@{ @"person" : person.pfObject.objectId,
                                                                          @"data" : data }
                              block:^(id _Nullable object, NSError *_Nullable error) {
                                if (!error) {
                                  NSLog(@"sucesfully sent push %@", data);
                                } else {
                                  NSLog(@"error sending push %@", error.localizedDescription);
                                }
                              }];

The bottom line is that I am unable to understand the relation of the error message and the main.js (seems to me that they should not affect one another, at least when I am using the parse dashboard to send a push and not the cloud code). Anybody run into this issue, or has an idea what exactly is happening here?

Thanks!

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