Please provide the following:
- SDK Version: 34.0.0
- Platforms(Android/iOS/web/all): Android
I’ve recently ejected my app to the bare workflow and I’m getting this error whenever I build the Android app with react-native run-android
(image below): "null is not an object" error evaluating (_expoConstants.default.manifest.releaseChannel)
Curiously, the app runs perfectly if I use expo start
instead…
I’ve looked through the forums and I’ve found this very similar error, unfortunately it was automatically closed without any suggestions I could follow
My case is slightly different, I only use expo libraries in one place (below). And I seem to get the error even if I remove the import to expo-constants and use of the Constants.
import Sentry from 'sentry-expo';
import Constants from 'expo-constants';
import store from "../store"
import moment from "moment"
/**
* This option activates Sentry in development, if we want to test it
* we simply uncomment the line below
*/
// Sentry.enableInExpoDevelopment=true
Sentry.config(.....).install();
export const configureTagContext = () => {
Sentry.setTagsContext({
appVersion: Constants.platform.android.versionCode,
deviceInfo: {
deviceName: Constants.deviceName,
}
})
Sentry.setExtraContext({
installationId: Constants.installationId,
isRunningInExpo: Constants.appOwnership
})
}
package.json
{
"name": "empty-project-template",
"private": true,
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"release-android": "react-native run-android --variant=release",
"ios": "react-native run-ios",
"test": "node ./node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo",
"transform": {
"\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
},
"verbose": true,
"cacheDirectory": "./cache",
"coveragePathIgnorePatterns": [],
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|react-clone-referenced-element|expo(nent)?|@expo(nent)?/.*|react-navigation|sentry-expo))"
],
"setupFiles": [
"<rootDir>/node_modules/react-native/jest/setup.js",
"<rootDir>/node_modules/jest-expo/src/setup.js"
],
"setupTestFrameworkScriptFile": "<rootDir>/testConfig/setup.js",
"moduleNameMapper": {
"\\.(jpg|jpeg|png|svg)$": "<rootDir>/testConfig/imageMock.js",
"\\.(css|scss)$": "identity-obj-proxy"
}
},
"dependencies": {
"expo": "^34.0.3",
"expo-constants": "^6.0.0",
"firebase": "^5.8.4",
"jetifier": "^1.6.4",
"moment": "^2.24.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "0.59.10",
"react-native-country-picker-modal": "^0.7.1",
"react-native-datepicker": "^1.7.2",
"react-native-elements": "^0.19.1",
"react-native-gesture-handler": "^1.3.0",
"react-native-paper": "^2.16.0",
"react-native-phone-input": "^0.2.1",
"react-native-reanimated": "^1.1.0",
"react-native-screens": "1.0.0-alpha.22",
"react-native-swipe-gestures": "^1.0.3",
"react-native-unimodules": "~0.5.2",
"react-native-web": "^0.11.4",
"react-navigation": "^3.0.9",
"react-navigation-material-bottom-tabs": "^1.0.0",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-persist": "^5.9.1",
"redux-thunk": "^2.3.0",
"sentry-expo": "^1.13.0",
"uuid": "^3.3.2"
},
"devDependencies": {
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.9.1",
"jest": "^23.2.0",
"jest-enzyme": "^7.0.1",
"jest-expo": "^34.0.0",
"jsdom": "^13.2.0",
"react-dom": "^16.8.2",
"redux-logger": "^3.0.6"
}
}
In the conversation in the related post an Expo Team member states
I think since the manifest is either served through
expo-cli
or created onexpo publish
, bare apps wouldn’t have access to it. I’ll confirm this, and if it’s the case I’ll modify the docs to reflect this.strong text
But as stated above removing my references to Constants doesn’t appear to solve the problem.
Any help or direction is appreciated as I’m fully lost on this one.