Skip to content

Problem with sending Push notifications #1324

Closed

Description

@SBC-Development

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.

Activity

  1. flovilmart commented on Apr 1, 2016

    @flovilmart
    Contributor

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

  2. SBC-Development commented on Apr 1, 2016

    @SBC-Development
    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.

  3. maho125 commented on Apr 2, 2016

    @maho125

    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.

  4. flovilmart commented on Apr 2, 2016

    @flovilmart
    Contributor

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

  5. SBC-Development commented on Apr 2, 2016

    @SBC-Development
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions