-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Push Notifications stopped working #5379
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
Comments
In addition, our dev environment is running an Elastic Beanstalk version and we are experiencing similar issue there, so different version of Parse-server, but same issue. |
Enable push adapter verbose logging with |
Will enable verbose logging; however, I can tell you our APNS certificate has not expired. |
Okay, I think we have the log level set-up correctly. Once again, I attempted too hide some of the user specific information. Here were sections of the log at the time push notifications attempted to send: {"method":"POST","url":"/dateset/push","headers":{"user-agent":"node-XMLHttpRequest, Parse/js1.9.2 (NodeJS 5.12.0)","accept":"/","content-type":"text/plain","host":"ec2-##########.compute-1.amazonaws.com:5656","content-length":"340","connection":"close"},"body":{"data":{"alert":"Matt: Test post upgrade","badge":"Increment","sound":"default","objectId":"8QZWnR0lZb"},"where":{"user":{"__type":"Pointer","className":"_User","objectId":"##########"}}},"level":"verbose","message":"REQUEST for [POST] /dateset/push: {\n "data": {\n "alert": "Matt: Test post upgrade",\n "badge": "Increment",\n "sound": "default",\n "objectId": \”########\”\n },\n "where": {\n "user": {\n "__type": "Pointer",\n "className": "_User",\n "objectId": \”########\”\n }\n }\n}","timestamp":"2019-02-28T14:09:19.758Z"} {"method":"POST","url":"/dateset/push","headers":{"user-agent":"node-XMLHttpRequest, Parse/js1.9.2 (NodeJS 5.12.0)","accept":"/","content-type":"text/plain","host":"ec2-#############.compute-1.amazonaws.com:5656","content-length":"329","connection":"close"},"body":{"data":{"alert":"Matt: Test 3","badge":"Increment","sound":"default","objectId”:”#######”},”where":{"user":{"__type":"Pointer","className":"_User","objectId”:”#######”}}},”level":"verbose","message":"REQUEST for [POST] /dateset/push: {\n "data": {\n "alert": "Matt: Test 3",\n "badge": "Increment",\n "sound": "default",\n "objectId": \”########\”\n },\n "where": {\n "user": {\n "__type": "Pointer",\n "className": "_User",\n "objectId": \”#########\”\n }\n }\n}","timestamp":"2019-02-28T14:12:00.704Z"} {"method":"POST","url":"/dateset/push","headers":{"user-agent":"node-XMLHttpRequest, Parse/js1.9.2 (NodeJS 5.12.0)","accept":"/","content-type":"text/plain","host":"ec2-##########.compute-1.amazonaws.com:5656","content-length":"329","connection":"close"},"body":{"data":{"alert":"Matt: Test 4","badge":"Increment","sound":"default","objectId":"8QZWnR0lZb"},"where":{"user":{"__type":"Pointer","className":"_User","objectId”:”########”}}},”level":"verbose","message":"REQUEST for [POST] /dateset/push: {\n "data": {\n "alert": "Matt: Test 4",\n "badge": "Increment",\n "sound": "default",\n "objectId": "8QZWnR0lZb"\n },\n "where": {\n "user": {\n "__type": "Pointer",\n "className": "_User",\n "objectId": \”########\”\n }\n }\n}","timestamp":"2019-02-28T14:20:11.373Z"} |
The push adapter logging seems to be missing here. The phrase Try to set |
Okay, so when you say set VERBOSE=1. We set logLevel: 1 in "send push" function in our javascript. In addition, we set logLevel: VERBOSE in our index.js in the ParseServer creation. Is this correct? Does this go within the push area? we run our parse server through the PM command, so are the variables you are talking about environmental defined at the command line? Let us know, thanks! |
These are environment variables. See here. |
Have you tried sending push notifications from an alternative source, other than parse-server? To properly diagnose this issue, send a notification to a device from a second source, and make sure you receive it. You can use something like pusher. And remember, your aws security groups could be blocking the notification ports, check them out too. Hope this helps... |
Okay, now that I have found the correct log files and with the environment variables set, here is what I see occurring. Does this usually mean the .p12 file is incorrect/bad, or is this something else like a port connection failure? If it's the .p12, I swear we just created it so that it was current in case that is the problem. /home/ubuntu/parse-server-example/node_modules/parse-server/lib/ParseServer.js:437 Error: mac verify failure Error: mac verify failure |
I believe it has something to do with the connection, so either the .p12 file has expired, the wrong environment is being selected (production/development) or a port problem. Also, your issue is better suited for the push-notification adapter repo. I recommend you re-open it there. |
Moved per suggestion to the push-adapter repo. |
Issue Description
We have been running parse-server on AWS hosted ubuntu servers for a few months now and have been successfully pushing notifications out through the cloud push features for our iOS app. At some point between February 6th and February 13th, our push notifications stopped working through Parse and APN. As shown in the sample log statement below, we receive a success back from the send; however, our dashboard indicates the status is stuck at "SENDING". No errors are reported. We have updated the .p12 file with the latest generated from our developer site. However, no luck in getting it to work.
We have scanned both parse, apple, and AWS support areas but haven't see any issues reported.
Push Configuration
push: {
ios: {
pfx: 'certs/########.p12',
bundleId: 'io.#####.#####',
production: true
}
}
The master key is also specified in the server code.
Sample of our cloud main.js file that has been working fine.
Parse.Push.send({
where: pushQuery,
data: {
alert: message,
badge: "Increment",
sound: 'default',
objectId: matchId
}
},{
useMasterKey: true,
success: function() {
console.log('Message sent successfully');
res.success('Message was sent successfully');
},
error: function(error) {
console.log('Error sending push');
res.error(error);
}
});
Environment Setup
Server
Database
Logs/Trace
{"functionName":"sendpush","params":{"matchId":"####","message":"Test","senderId":"######","recipName":"#####","recipId":"######"},"user":"######","level":"info","message":"Ran cloud function sendpush for user ###### with:\n Input: {"matchId":"#######","message":"Test","senderId":"#######","recipName":"####","recipId":"######"}\n Result: "Message was sent successfully"","timestamp":"2019-02-16T22:29:44.110Z"}
Note: All ids and sensitive information was replaced with "#####"
The text was updated successfully, but these errors were encountered: