You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: RNCallKeepModule onHostDestroy crashes Android instrumentation test runner #797
The following code in RNCallKeepModule.java for onHostDestroy causes the Android instrumentation test runner to crash:
Log.d(TAG, "[RNCallKeepModule] onHostDestroy executed");
// This line will kill the android process after ending all calls
android.os.Process.killProcess(android.os.Process.myPid());
Proposed Solution
The following code would cleanly close the app without crashing the Android instrumentation test runner:
Log.d(TAG, "[RNCallKeepModule] onHostDestroy executed");
// This line will cleanly close the app after ending all calls
getCurrentReactActivity().finishAffinity();
Steps to Reproduce
Create and run an Android Espresso UI Test
Versions
- Callkeep: 4.3.12
- React Native: 0.72.3
- Android: any
- Phone model: any
Logs
2024-07-19 10:06:37.970 12560-12560 RNCallKeep D [RNCallKeepModule] onHostDestroy called
2024-07-19 10:06:37.978 12560-12560 RNCallKeep D [RNCallKeepModule] stopListenToNativeCallsState
2024-07-19 10:06:37.978 12560-12560 RNCallKeep D [RNCallKeepModule] onHostDestroy executed
2024-07-19 10:06:37.978 12560-12560 Process I Sending signal. PID: 12560 SIG: 9
2024-07-19 10:06:38.072 13142-13142 WindowOnBackDispatcher W sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@cf6b1b2
2024-07-19 10:06:38.097 1488-2809 ActivityManager W Crash of app com.xxxx.xxxx running instrumentation ComponentInfo{com.xxxx.xxxx.test/androidx.test.runner.AndroidJUnitRunner}
This issue has had no activity for two years, so it will be closed in 30 days. If it still happens with the latest release, please comment with your react-native-callkeep, React Native and OS versions, and it will stay open.
Activity
github-actions commentedon Oct 17, 2026
This issue has had no activity for two years, so it will be closed in 30 days. If it still happens with the latest release, please comment with your react-native-callkeep, React Native and OS versions, and it will stay open.
fix(android): onHostDestroy no longer kills the process; ending calls…