react-native-purchases
react-native-purchases copied to clipboard
react-native IOS crashing on refresh with the simulator: NSInternalInconsistencyException
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
Describe the bug After upgrading from 8.10 to 8.11.6 I get a crash every time I fast refresh or manually refresh the simulator. Here is the stack trace
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error when sending event: Purchases-LogHandlerEvent with body: {
logLevel = DEBUG;
message = "\U2139\Ufe0f LogInOperation: Started";
}. RCTCallableJSModules is not set. This is probably because you've explicitly synthesized the RCTCallableJSModules in RNPurchases, even though it's inherited from RCTEventEmitter.'
*** First throw call stack:
0 CoreFoundation 0x00000001804b910c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x0000000180092da8 objc_exception_throw + 72
2 Foundation 0x0000000180e67e68 -[NSMutableDictionary(NSMutableDictionary) classForCoder] + 0
3 APP.debug.dylib 0x000000010822b64c -[RCTEventEmitter sendEventWithName:body:] + 380
4 APP.debug.dylib 0x000000010805a418 __28-[RNPurchases setLogHandler]_block_invoke + 80
5 APP.debug.dylib 0x0000000107f782a0 $sSo12NSDictionaryCIeyBy_SDyS2SGIegg_TR + 60
6 APP.debug.dylib 0x0000000107f781b8 $s21PurchasesHybridCommon0C13FunctionalityC12setLogHander02onF8ReceivedyySDyS2SGc_tFZy10RevenueCat0F5LevelO_SStcfU_ + 332
7 APP.debug.dylib 0x0000000108a1b15c $s10RevenueCat9PurchasesC10logHandleryyAA8LogLevelO_SStcvsZyAF_S2SSgAGSutcfU_ + 152
8 APP.debug.dylib 0x0000000108a33850 $s10RevenueCat9PurchasesC10logHandleryyAA8LogLevelO_SStcvsZyAF_S2SSgAGSutcfU_TA + 36
9 APP.debug.dylib 0x0000000108a1b92c $s10RevenueCat9PurchasesC17verboseLogHandleryyAA0E5LevelO_S2SSgAGSutcvsZyAF_S2SA2GSutcfU_ + 216
10 APP.debug.dylib 0x0000000108a338cc $s10RevenueCat9PurchasesC17verboseLogHandleryyAA0E5LevelO_S2SSgAGSutcvsZyAF_S2SA2GSutcfU_TA + 52
11 APP.debug.dylib 0x00000001087b64bc $s10RevenueCat6LoggerV3log5level6intent7message8fileName08functionI04lineyAA8LogLevelO_AA0L6IntentOAA0L7Message_pyXKSSSgAPSutFZ + 872
12 APP.debug.dylib 0x00000001087b5ccc $s10RevenueCat6LoggerV5debug_8fileName08functionF04lineyAA10LogMessage_pyXK_SSSgAISutFZ + 152
13 APP.debug.dylib 0x00000001087c8fbc $s10RevenueCat16NetworkOperationC3logyys23CustomStringConvertible_pF + 196
14 APP.debug.dylib 0x00000001087c9d04 $s10RevenueCat16NetworkOperationC4mainyyF + 248
15 APP.debug.dylib 0x00000001087ca048 $s10RevenueCat16NetworkOperationC4mainyyFTo + 36
16 Foundation 0x0000000180eeda8c __NSOPERATION_IS_INVOKING_MAIN__ + 12
17 Foundation 0x0000000180ee9ff0 -[NSOperation start] + 620
18 Foundation 0x0000000180eee200 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 12
19 Foundation 0x0000000180eedf08 __NSOQSchedule_f + 168
20 libdispatch.dylib 0x00000001028caf60 _dispatch_block_async_invoke2 + 104
21 libdispatch.dylib 0x00000001028ba5d0 _dispatch_client_callout + 16
22 libdispatch.dylib 0x00000001028bda80 _dispatch_continuation_pop + 752
23 libdispatch.dylib 0x00000001028bca1c _dispatch_async_redirect_invoke + 896
24 libdispatch.dylib 0x00000001028ce4b0 _dispatch_root_queue_drain + 372
25 libdispatch.dylib 0x00000001028cf058 _dispatch_worker_thread2 + 256
26 libsystem_pthread.dylib 0x0000000102952b90 _pthread_wqthread + 228
27 libsystem_pthread.dylib 0x000000010295198c start_wqthread + 8
- Environment
- Platform: React-native
- SDK version: 8.11.6
- OS version:
- Xcode/Android Studio version: latest
- React Native version: 71
- SDK installation (CocoaPods + version or manual): Cocoapods
- How widespread is the issue. Percentage of devices affected: Literally happens on every device refresh
- Steps to reproduce, with a description of expected vs. actual behavior
- open app on simulator, manually refresh