Crash happens on BugReporting.setInvocationEvents
haozhutw opened this issue · 4 comments
Steps to Reproduce the Problem
This crash is reported by Firebase, no reproduce steps 'cause we cannot reproduce this.
Expected Behavior
This crash shouldn't happen
Actual Behavior
Crash happens when invoke BugReporting.setInvocationEvents
Instabug integration code
This is how we setup Instabug at app launch process
export const setupInstabug = () => {
Instabug.startWithToken(TOKEN, [Instabug.invocationEvent.shake]);
BugReporting.setShakingThresholdForAndroid(shakeThresholdForAndroid);
BugReporting.setInvocationOptions([
BugReporting.invocationOptions.emailFieldOptional,
BugReporting.invocationOptions.commentFieldRequired,
]);
BugReporting.setEnabled(true);
Chats.setEnabled(true);
Replies.setEnabled(true);
BugReporting.setReportTypes([
BugReporting.reportType.bug,
BugReporting.reportType.feedback,
BugReporting.reportType.question,
]);
Instabug.setStringToKey(
I18n.t("instabug.overrideWelcomeMessageLiveWelcomeStepContent"),
Instabug.strings.welcomeMessageLiveWelcomeStepContent,
);
Instabug.setStringToKey(
I18n.t("instabug.overrideWelcomeMessageLiveWelcomeStepTitle"),
Instabug.strings.welcomeMessageLiveWelcomeStepTitle,
);
};
We have a setting option for users to turn on or turn off the shaking function. shouldEnableShake
is based on the switch control's on/off status.
BugReporting.setInvocationEvents(
shouldEnableShake ? [Instabug.invocationEvent.shake] : [Instabug.invocationEvent.none],
);
SDK Version
10.8.1
React Native, iOS and Android Versions
React Native: 0.61.5
iOS: 11 and above
Android: 5.0 and above
Crash logs
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x198acb240 objc_msgSend + 32
1 Instabug 0x10625d724 -[IBGInvocationShake initWithDelegate:] + 37 (IBGInvocationShake.m:37)
2 Instabug 0x1062ab84c -[IBGReportInvocationManager setEventRecognizersForEvents:] + 207 (IBGReportInvocationManager.m:207)
3 Instabug 0x1062ab32c -[IBGReportInvocationManager setInvocationEvent:] + 129 (IBGReportInvocationManager.m:129)
4 Instabug 0x10631bcc8 +[IBGBugReporting setInvocationEvents:] + 117 (IBGBugReporting.m:117)
5 MyApp 0x1053bf814 -[InstabugBugReportingBridge setInvocationEvents:] + 123 (InstabugBugReportingBridge.m:123)
6 CoreFoundation 0x198d12424 __invoking___ + 148
7 CoreFoundation 0x198d122a8 -[NSInvocation invoke] + 380
8 CoreFoundation 0x198d457a8 -[NSInvocation invokeWithTarget:] + 80
9 MyApp 0x1051f3234 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 572 (RCTModuleMethod.mm:572)
10 MyApp 0x1051f52fc facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 108 (RCTNativeModule.mm:108)
11 MyApp 0x1051f506c invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 365 (Optional.h:365)
12 libdispatch.dylib 0x198a82128 _dispatch_call_block_and_release + 32
13 libdispatch.dylib 0x198a83ec0 _dispatch_client_callout + 20
14 libdispatch.dylib 0x198a92314 _dispatch_main_queue_callback_4CF + 884
15 CoreFoundation 0x198d718e8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
16 CoreFoundation 0x198d302fc __CFRunLoopRun + 2524
17 CoreFoundation 0x198d2f1a8 CFRunLoopRunSpecific + 600
18 HIToolbox 0x1a0c54b40 RunCurrentEventLoopInMode + 292
19 HIToolbox 0x1a0c548b4 ReceiveNextEventCommon + 552
20 HIToolbox 0x1a0c54674 _BlockUntilNextEventMatchingListInModeWithFilter + 72
21 AppKit 0x19b521660 _DPSNextEvent + 836
22 AppKit 0x19b520000 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1292
23 AppKit 0x19b511e4c -[NSApplication run] + 596
24 AppKit 0x19b4e3878 NSApplicationMain + 1064
25 AppKit 0x19b7d2ad0 _NSApplicationMainWithInfoDictionary + 22
26 UIKitMacHelper 0x1abc60e18 UINSApplicationMain + 1280
27 UIKitCore 0x1bbb6db1c UIApplicationMain + 164
28 MyApp 0x104fad5d0 main + 14 (main.m:14)
29 libdyld.dylib 0x198c51430 start + 4
This issue happens on iOS 14.0 and above currently from the Firebase console. Is something wrong with the implementation? I think I have followed the api document, this crash is not supposed to happen.
For anyone facing the issue, a fix is expected in an upcoming release. For now, you can use this snapshot:
npm install --save https://github.com/Instabug/Instabug-React-Native#snapshot-ios/10.9.2-INSD-5983
For anyone facing the issue, a fix is expected in an upcoming release. For now, you can use this snapshot:
npm install --save https://github.com/Instabug/Instabug-React-Native#snapshot-ios/10.9.2-INSD-5983
Thank you @AliAbdelfattah , hope this fix works.
I want to close this since we have just fully released a new app version, and no similar crash report showed on Firebase. Looks like this is fixed, thank you @AliAbdelfattah