star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
83 stars 54 forks source link

fix: bridge not set crash on reload #49

Closed jesperjohansson closed 9 months ago

jesperjohansson commented 2 years ago

Fixes crash on React Native reload that would occur sometimes:

*** Assertion failure in -[RCTEventEmitter sendEventWithName:body:](), react-native/React/Modules/RCTEventEmitter.m:58
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error when sending event: DiscoveryFinished with body: {
    identifier = "ACFA2001-ABC5-51C4-B125-323B1468CB2A";
}. Bridge is not set. This is probably because you've explicitly synthesized the bridge in StarDeviceDiscoveryManagerWrapper, even though it's inherited from RCTEventEmitter.'