react-native-unimodules
react-native-unimodules copied to clipboard
The "UMNativeModulesProxy" native module is not exported through NativeModules; verify that @unimodules/react-native-adapter's native code is linked properly
This is for React Native version 0.62. The issue occurs in this repo (https://github.com/brentvatne/testwithsixtwo) on Android.
First, when the app is built and launched on the device, app launches fine, but when we close the app and launch it from the App Drawer, then this issue occurs. This issue makes debugging difficult as every time we need to start the build again.
Reproducible demo
- Clone the repo (https://github.com/brentvatne/testwithsixtwo)
- Run
yarn install; react-native start
andreact-native run-android
- Now the app launches and works fine on the device.
- Now close the app (also from background) on the device
- Open the app again from the App Drawer, you will get this error.
Bizarrely enough I'm having this appear in a console.warn when I run my jest tests, (rn version: 0.63.2, running in expo bare-workflow) the app runs fine on simulators/physical devices, so it doesn't hinder me as much as make it just really annoying to read my test output - don't supposed there was ever any resolution to this?
Bizarrely enough I'm having this appear in a console.warn when I run my jest tests, (rn version: 0.63.2, running in expo bare-workflow) the app runs fine on simulators/physical devices, so it doesn't hinder me as much as make it just really annoying to read my test output - don't supposed there was ever any resolution to this?
same with me
Getting same issue here when running my Jest tests. Anyone found any solutions for the warning?
Getting same error when running Jest tests.
For those getting this warning in your tests -- make sure you're using the jest-expo
preset if you aren't already.
Also, if you're:
- using
jest-expo >40.0.1
and - applying both
jest-expo/jest-preset
andreact-native/jest-preset
in your jest config in anObject.assign
fashion, like so:
const expoPreset = require("jest-expo/jest-preset");
const jestPreset = require("react-native/jest-preset");
module.exports = Object.assign(expoPreset, jestPreset, {
// additional config
});
...then you need to stop doing 2 and only apply jest-expo
:
const expoPreset = require("jest-expo/jest-preset");
module.exports = Object.assign(expoPreset, {
// additional config
});
Long story short, jest-expo
changed its logic from mutating react-native/jest-preset
directly to overriding a copy of react-native/jest-preset
. Before that change, applying the react-native/jest-preset
on top of jest-expo
was basically a no-op because it was just the same mutated object. After the change, this made it so that all of the jest-expo
overrides were being wiped out by the original react-native/jest-preset
.
Getting same issue here. Anyone looking into this?
Same problem here using bare workflow. The issue appeared when added expo-font module
yarn add expo-font
I'm running into the same thing with Jest tests as well. Has anyone found a solution?
Same issue; I can't get my app to run at all with this issue. In my case it's followed by
ERROR TypeError: null is not an object (evaluating 'NativeUnimoduleProxy.viewManagersNames')
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.
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.
I figured out what was causing the problem in my application but it's very strange. It looks like it was cause by importing the method from an index file with a bunch of other methods in it like this:
// utils/index.js
export {validateEmail as validateEmail} from './input-validation';
export {validatePassword as validatePassword} from './input-validation';
so I just changed the import in the test files from import {validatePassword} from '../src/utils'
to import {validatePassword} from '../src/utils/input-validation'