Skip to content
This repository was archived by the owner on Jul 28, 2022. It is now read-only.

Conversation

@arnaud-roland
Copy link
Contributor

We have users who have a crash while opening their app from a push notification. Actually the event dispatcher added in the recent versions, try to access the module before the React instance be fully set up.

}
reactContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(eventName, params);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it crash here? If so there might be a bug in RN and we should open an issue on their repo

@Nullable WritableMap params) {

if (!reactContext.hasActiveCatalystInstance()) {
Log.d(NAME, "React context has no active catalyst instance. Aborting send event.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would store the event, and send it later once react gets an active catalyst instance
Otherwise you lose the event :/

@Minishlink Minishlink merged commit c39288a into bamlab:master Jan 23, 2022
@arnaud-roland arnaud-roland deleted the fix-react-context-not-setup branch April 7, 2022 07:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants