SDK 39 Renanimated V2 android standalone apk crashing on load
See original GitHub issue🐛 Bug Report
Summary of Issue
When building an apk using Expo SDK 39 with the reanimated V2 Configuration, the standalone app will not open and crashes.
Edit(2020-10-08): This seems to be not specific to building the apk. But simply running the app in production mode (i.e. expo start --no-dev) should crash on load.
Environment - output of expo diagnostics
& the platform(s) you’re targeting
OS: Windows
Expo CLI 3.27.13 environment info: System: Binaries: Node: 12.14.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763 npmPackages: expo: ~39.0.0 => 39.0.3 react: ~16.13.0 => 16.13.1 react-dom: ~16.13.0 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-39.0.2.tar.gz => 0.63.2 react-native-web: 0.13.13 => 0.13.13 Expo Workflow: managed
Reproducible Demo
I initially found this when trying to migrate my own project, but the same issue is reproduceable in the ‘with-reanimated2’ create react native app template. Note this works fine running locally off an expo start.
Note: I am not able to test if this works on iOS.
Steps to Reproduce
- run npx create-react-native-app --template with-reanimated2
- expo build:android
- install .apk on emulator/phone
- open app
Expected Behavior vs Actual Behavior
The app crashes while opening. And I got the following from an ‘adb logcat *:E’ on my emulator.
10-05 15:21:08.680 27460 27460 E AndroidRuntime: FATAL EXCEPTION: main
10-05 15:21:08.680 27460 27460 E AndroidRuntime: Process: com.loganlim.testReanimatedV2, PID: 27460
10-05 15:21:08.680 27460 27460 E AndroidRuntime: java.lang.RuntimeException: Expo encountered a fatal error: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary., stack:
10-05 15:21:08.680 27460 27460 E AndroidRuntime: exports@23:286
10-05 15:21:08.680 27460 27460 E AndroidRuntime: getEnforcing@27:169
10-05 15:21:08.680 27460 27460 E AndroidRuntime: <unknown>@747:222
10-05 15:21:08.680 27460 27460 E AndroidRuntime: v@2:1473
10-05 15:21:08.680 27460 27460 E AndroidRuntime: <unknown>@746:156
10-05 15:21:08.680 27460 27460 E AndroidRuntime: v@2:1473
10-05 15:21:08.680 27460 27460 E AndroidRuntime: <unknown>@741:5441
10-05 15:21:08.680 27460 27460 E AndroidRuntime: v@2:1473
10-05 15:21:08.680 27460 27460 E AndroidRuntime: <unkno
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at host.exp.exponent.experience.q.F(BaseExperienceActivity.java:7)
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at host.exp.exponent.experience.a.run(Unknown Source:2)
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:907)
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223)
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7478)
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
10-05 15:21:08.680 27460 27460 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
10-05 15:21:08.788 559 642 E InputDispatcher: channel '7198952 com.loganlim.testReanimatedV2/host.exp.exponent.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
10-05 15:21:08.793 559 1825 E SurfaceControl: Call to SurfaceControl.closeTransaction without matching openTransaction
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (7 by maintainers)
we’ll hopefully have an answer for next week, thanks for the info.
Bug found and fixed. 🕵️ The change is being applied to SDK39 Android workers, you may expect it to land in the next 12 hours. 🔜