Closed jamsinclair closed 6 months ago
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Summary
There is a longstanding bug (4+ years) where users, who are only using the local notifications feature, experience an application crash on initial boot and/or when the refresh token logic runs.
The documentation and API make it appear that Firebase is not required to be configured to use this library.
Related Issues
343
924
285
337
Comments are still being made, as recent as last month , commenting on this exact bug.
Proposed Improvement
Looking at the source code, it seems like the intention was that Firebase failures would be handled and not crash the application.
The source of the issue is that the
FirebaseMessaging.getInstance()
method throws an exception immediately, when not configured, that triggers a runtime crash. I propose catching this error and log a warning with an actionable step that developers can take.I think fixing this issue would be a small change but a significant improvement for many developers and help ensure everyone benefits and succeeds with the hard work that has been put into this project 🙇
Edit: Given what's going on in current world events, this is not an important issue, feel free to ignore. Hope staff at Wix are getting the support they need.
Temporary Fork
In the interim I've created a temporary package fork that people can take advantage until someday we can resolve this 😊
https://www.npmjs.com/package/@jamsinclair/react-native-notifications