react-native-callkeep
react-native-callkeep copied to clipboard
call keep crash : index 0 beyond bounds for empty array
Bug report
-
[x] I've checked the example to reproduce the issue.
-
Reproduced on:
-
[ ] Android
-
[x] iOS
Description
Fatal Exception: NSRangeException *** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty array
Steps to Reproduce
answer the call then got this error
Versions
- Callkeep: 4.3.12
- React Native: 0.72.5
- iOS: 17.0.3
- Android: NO
- Phone model: IOS
Logs
Fatal Exception: NSRangeException
*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty array
0
CoreFoundation
__exceptionPreprocess
2
CoreFoundation
-[__NSArray0 objectEnumerator]
3
VedaxLink
RNCallKeep.m - Line 182
+[RNCallKeep getAudioOutput] + 182
4
VedaxLink
RNCallKeep.m - Line 141
-[RNCallKeep onAudioRouteChange:] + 141
5
CoreFoundation
__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
20
UIKitCore
UIApplicationMain
21
VedaxLink
main.m - Line 8
main + 8
22
(Missing)
any solution????????
Same issue here
@CaptainJeff use my code to solve this:
+ (NSString *) getAudioOutput {
// return [AVAudioSession sharedInstance].currentRoute.outputs.count > 0 ? [AVAudioSession sharedInstance].currentRoute.outputs[0].portType : nil;
@try{
NSArray<AVAudioSessionPortDescription *>* outputs = [AVAudioSession sharedInstance].currentRoute.outputs;
if(outputs != nil && outputs.count > 0){
return outputs[0].portType;
}
return nil;
}@catch(NSException* anException) {
NSLog(@"getAudioOutput error :%@", [anException description]);
return nil;
}
}
We are getting same issue,