-
-
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 Server Push giving APNS 513 #697
Comments
@AlecKriebel Please let me know if you still have same error. |
@jaydeep82 I've been using .p12 files without passwords. I've even tried including both a development AND production .p12 and it has not worked. It is worth noting that I have the exact same .p12 in Parse and push notifications work there, but not in my Heroku/MongoDB parse-server. |
Did you also push the .p12 files in heroku using git command ? I think node.js could not find the p12 file in specified location. For me, I have keep MyParsePush.p12 at same location of index.js.
Please let me know if you still have same error. |
Yes, please remove the _dirname and use as below :
I've removed '/' also. Then push the change to heroku using git and check again. |
This still does not work after making this change. Index.js:
|
@flovilmart Thanks, that gets me in the right direction, however, this error is still unclear
As I understand, to authenticate push services a .p12 or a key and cert file in the .cem format is needed. Since I've supplied a .p12, why would the error be that I need a .pem file? I apologize if this is obvious but, from what I can see, the index.js file is only 262 lines, not 288 or more. |
Provide the full path of your certificate, that will help. path.resolve(__dirname, certPath) where certPath is the relative path to the certificate from the file you're calling it. |
if you host your own Parse Server on Heroku or AWS, The PFPush is NOT supported. (Said by Parse.com) |
@AlecKriebel You are right. Push feature has been added in Parse Server. Perhap your problem is at generating PEM or .P12 file. I remember that before Parse.com recommended developers to use the Push provider https://onesignal.com/ |
I am having the exact same error as @AlecKriebel was. We discussed earlier today, and he had still not come to a resolution for this problem. Between talking to him and using what was here, I attempted to use APNS by setting my environment variables to this:
With this in my I spent several hours troubleshooting today but was unable to come to a resolution. I redownloaded my certificates and reexported them too just to make sure, but these were the same I was using on Parse before and they worked without issue. Since two people have run into the same error, this seems like something that needs to be addressed. |
the key is pfx not pdx |
Wow I'm an idiot. One letter! Thanks @flovilmart! |
ahah :) |
Close when you,re done :) |
@pbush25 @flovilmart I'll be willing to bet that was my issue too, testing now. If it is, I'll probably rip my hair out. Will close after I test. |
Oh believe me, I wanted to rip my hair out too! |
Is there a typo in the docs? Just FYI, we're working on upgrading to the new API for APNS over HTTP 2, where a single certificate would work for both dev and production |
I don't see a typo in the the main push docs, but they might be somewhere seeing as two people managed to end up with it. |
@flovilmart From what I remember, I definitely copied and pasted the initialization code from somewhere, probably the docs at one point. I know I had been following this setup guide: http://rogerstringer.com/2016/02/11/parse-server-push/ |
looking at our docs: https://github.com/ParsePlatform/parse-server/wiki/Push we properly describe with pfx :) And I can see there are many errors in that tutorial, missing / at the end of the URL for the Android SDK etc... |
Can you clarify for me that using this new version of Parse Push we can no longer send pushes from a client such as the iOS SDK? |
no, that don,t change the client push sending abilities, for now it's disabled |
So all pushes will have to be set through cloud code now? |
yes that's right |
Does that include from the PHP SDK also? |
you can send them from any SDK with masterKey access |
Hi all,
I'm getting an issue when trying to send push notifications over Parse Server using cloud code, specifically, the heroku server is spitting a 513 APNS at me. This was triggered by calling the cloud function on the iOS client-side.
I've discluded my keys and urls, etc, so they are in ALL_CAPS.
What do I need to do to make Push notification work on my parse server? Is there an issue with my .p12?
Here is my cloud function:
Here is my Index.js setup:
Here is the server response:
The text was updated successfully, but these errors were encountered: