react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

[iOS] Making calls from the native 'Recent' call list causes a crash

Open andynel opened this issue 7 years ago • 6 comments

Bug report

  • [ ] I've checked the example to reproduce the issue.

  • Reproduced on:

  • [ ] Android

  • [x] iOS

Description

When I click on a recent call item on my iPhone's native recent calls list (a call made by our VOIP application) the react-native app on the iPhone opens up and attempts to dial that number, but then immediately crashes. From my investigation it appears to fail in the file: react-native-callkeep/ios/RNCallKeep/RNCallKeep.m lines 469 to 477.

Steps to Reproduce

  1. Open iPhone's native Phone application.
  2. Select the "Recents" tab.
  3. Click on a recent item which was made by a VOIP application
  4. This should then load the mobile application to create the call - app crashes at this point

Versions

- Callkeep: 3.0.6
- React Native: 0.59.9
- iOS: 13.2.3
- Android: N/A
- Phone model: iPhoneXR

Logs

2019-11-20 14:23:45.383843+0200 XXXXXXXXXX[2526:469552] TCP Conn 0x2820d1080 Failed : error 0:61 [61]
2019-11-20 14:23:47.046257+0200 XXXXXXXXXX[2526:469365] [RNCallKeep][application:continueUserActivity]
2019-11-20 14:23:47.047104+0200 XXXXXXXXXX[2526:469365] -[INStartAudioCallIntent callCapability]: unrecognized selector sent to instance 0x2827e1d40
2019-11-20 14:23:47.047808+0200 XXXXXXXXXX[2526:469365] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[INStartAudioCallIntent callCapability]: unrecognized selector sent to instance 0x2827e1d40'
*** First throw call stack:
(0x1bf25bab0 0x1bef75028 0x1bf159f10 0x1bf260254 0x1bf2623f0 0x1041bca9c 0x104022224 0x10412a970 0x1c333c4e4 0x1c36799e8 0x1c367a6cc 0x1c333c1c4 0x1c2d315a0 0x1c2d31948 0x1c333c160 0x1c3679980 0x1c367a424 0x106491e1c 0x10649327c 0x1064a132c 0x1bf1d6e0c 0x1bf1d1b68 0x1bf1d1084 0x1c941f534 0x1c3341670 0x104022a68 0x1bf050e18)
libc++abi.dylib: terminating with uncaught exception of type NSException

andynel avatar Nov 20 '19 12:11 andynel

Confirmed this with @danjenkins this morning. Looks like Apple went back to the old way of passing the intent:

(lldb) p intent.callCapability
error: Execution was interrupted, reason: Attempted to dereference an invalid ObjC Object or send it an unrecognized selector.
The process has been returned to the state before expression evaluation.
(lldb) p [userActivity.activityType isEqualToString:INStartAudioCallIntentIdentifier];
(BOOL) $2 = YES

kylekurz avatar Nov 22 '19 17:11 kylekurz

FYI @manuquentin, we should probably add a thing to the default bug report form about what version of Xcode and Android Studio you're on, as that's also relevant from time to time.

kylekurz avatar Nov 22 '19 17:11 kylekurz

@andynel I'm running into the same issue. Any luck in solving it yet?

jbro-io avatar Nov 27 '19 07:11 jbro-io

@jbroquist no luck yet unfortunately

andynel avatar Nov 28 '19 07:11 andynel

Same here with Xcode 11.2.1 (11B500) with an iPhone 7 (iOS 13.2.2) but not on a iPhone SE (iOS 13.1.3).

On iOS 13.2.2 the issue is in RNCallKeep.m line 474: intent.callCapability is not found. But it is in 13.1.3...

It should be fixed in #134 can you please test against this branch ?

# package.json
"react-native-callkeep": "https://github.com/react-native-webrtc/react-native-callkeep#fix_call_capabilities_ios13_2",

manuquentin avatar Dec 01 '19 20:12 manuquentin

I just tested and it works off your branch fix_call_capabilities_ios13_2 @manuquentin

XCode Version 11.2.1 (11B53) iOS 13.2.3

It previously did not work on Callkeep 3.0.6

Thanks a lot!!

wimco avatar Dec 04 '19 12:12 wimco