Skip to content
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

Crash when reloading #448

Open
mo22 opened this issue Jun 4, 2023 · 4 comments
Open

Crash when reloading #448

mo22 opened this issue Jun 4, 2023 · 4 comments

Comments

@mo22
Copy link

mo22 commented Jun 4, 2023

Getting the following error during reload:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error when sending event: RNSensorsBarometer with body: {
    pressure = "1013.959655761719";
    timestamp = 1685887033002;
}. RCTCallableJSModules is not set. This is probably because you've explicitly synthesized the RCTCallableJSModules in RNSensorsBarometer, even though it's inherited from RCTEventEmitter.'

proposed solution: add to all modules:

- (void)stopObserving {
    [self stopUpdates];
}
@alessioemireni
Copy link

+1

@skizzo
Copy link

skizzo commented Oct 29, 2023

Were you able to fix this? Thanks

@gregbrinker
Copy link

gregbrinker commented Oct 31, 2023

@mo22 @alessioemireni @skizzo

This fix from @zhongwuzw worked for me. You can implement the same pattern in whichever sensors you're using

#458

@zhongwuzw
Copy link

I would update the PR to fix this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants