parse-server: Parse Push to iOS hanging in parse-server 2.5.3
Issue Description
When sending a push from Cloud Code in 2.5.3, the notification seems to hang while being sent. On the Dashboard, the status of the push remains as sending. With VERBOSE=1, the logs don’t show anything beyond the “sending push to X installations” step. No push notification is received on the device. Pushes seem to be working fine on Android/GCM.
This is not an issue in 2.4.2 for me, and only occurs when I upgrade to 2.5.3.
Steps to reproduce
I am running a simple Cloud Code function that sends a push notification to a single installation:
Parse.Cloud.define("testPush", function(request, response) {
Parse.Push.send({
channels: [ USER_CHANNEL ],
expiration_interval: 15,
data: {
alert: request.params.message,
title: "GreatApp"
}
}, {
useMasterKey: true
}).then(function() {
response.success("OK");
});
});
My parse-server push configuration is as follows:
push: {
android: {
senderId: 'XYZ',
apiKey: 'XYZ'
},
ios: [
{
pfx: __dirname + '/certs/prod.p12',
bundleId: 'com.GreatApp',
production: true
},
{
pfx: __dirname + '/certs/dev.p12',
bundleId: 'com.GreatApp',
production: false
}
]
},
Environment Setup
- Server
- parse-server version: 2.5.3
- Heroku
Logs/Trace
On parse-server 2.4.2, the push is received on my iOS device:
12:18:30 web.1 | verbose: REQUEST for [POST] /parse/push: {
12:18:30 web.1 | "channels": [
12:18:30 web.1 | "user_xyz"
12:18:30 web.1 | ],
12:18:30 web.1 | "data": {
12:18:30 web.1 | "alert": "This is a push!",
12:18:30 web.1 | "title": "GreatApp"
12:18:30 web.1 | },
12:18:30 web.1 | "expiration_interval": 15
12:18:30 web.1 | } method=POST, url=/parse/push, user-agent=node-XMLHttpRequest, Parse/js1.9.2 (NodeJS 5.12.0), accept=*/*, content-type=text/plain, host=localhost:1337, content-length=307, connection=close, channels=[user_xyz], alert=This is a push!, title=GreatApp, expiration_interval=15
12:18:30 web.1 | verbose: RESPONSE from [POST] /parse/push: {
12:18:30 web.1 | "headers": {
12:18:30 web.1 | "X-Parse-Push-Status-Id": "kdst8cZERc"
12:18:30 web.1 | },
12:18:30 web.1 | "response": {
12:18:30 web.1 | "result": true
12:18:30 web.1 | }
12:18:30 web.1 | } X-Parse-Push-Status-Id=kdst8cZERc, result=true
12:18:30 web.1 | info: Ran cloud function testPush for user XYZ with:
12:18:30 web.1 | Input: {"message":"This is a push!"}
12:18:30 web.1 | Result: "OK" functionName=testPush, message=This is a push!, user=XYZ
12:18:30 web.1 | verbose: RESPONSE from [POST] /parse/functions/testPush: {
12:18:30 web.1 | "response": {
12:18:30 web.1 | "result": "OK"
12:18:30 web.1 | }
12:18:30 web.1 | } result=OK
12:18:30 web.1 | verbose: _PushStatus kdst8cZERc: sending push to 1 installations
12:18:30 web.1 | verb
12:18:30 web.1 | parse-server-push-adapter APNS
12:18:30 web.1 | APNS Connection 0 Connected
12:18:30 web.1 | verb
12:18:30 web.1 | parse-server-push-adapter APNS APNS Connection 0 Notification transmitted to 5c1...(device token)
12:18:30 web.1 | verbose: _PushStatus kdst8cZERc: sent push! 0 success, 0 failures
On parse-server 2.5.3, the push is not received:
12:22:56 web.1 | verbose: REQUEST for [POST] /parse/push: {
12:22:56 web.1 | "channels": [
12:22:56 web.1 | "user_xyz"
12:22:56 web.1 | ],
12:22:56 web.1 | "data": {
12:22:56 web.1 | "alert": "This is a push!",
12:22:56 web.1 | "title": "GreatApp"
12:22:56 web.1 | },
12:22:56 web.1 | "expiration_interval": 15
12:22:56 web.1 | } method=POST, url=/parse/push, user-agent=node-XMLHttpRequest, Parse/js1.10.0 (NodeJS 5.12.0), accept=*/*, content-type=text/plain, host=localhost:1337, content-length=308, connection=close, channels=[user_xyz], alert=This is a push!, title=GreatApp, expiration_interval=15
12:22:56 web.1 | verbose: RESPONSE from [POST] /parse/push: {
12:22:56 web.1 | "headers": {
12:22:56 web.1 | "X-Parse-Push-Status-Id": "nOEjLtSWcO"
12:22:56 web.1 | },
12:22:56 web.1 | "response": {
12:22:56 web.1 | "result": true
12:22:56 web.1 | }
12:22:56 web.1 | } X-Parse-Push-Status-Id=nOEjLtSWcO, result=true
12:22:56 web.1 | info: Ran cloud function testPush for user XYZ with:
12:22:56 web.1 | Input: {"message":"This is a push!"}
12:22:56 web.1 | Result: "OK" functionName=testPush, message=This is a push!, user=XYZ
12:22:56 web.1 | verbose: RESPONSE from [POST] /parse/functions/testPush: {
12:22:56 web.1 | "response": {
12:22:56 web.1 | "result": "OK"
12:22:56 web.1 | }
12:22:56 web.1 | } result=OK
12:22:56 web.1 | verbose: _PushStatus nOEjLtSWcO: sending push to 1 installations
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
I saw that the issue was fixed in parse-modules/parse-server-push-adapter but the fix is not marked “latest” and npm still pulls the buggy version on install