Create a react-native project using create-react-native-app
and ejected without any change. After that, running the command yarn run android
generates a proper bundle and launches the app on my phone connected via USB. However a red screen with the message TypeError: undefined is not an object (evaluating '_configProvider.remoteModuleConfig')
appears for a few seconds, before the app crashes.
cat package.json
{
"name": "rn-expo-app",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "^0.3.0",
"react-test-renderer": "~15.4.1"
},
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"react": "~15.4.0",
"react-native": "0.42.3"
}
}
Tried to run the command with Gradle 3.4.1 and Gradle 2.14.1.
The phone was a Google Pixel 7.1.1. Also tried with Genymotion, emulating Nexus 5X 6.0.0 (with emulator, the red screen persists).
Full error message:
TypeError: undefined is not an object (evaluating '_configProvider.remoteModuleConfig') (http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:3547)
http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:3547:56
get@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:3934:12
http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:3369:32
loadModuleImplementation@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:127:8
guardedLoadModule@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:70:32
_require@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:54:18
http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:27365:26
loadModuleImplementation@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:127:8
guardedLoadModule@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:70:32
_require@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:54:18
setUpDevTools@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:22968:26
http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:22997:14
loadModuleImplementation@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:127:8
guardedLoadModule@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:63:37
_require@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:54:18
global code@http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:85271:9