Skip to content

Parse Server Crash on invalid/expired APNS cert #65

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

Closed
bnol opened this issue Mar 15, 2017 · 13 comments
Closed

Parse Server Crash on invalid/expired APNS cert #65

bnol opened this issue Mar 15, 2017 · 13 comments

Comments

@bnol
Copy link

bnol commented Mar 15, 2017

I would like to reference an issue from parse-community/parse-server#3575 which crashes the node process when APNS cert is expired. It also happens for me, here is the stack trace:

3|parse-se | Error: certificate has expired: 2016-09-27T04:03:38.000Z
3|parse-se |     at validateCredentials (/opt/parse-server-tc/node_modules/apn/lib/credentials/validate.js:12:9)
3|parse-se |     at /opt/parse-server-tc/node_modules/apn/lib/connection.js:163:5
3|parse-se |     at _fulfilled (/opt/parse-server-tc/node_modules/q/q.js:834:54)
3|parse-se |     at self.promiseDispatch.done (/opt/parse-server-tc/node_modules/q/q.js:863:30)
3|parse-se |     at Promise.promise.promiseDispatch (/opt/parse-server-tc/node_modules/q/q.js:796:13)
3|parse-se |     at /opt/parse-server-tc/node_modules/q/q.js:604:44
3|parse-se |     at runSingle (/opt/parse-server-tc/node_modules/q/q.js:137:13)
3|parse-se |     at flush (/opt/parse-server-tc/node_modules/q/q.js:125:13)
3|parse-se |     at _combinedTickCallback (internal/process/next_tick.js:67:7)
3|parse-se |     at process._tickDomainCallback [as _tickCallback] (internal/process/next_tick.js:122:9)

parse-server-push-adapter version: 1.2.0

@oyvindvol
Copy link

Any thoughts on this one, anyone? I am having the same problem.

@shide1989
Copy link

Same problem here, anyone knows how to solve this ?

@flovilmart
Copy link
Contributor

This is expected, just pass proper/valid certiticates

@shide1989
Copy link

how do you do it ? any link to help ? i'm new to parse

@flovilmart
Copy link
Contributor

What do you mean how do you do it? Did you follow the documentation to configure push properly available on docs.parseplatform.org?

@shide1989
Copy link

actually i wasn't aware of docs.parseplatform.org. I'll check that, thanks

@flovilmart
Copy link
Contributor

Also, the push configuration is the first link on the first line of the README of this repository.

@gateway
Copy link

gateway commented Nov 28, 2018

Hi, I just ran into this on our staging servers. I woke up to crashed servers and it looks like our iOS push cert for dev expired. While I'm in the process of fixing this ideally if a cert expires the app shouldn't crash ?

@flovilmart
Copy link
Contributor

@gateway this is the expected behavior, as it is the node apn’s behavior, as stated many time. Feel free to fix it.

@gateway
Copy link

gateway commented Nov 28, 2018

@flovilmart your right, looking at the first line of the error, using node-apn .. odd that something like an expired cert would crash a server.. hmm well thanks...

@paprbot
Copy link

paprbot commented Jan 12, 2021

How are you checking for certificate expiration? I noticed our certificate's expiration on Apple is 2021/10/01 (i.e. October) but we got a crash on our servers yesterday (2021/01/10). Or is this a configuration that we need to setup?

@oyvindvol
Copy link

@paprbot You can check when the certificates expire in Apple Developer Account.

@dplewis
Copy link
Member

dplewis commented Jan 13, 2021

@paprbot I would recommend using keys instead of certs. Since keys don't expire.

ios: [
      {
        token: {
          key: './push/AuthKey_XYZ.p8',
          keyId: "ABC",
          teamId: "EFG"
        },
        topic: 'com.example',
      },
]

Screen Shot 2019-10-14 at 7 07 53 PM

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

7 participants