Error: Exception in HostObject::get for prop 'NativeUnimoduleProxy': java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Any, js engine: hermes
See original GitHub issueSummary
I just migrated to the expo from react-native-unimodules
. this error is happening only for android when I open app on android.
I also did a patch to expo-file-system
may be it is due to that patch
https://github.com/expo/expo/issues/15632#issuecomment-1000943427
here is the full error log
Error: Exception in HostObject::get for prop 'NativeUnimoduleProxy': java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Any, js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
if I uninstall the app and reinstall the app then this error is gone.
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)
No response
Environment
Expo CLI 5.0.3 environment info: System: OS: macOS 12.1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 6.14.10 - ~/.nvm/versions/node/v14.15.4/bin/npm Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 22, 23, 25, 26, 27, 28, 29, 30, 31 Build Tools: 26.0.0, 26.0.2, 27.0.3, 28.0.2, 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0 System Images: android-24 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 13.2/13C90 - /usr/bin/xcodebuild npmPackages: babel-preset-expo: ^9.0.2 => 9.0.2 expo: ^44.0.4 => 44.0.4 react: ^17.0.2 => 17.0.2 react-native: ^0.66.4 => 0.66.4 npmGlobalPackages: eas-cli: 0.41.1 expo-cli: 5.0.3 Expo Workflow: bare
Reproducible demo
I think it will be reproduced when you will use the same version of RN and expo which I am using. you have to update the existing app in mobile for reproducing instead of installing fresh APK
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
I think it might be the same issue as this one: https://github.com/expo/expo/issues/15924
I patched in using patch-package and this patch (expo-localization+12.0.1.patch):