expo: [expo 43] Fatal Exception: Unable to pause activity
Summary
I’m having crashes on Crashlytics after upgrade to expo 43.0.2. I don’t know how to reproduce the crash, I have them on Crashlytics.
I’m in bare workflow.
Fatal Exception: java.lang.RuntimeException: Unable to pause activity {com.myapp/host.exp.exponent.MainActivity}: java.lang.reflect.InvocationTargetException
at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4251)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4206)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4158)
at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1977)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6936)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
Caused by java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Method.java)
at expo.modules.ReactActivityDelegateWrapper.invokeDelegateMethod(ReactActivityDelegateWrapper.kt:134)
at expo.modules.ReactActivityDelegateWrapper.onPause(ReactActivityDelegateWrapper.kt:69)
at com.facebook.react.ReactActivity.onPause(ReactActivity.java:51)
at android.app.Activity.performPause(Activity.java:7341)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1487)
at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4241)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4206)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4158)
at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1977)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6936)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
Caused by java.lang.AssertionError
at com.facebook.infer.annotation.Assertions.assertNotNull(Assertions.java:28)
at com.facebook.react.ReactInstanceManager.onHostPause(ReactInstanceManager.java:552)
at com.facebook.react.ReactDelegate.onHostPause(ReactDelegate.java:63)
at com.facebook.react.ReactActivityDelegate.onPause(ReactActivityDelegate.java:95)
at java.lang.reflect.Method.invoke(Method.java)
at expo.modules.ReactActivityDelegateWrapper.invokeDelegateMethod(ReactActivityDelegateWrapper.kt:134)
at expo.modules.ReactActivityDelegateWrapper.onPause(ReactActivityDelegateWrapper.kt:69)
at com.facebook.react.ReactActivity.onPause(ReactActivity.java:51)
at android.app.Activity.performPause(Activity.java:7341)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1487)
at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4241)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4206)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4158)
at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1977)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6936)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
43.0.2
Environment
Expo CLI 4.12.12 environment info:
System:
OS: macOS 12.0.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.1 - /usr/local/bin/node
npm: 6.14.15 - /usr/local/bin/npm
Watchman: 4.9.0 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK:
API Levels: 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.3
System Images: android-30 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7784292
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
npmPackages:
expo: ~43.0.2 => 43.0.2
react: 17.0.1 => 17.0.1
react-native: 0.64.2 => 0.64.2
npmGlobalPackages:
expo-cli: 4.12.10
Expo Workflow: bare
Reproducible demo
I don’t know how to reproduce, I have the crash on Crashlytics.
Devices affected:
- T8 - Android: 11
- OnePlus Nord N200 5G - Android: 11
- Moto Z(3) - Android: 9
- Galaxy A32 5G - Android: 11
- Stratus_C5 - Android: 10
- Galaxy S21 5G - Android: 11
- moto g stylus (2021) - Android: 11
- LG Stylo 5 - Android: 10
- REVVL 4+ - Android: 11
- Galaxy S20 5G - Android: 11
- K51 - Android: 10
- And a lot of more…
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 24 (13 by maintainers)
Commits related to this issue
- [core] Fix ReactInstanceManager.onHostPause exception from background (#15748) # Why fix the root cause of #15298 some context in the message: https://github.com/expo/expo/issues/15298#issuecomme... — committed to expo/expo by Kudo 2 years ago
- [core] Fix ReactInstanceManager.onHostPause exception from background (#15748) fix the root cause of #15298 some context in the message: https://github.com/expo/expo/issues/15298#issuecomment-1002634... — committed to expo/expo by Kudo 2 years ago
- [core] Fix ReactInstanceManager.onHostPause exception from background (#15748) fix the root cause of #15298 some context in the message: https://github.com/expo/expo/issues/15298#issuecomment-1002634... — committed to expo/expo by Kudo 2 years ago
hi there! we’ve published the expo packages to address the issue.
for sdk 44
please try to upgrade packages by
yarn add expo@~44.0.4. supposedly that would also upgradeexpo-modules-core. please make sure it is true byyarn why expo-modules-coreand the returned version should be0.6.4.for sdk 43
please upgrade expo-modules-core by
yarn add expo-modules-core@~0.4.10.if this doesn’t work for you, please let us know. thanks for reporting this issue to us.
@Kudo my pleasure. 😃 Happy to give something back to this project.
@mukund-akqa same
We are also using this override for working in pip mode:
also thank to @RodolfoGS as always to give us valuable feedback.
i am going to merge the pr and work on releasing the updated packages. will let you know when the update packages available.