parse-server-push-adapter
parse-server-push-adapter copied to clipboard
Parse Server crash on FCM network error using http/2
New Issue Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
- [x] I can reproduce the issue with the latest versions of Parse Server and the Parse Server Push Adapter.
Issue Description
The http/2 implementation in firebase-admin throws on network errors instead of handling them, which lets them propagate to the node process, which eventually crashes the process.
- For
GOAWAYerrors a fix has been implemented with https://github.com/parse-community/parse-server-push-adapter/issues/340. - For other network errors such as
ECONNRESETthere is no easy remediation.
The proper solution for any network error is to fix https://github.com/firebase/firebase-admin-node/issues/2789, for example via an event listener.
Steps to reproduce
This issue occurs on network error events, such as ECONNRESET.
Actual Outcome
Unhandled error crashes app.
Expected Outcome
Error should be handled by the firebase-admin.
Workaround
- Use the older version HTTP/1.1 by setting
fcmEnableLegacyHttpTransport: truein your push options. - Catch the error in a global Node process error handler.
Environment
Client
- Parse Server Push Adapter version:
6.8.0
Server
- Parse Server version:
7.3.0