-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Parse Push Failing APNS With 0 Success 16 Failures #5181
Comments
How is your push adapter configured? It seems that the push doesn’t even reach APNS which makes me think of a mis configuration. |
index is:
main cloud code is:
|
Can you try with a single certificate as it is now supported? Does the bundle ids/ topics match between the installation objects and the configuration? |
Can I get some more verbose logs from the APNS service? |
I looked at the single certificate option but couldn't see in Apple developer portal how to generate one |
You can set DEBUG=apn:* or DEBUG=apn to turn on the internal logging of the apn module |
All certificates and provisioning profiles have remained the same during the development process and during release. The only thing I can think that has changed is that I changed the name of the of the app briefly duing development on the newest dev version only to see how it looked on the device built from Xcode, then changed back to what it was, this was purely a local dev change, nothing submitted or retained. I've tried getting a new cert and .p12 cert and no change, then tried the old certificate on the APNS tester which still works fine. |
Ok can i do that as an environment setting in EB settings to get some more verbose output? Like VERBOSE = 1? |
This is exactly how it should be used (as an environment variable). Also, because you upgraded from an antique version of this project, it is possible many things changed. |
What version of node are you running? |
Ok I'll try that and provide the more verbose logs so we can debug |
8.11.4, I just added DEBUG=apn with no additional output just trying DEBUG=apn:* |
Same response... �[36mverbose�[39m: RESPONSE from [POST] /parse/push: { |
Has there been a database update between versions that could cause this issue? Looking for data at the wrong object keys, indexes etc? |
I am tempted to say yes and no. You were running a version from June 2016, I cannot possibly remember all of the changes that were made between then and now. But the logs indicate the objects are properly pulled out of the DB as it mentions 16 installations. Actually is this what you expect? Next thing would be to run the server locally, and send it locally connected to your prod Db or similar, and inject logs in the push adapter directly (located in node_modules/@parse/push-adapter) |
Yes I have 16 instances of my login id in installations so that is correct, i.e. the query is returning the correct data. I can only imagine that there has been some database schema modification since my 2016 version that I stuck with and the latest or pre latest. I was under the impression though that mongo didn't require column definitions to make a database entry as you might expect with mySQL or simular, so I'm not sure I've got the problem pinpointed there. |
The modification you describe is unlikely, the _PushStatus did not change, and installation either. Can you provide an example installation object? |
Yeah sure: { |
Am I not getting any APNS error output then do you think? I'm not even getting that far? |
That’s what I initially mentioned, your objects are sent to the adapter, but none are going further. I suspect it has to do with the missing bundle identifier in the installation object. How did you create those installations? Through the iOS SDK? |
You are missing the |
I'm using JS sdk to call Parse.Cloud.run in app (Cordova), that's it client side, all the code is run in Parse cloud as mentioned above. On login/Signup I use Parse.FacebookUtils.logIn( to pass the facebook and device details to the installation object |
Ok, but the installation object is created from a JS SDK, and therefore lacks the required app identifier that allows the push adapter to properly send push’s. as I mentioned, this is done usually by the iOS SDK automatically, and you should do the same in your implementation of Installation in javascript |
OK I'll have a look, does this mean all my previous users are now non pushable? |
You can always either:
|
Could I fork parse server for a quick fix for me then submit a pull request to the main fork? |
The fix has to be made in the push adapter, not in the server. And you can provide any custom module as a push adapter so you technically can fix it on your own. |
Main issue is though that I've done new installations on the new parse server which hasn't added appIdentifier to new installation objects. You'd expect this to be present right? |
I thought 3.1.1 had the latest push adaptor integrated? |
Yes it has, the appIdentifier is set by the client alongside the deviceToken. You need to both fix your client side implementation and if you wish, implement a workaround in the push adapter. None of this happen if you use the native iOS SDK. Closing now as it’s not an issue with parse-server itself but with a client side custom implementation of Installations. (Or with the push adapter) |
Before opening the issue please ensure that you have:
Issue Description
Having upgraded initially from Parse Server 2.2.12 to Parse Server 2.8.4 then when this didn't work to Parse Server 3.1.1 push notifications are no longer working. The Verbose output is the following:
�[36mverbose�[39m: _PushStatus 7idQCLfPT6: sending push to installations with 1 batches
�[36mverbose�[39m: Sending push to 16
�[36mverbose�[39m: _PushStatus 7idQCLfPT6: sent push! 0 success, 16 failures
�[36mverbose�[39m: _PushStatus 7idQCLfPT6: needs cleanup devicesToRemove=[]
I have looked through all of the issues regarding push on both parse-server and parse-server-push-adaptor and have tried all offered solutions. Nothing has worked. I have tried taking the device token and sending via an APNS tester using my exact dev certificate used on parse and this successfully delivers every time. I initially tried PS 2.8.4 no luck then have tried 3.1.1 also the same error noted above. I'm using MongoDb on Mlab and AWS Elastic Beanstalk Running Node 8.11.4 and the following Package.json:
{
"name": "parse-server-example",
"version": "1.4.0",
"description": "An example Parse API server using the parse-server module",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/ParsePlatform/parse-server-example"
},
"license": "MIT",
"dependencies": {
"cron": "1.1.0",
"express": "~4.11.x",
"firebase-admin": "^4.2.1",
"kerberos": "~0.0.x",
"parse": "~1.11.1",
"parse-server": "2.8.4",
"parse-server-accountkit-auth": "^1.0.0"
},
"devDependencies": {
"@angular/cli": "1.5.0",
"@angular/compiler-cli": "^5.0.0"
},
"scripts": {
"start": "node index.js"
},
"engines": {
"node": ">=8.11"
}
}
Has there been some upgrade with regard to _PushStatus which I need to know about between 2.2.12 and 2.8.4/3.1.1 with regards to _SCHEMA or is this not relevant to Mongo and just to Postgres? No entries in my _PushStatus table have a expiration_interval column.
Also I can't seem to get anymore verbose output with regard to the APNS error returned information than the above, is this right or do I need to run it locally to catch every bit if information to debug this?
Steps to reproduce
Send Push on Cloudcode to devices using usual and checked syntax that is stated to work by other posters.
Expected Results
Pushes to be sent and delivered.
Actual Outcome
Pushes are not received.
Environment Setup
Server
Database
Logs/Trace
�[36mverbose�[39m: _PushStatus 7idQCLfPT6: sending push to installations with 1 batches
�[36mverbose�[39m: Sending push to 16
�[36mverbose�[39m: _PushStatus 7idQCLfPT6: sent push! 0 success, 16 failures
�[36mverbose�[39m: _PushStatus 7idQCLfPT6: needs cleanup devicesToRemove=[]
This logging seems sparse, that's all I get with VERBOSE=1.
The text was updated successfully, but these errors were encountered: