parse-community / parse-community/parse-server
Parse Server Crash on invalid/expired APNS cert
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
We use GitHub Issues for bugs.
If you have a non-bug question, ask on Stack Overflow or Server Fault:
You may also search through existing issues before opening a new one: https://github.com/ParsePlatform/Parse-Server/issues?utf8=%E2%9C%93&q=is%3Aissue
--- Please use this template. If you don't use this template, your issue may be closed without comment. ---
Issue Description
Parse server 2.3.6 crashes when the push cert for apns has expired.
Describe your issue in as much detail as possible.
Steps to reproduce
Get put a old apns cert in and log in as a new user.
Actual Outcome
What is happening instead.
Environment Setup
-
Server
- parse-server version (Be specific! Don't say 'latest'.) : 2.3.6
- Operating System: Heroku
- Hardware: Standard 2x
- Localhost or remote server? Heroku
-
Database
- MongoDB version: 3.2
- Storage engine: tiger
- Hardware: dedicated
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): mlab.
Logs/Trace
Feb 27 11:31:00 stage app/web.1: ERR! parse-server-push-adapter APNS cannot find vaild connection for c867c8504a4657fe77070971d11644ab84f95105524a632c6b5b2738957f7e6d
Feb 27 11:31:00 stage app/web.1: /app/node_modules/parse-server/lib/ParseServer.js:460
Feb 27 11:31:00 stage app/web.1: throw err;
Feb 27 11:31:00 stage app/web.1: ^
Feb 27 11:31:00 stage app/web.1: Error: certificate has expired: 2017-02-10T00:33:23.000Z
Feb 27 11:31:00 stage app/web.1: at validateCredentials (/app/node_modules/apn/lib/credentials/validate.js:12:9)
Feb 27 11:31:00 stage app/web.1: at /app/node_modules/apn/lib/connection.js:163:5
Feb 27 11:31:00 stage app/web.1: at _fulfilled (/app/node_modules/q/q.js:834:54)
Feb 27 11:31:00 stage app/web.1: at self.promiseDispatch.done (/app/node_modules/q/q.js:863:30)
Feb 27 11:31:00 stage app/web.1: at Promise.promise.promiseDispatch (/app/node_modules/q/q.js:796:13)
Feb 27 11:31:00 stage app/web.1: at /app/node_modules/q/q.js:604:44
Feb 27 11:31:00 stage app/web.1: at runSingle (/app/node_modules/q/q.js:137:13)
Feb 27 11:31:00 stage app/web.1: at flush (/app/node_modules/q/q.js:125:13)
Feb 27 11:31:00 stage app/web.1: at _combinedTickCallback (internal/process/next_tick.js:67:7)
Feb 27 11:31:00 stage app/web.1: at process._tickDomainCallback (internal/process/next_tick.js:122:9)
Feb 27 11:31:00 stage app/web.1: npm ERR! Linux 3.13.0-105-generic
Feb 27 11:31:00 stage app/web.1: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
Feb 27 11:31:00 stage app/web.1: npm ERR! node v7.6.0
Feb 27 11:31:00 stage app/web.1: npm ERR! npm v4.1.2
Feb 27 11:31:00 stage app/web.1: npm ERR! code ELIFECYCLE
Feb 27 11:31:00 stage app/web.1: npm ERR! parse-server-example@1.4.0 start: node index.js
Feb 27 11:31:00 stage app/web.1: npm ERR! Exit status 7
Feb 27 11:31:00 stage app/web.1: npm ERR!
Feb 27 11:31:00 stage app/web.1: npm ERR! Failed at the parse-server-example@1.4.0 start script 'node index.js'.
Feb 27 11:31:00 stage app/web.1: npm ERR! Make sure you have the latest version of node.js and npm installed.
Feb 27 11:31:00 stage app/web.1: npm ERR! If you do, this is most likely a problem with the parse-server-example package,
Feb 27 11:31:00 stage app/web.1: npm ERR! not with npm itself.
Feb 27 11:31:00 stage app/web.1: npm ERR! Tell the author that this fails on your system:
Feb 27 11:31:00 stage app/web.1: npm ERR! node index.js
Feb 27 11:31:00 stage app/web.1: npm ERR! You can get information on how to open an issue for this project with:
Feb 27 11:31:00 stage app/web.1: npm ERR! npm bugs parse-server-example
Feb 27 11:31:00 stage app/web.1: npm ERR! Or if that isn't available, you can get their info via:
Feb 27 11:31:00 stage app/web.1: npm ERR! npm owner ls parse-server-example
Feb 27 11:31:00 stage app/web.1: npm ERR! There is likely additional logging output above.
Feb 27 11:31:00 stage app/web.1: npm ERR! Please include the following file with any support request:
Feb 27 11:31:00 stage app/web.1: npm ERR! /app/npm-debug.log
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the failure at parse-server/lib/ParseServer.js:460 and the APNS connection validation shown in the trace, using the expired-certificate reproduction described in the issue. Determine the intended handling for an invalid APNS certificate and verify that the server no longer crashes while reporting the certificate error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100