Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting error when using push and main.js for sending push notification #1354

Closed
3 tasks done
HemanParbhakar opened this issue Apr 4, 2016 · 2 comments
Closed
3 tasks done

Comments

@HemanParbhakar
Copy link

Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

Parse.Cloud.define("sendAnnouncement", function(request, response) {
var name = request.params.senderName;
var msg = request.params.message;

    Parse.Push.send({
            channels: [ request.params.message ],
            data: {
                    title: name,
                    message: msg,
                    action: "com.hello.announcement.sample.SEND_ANNOUNCEMENT",
                    senderId: request.params.senderId,
                    accountId: request.params.accountId
            }
    }, {
            success: function() {
                    // Push was successful
                    response.success("sendAnnouncement sent");
            },
            error: function(error) {
                    // Handle error
                    response.error("error with sendAnnouncement: " + error);
            },
            useMasterKey: true
    });

});
///////main.js

Steps to reproduce

Logs/Trace

{
"_id" : ObjectId("57021bdda5037e7f7308f15f"),
"objectId" : "s07wE8sS3P",
"pushTime" : "2016-04-04T07:46:37.432Z",
"_created_at" : ISODate("2016-04-04T07:46:37.432+0000"),
"query" : "{"channels":{"$in":["Hello"]}}",
"payload" : {
"title" : "HEMAN",
"message" : "Hello",
"action" : "com.hello.announcement.sample.SEND_ANNOUNCEMENT",
"senderId" : "u65DC77hkr"
},
"source" : "rest",
"title" : null,
"expiry" : null,
"status" : "succeeded",
"numSent" : NumberInt(0),
"pushHash" : "7e89743eb59a7c354982a9652c91a0d9",
"_wperm" : [

], 
"_rperm" : [

], 
"numFailed" : NumberInt(1), 
"failedPerType" : {
    "android" : NumberInt(1)
}

}

@flovilmart
Copy link
Contributor

Can you provide more informations? That seems to be an error with your configuration.

please set VERBOSE=1 so we have more logs from the parse-server-push-adapter

@flovilmart flovilmart reopened this Apr 4, 2016
@HemanParbhakar
Copy link
Author

untitled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants