-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
Issue Description
Upgraded to parse server 2.7.2 and all my pushes are failing with the following error message:
node-pre-gyp ERR! parse-server-push-adapter APNS APNS error transmitting to device <xxx> with status 400 and reason BadExpirationDate
Upgraded to node 8, upgraded to push-adapter 3.0.0-alpha1 and it is all the same error. No push gets through or very few of them (under 5%).
Removed the expiration_interval: 120 from my cloud code push fragments and pushes seem to go through fine again.
Steps to reproduce
Sending pushes via cloud code with
Parse.Push.send({
where: realQuery,
expiration_interval: 120,
data: payload
}, {
success: function() {
response.success("OK")
},
error: function(error) {
var msg = "Parse.Push.send() ERROR: " + error.code + " " + error.message;
console.log(msg);
response.error(msg);
},
useMasterKey: true
});
The expiration_interval: 120 should indicate that push message is valid for 2 minutes only.
Expected Results
Before upgrading the pushes were working fine, I'm not sure if expiration_interval was taken into account but it definitely never produced any error messages. The pushes were sent.
Actual Outcome
With expiration_interval: 120 no pushes are sent and all attempts produce a BadExpirationTime error.
Environment Setup
parse-server version 2.7.2 with push-adapter 3.0.0-alpha1 and push-adapter 2.0.2