-
Notifications
You must be signed in to change notification settings - Fork 375
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
Fix sendEvent fired before React was fully set up #906
base: main
Are you sure you want to change the base?
Fix sendEvent fired before React was fully set up #906
Conversation
**Bug** The application crashed after received notification when application is still starting up (the React instance had not been fully set up) **Resolved By** Add react instance checker before emit event
Hi @abdullahizzuddiin , any plan to include this fix in recent SDK release? |
Thanks for submitting this PR. Has anyone found official docs regarding this or an ongoing bug in React Native related to this issue? In other words, is this a workaround or a temporary solution? I found a similar related thread but it isn't official React Native so I want to be sure this change is the correct fix for the problem. Update: I found an example of this being used here While adding this check may patch the issue, we should investigate why this is happening in the first place |
Thanks @rgomezp , from crashlytics, this issue is still growing, so we wonder this workaround / fix can be apply in coming sdk release. |
Hi OneSignal administrator, any plan to include this fix to Onesignal 4.0 sdk? |
Howdy @conradchenghk01 , I will bring up to my team this week to prioritize. |
Is this PR enough to solve this issue or you will create another solution? @rgomezp Actually, I never seen this crash again after my app use this patch. |
Thanks @rgomezp , same as @abdullahizzuddiin , we applied a patch to solve the issue too~ |
Thanks @abdullahizzuddiin, we are using this patch to workaround this issue too. I noticed that the SDK is already doing something similar to this in |
…t was fully set up, as suggested in OneSignal#906
Bug
The application crashed after received notification when application is still starting up (the React instance had not been fully set up)
Resolved By
Add react instance checker before emit event. Only emit event, when react instance was active
Fixes #877
This change is