Skip to content
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

Problem with sending Push notifications #1324

Closed
SBC-Development opened this issue Apr 1, 2016 · 5 comments
Closed

Problem with sending Push notifications #1324

SBC-Development opened this issue Apr 1, 2016 · 5 comments

Comments

@SBC-Development
Copy link

Hello, I´ve tried to send (iOS) Push notifications from my self-hosted Parse Server (and of course the Dashboard) and get the following Error message (Dashboard):

XMLHttpRequest failed: "Unable to connect to the Parse API"

and in the Server console:

/usr/lib/node_modules/parse-server/lib/ParseServer.js:334
            throw err;
            ^


Error: mac verify failure
    at Error (native)
    at Object.createSecureContext (_tls_common.js:136:17)
    at Object.TLSSocket._init.ssl.onclienthello.ssl.oncertcb.exports.connect (_tls_wrap.js:1007:48)
    at apnSocket (/usr/lib/node_modules/parse-server/node_modules/apn/lib/socket.js:56:19)
    at Connection.<anonymous> (/usr/lib/node_modules/parse-server/node_modules/apn/lib/connection.js:199:17)
    at _fulfilled (/usr/lib/node_modules/parse-server/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/usr/lib/node_modules/parse-server/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/parse-server/node_modules/q/q.js:796:13)
    at /usr/lib/node_modules/parse-server/node_modules/q/q.js:604:44
    at runSingle (/usr/lib/node_modules/parse-server/node_modules/q/q.js:137:13)

I don´t know how to fix this.
If you need more Informations, just tell me which one i should post.

I hope that anyone can fix this Problem with me.

@flovilmart
Copy link
Contributor

Seems that your certificates are either invalid or unproperly configured. How do you configure parse-server with push?

@SBC-Development
Copy link
Author

I have created a configuration file and started the Parse server with the following command:
parse-server /home/parse/parse-config.json

Here is the parse-config file:

{
    "appId": "myappid",
    "masterKey": "mymasterkey",
    "push": {
      "ios": {
        "pfx": "/path/to/certificate.p12",
        "bundleId": "hidden here",
        "production": false
      }
    }
}

I think that there is something not correct but i don´t know how to correct it.

@maho125
Copy link

maho125 commented Apr 2, 2016

I had same issue. Problem was that when I exported .p12 file in Keychain I filled password to protect exported file. Solution that works for me is export new .p12 file and leave blank fields for password that has to protect exported file.

@flovilmart
Copy link
Contributor

you can set the password parameter alongside the pfx option and it should work as expected.

@SBC-Development
Copy link
Author

Okay, great..
Thank you!
I´ll try this now.


EDIT: Everything is working now, THANKS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants