Why is React Native app not installing after successful build with expo? - reactjs

After successful building expo app, it wont install in any phone.
This may be very easy but have tried all i know to fix this but didn't work.
This is my craziest experience since i have been working on react...
Below are the steps i take from installing the app to building it
npm install expo-cli --global
expo init my-new-project
cd my-new-project => expo start
npm install -g exp
expo build:android //i choose "Let Expo handle the process!"
Here's my app.json
{
"expo": {
"name": "project",
"slug": "my-new-project",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.project.test"
},
"android": {
"package": "com.project.test"
}
}
}
Here's my package.json
{
"name": "project",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/samples": "~3.0.3",
"#expo/vector-icons": "^10.0.3",
"#react-navigation/web": "^1.0.0-alpha.9",
"expo": "^35.0.0",
"expo-asset": "^7.0.0",
"expo-constants": "^7.0.0",
"expo-font": "^7.0.0",
"expo-web-browser": "^7.0.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-gesture-handler": "~1.3.0",
"react-native-web": "^0.11.7",
"react-navigation": "^3.12.0"
},
"devDependencies": {
"babel-preset-expo": "^7.0.0",
"jest-expo": "^35.0.0"
},
"private": true
}
Please any help?

Find your way to developer options in your phone settings and disable it as it shows in the picture above.
That's how I solved mine.
Hope that will work for you.

Related

should NOT have additional property ‘nodeModulesPath’

Good afternoon! hope you all in the good condition.
I’ve something to ask, i’ve using react native sdk 41 (after i upgraded my project), and then, when i want to publish using expo build:android -t app-bundle, i got Error looks like this Error: Problem validating fields in app.json. See https://docs.expo.io/workflow/configuration/ • should NOT have additional property 'nodeModulesPath'., when i see my app.json, i’m pretty sure that my app.json is fine (at least in my opinion)
Here’s my app.json:
{
"expo": {
"name": "MyProjectName",
"slug": "MyProjectSlug",
"version": "1.1.2",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "MyProjectScheme",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#393939"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"android": {
"package": "com.mycompany.myprojectpackage"
"versionCode": 31,
"config": {
"googleMobileAdsAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
},
"ios": {
"supportsTablet": true,
"config": {
"googleMobileAdsAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
}
}
And here’s my package.json looks like:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/vector-icons": "^12.0.0",
"#react-native-async-storage/async-storage": "^1.15.4",
"#react-native-community/masked-view": "0.1.10",
"#react-native-community/netinfo": "6.0.0",
"#react-navigation/bottom-tabs": "^5.0.0",
"#react-navigation/native": "^5.0.0",
"#react-navigation/stack": "^5.14.4",
"#react-navigation/web": "~1.0.0-alpha.9",
"axios": "^0.19.2",
"expo": "^41.0.0",
"expo-ads-admob": "~10.0.4",
"expo-asset": "~8.3.1",
"expo-av": "~9.1.2",
"expo-constants": "~10.1.3",
"expo-font": "~9.1.0",
"expo-image-picker": "~10.1.4",
"expo-permissions": "~12.0.1",
"expo-splash-screen": "~0.10.2",
"expo-web-browser": "~9.1.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
"react-native-gesture-handler": "~1.10.2",
"react-native-reanimated": "~2.1.0",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.0.0",
"react-native-svg": "12.1.0",
"react-native-vector-icons": "^6.6.0",
"react-native-web": "~0.13.12",
"react-native-webview": "11.2.3",
"reanimated-bottom-sheet": "^1.0.0-alpha.19"
},
"devDependencies": {
"#babel/core": "~7.9.0",
"babel-preset-expo": "8.3.0",
"jest-expo": "^41.0.0"
},
"private": true
}
Can someone help me about this thing? i really appriciate it :)
Yes, I faced the same issue. So I upgraded the expo-cli using npm install -g expo-cli My expo-cli version is 4.4.4 and I can't see the error anymore.
Em... i think i solved this, not really me, you can see 51194, just doin npm install -g expo-cli

When I use metro bundle to run and test the app it works fine. but when I build android apk it not working it restarting again & again

When I use metro bundle to run and test the app it works fine. but when I build android apk it not working it restarting again & again
code
app.json
{
"expo": {
"name": "hawala",
"description": "hawal App",
"slug": "rikshawala",
"privacy": "public",
"platforms": [
"ios",
"android"
],
"android": {
"package": "com.rafi.bbb",
"versionCode": 1
}
},
"notification": {
"icon": "./assets/images/logo96x96.png"
},
"version": "1.0",
"orientation": "portrait",
"icon": "./assets/images/logo1024x1024.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"packagerOpts": {
"config": "metro.config.js"
},
"ios": {
"supportsTablet": true,
"usesAppleSignIn": true,
"bundleIdentifier": "com.rafi.bbb",
"infoPlist": {
"NSLocationAlwaysUsageDescription": "This app uses the always location access in the background for improved pickups and dropoffs, customer support and safety purpose.",
"NSLocationAlwaysAndWhenInUseUsageDescription": "This app uses the always location access in the background for improved pickups and dropoffs, customer support and safety purpose.",
"NSLocationWhenInUseUsageDescription": "This app uses the location to find the Cabs near you.",
"NSCameraUsageDescription": "This app uses the camera to take your profile picture.",
"NSPhotoLibraryUsageDescription": "This app uses Photo Library for uploading your profile picture.",
"ITSAppUsesNonExemptEncryption":false,
"UIBackgroundModes": [
"audio",
"location",
"fetch"
]
},
"config": {
"googleMapsApiKey": "aSyA_u1jnW9UF_76hxCrNFut0"
},
"googleServicesFile": "./GoogleService-Info.plist",
"buildNumber": "1.0"
},
"android": {
"package": "com.rafi.bbb",
"versionCode": 1,
"permissions": [
"CAMERA",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CAMERA_ROLL",
"FOREGROUND_SERVICE",
"ACCESS_BACKGROUND_LOCATION"
],
"googleServicesFile": "./google-services.json",
"config": {
"googleMaps": {
"apiKey": "IzaSyA_u1jnWUFxjyYG_76hxuC6jFut0"
}
},
"useNextNotificationsApi": true
},
"facebookScheme": "fb3937477975",
"facebookAppId": "4337477975",
"facebookDisplayName": "Rawala"
}
package.json
{
"name": "mobile-app",
"version": "2.5.0",
"main": "__generated__/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"clear": "expo r -c",
"eject": "expo eject",
"update": "expo update"
},
"dependencies": {
"#firebase/app-types": "^0.6.1",
"#mapbox/polyline": "^1.1.1",
"#react-native-async-storage/async-storage": "^1.13.2",
"#react-native-community/datetimepicker": "3.0.4",
"#react-native-community/masked-view": "0.1.10",
"#react-navigation/native": "^5.7.5",
"assets": "1.0.0",
"common": "1.0.0",
"config": "1.0.0",
"expo": "^40.0.0",
"expo-apple-authentication": "~2.2.2",
"expo-asset": "~8.2.1",
"expo-av": "~8.7.0",
"expo-constants": "~9.3.3",
"expo-crypto": "~8.4.0",
"expo-facebook": "~9.1.0",
"expo-firebase-recaptcha": "^1.1.0",
"expo-font": "~8.4.0",
"expo-image-picker": "~9.2.0",
"expo-location": "~10.0.0",
"expo-notifications": "~0.8.2",
"expo-permissions": "~10.0.0",
"expo-task-manager": "~8.6.0",
"expo-updates": "~0.4.1",
"firebase": "7.9.0",
"haversine": "1.1.1",
"react": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-actions-sheet": "^0.3.5",
"react-native-dash": "0.0.11",
"react-native-elements": "^2.3.2",
"react-native-gesture-handler": "~1.8.0",
"react-native-google-maps-directions": "^2.1.1",
"react-native-google-places-autocomplete": "^1.8.0",
"react-native-maps": "^0.27.1",
"react-native-modal-datetime-picker": "^8.7.1",
"react-native-picker-select": "^7.0.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.0",
"react-native-segmented-control-tab": "^3.4.1",
"react-native-simple-radio-button": "^2.7.4",
"react-native-star-rating": "^1.1.0",
"react-native-vector-icons": "^7.0.0",
"react-native-webview": "11.0.0",
"react-navigation": "^4.3.7",
"react-navigation-drawer": "^2.4.11",
"react-navigation-stack": "^2.3.11",
"react-redux": "^7.2.0"
},
"devDependencies": {
"#babel/core": "~7.9.0",
"babel-preset-expo": "8.3.0",
"expo-yarn-workspaces": "^1.2.1"
}
}
I used this command to run expo app in production mode.
expo start --no-dev --minify.
you will got exact error
and I get this error
uncaught Error :java.lang.Exception:Faild to load all assetsenter image description here

I cannot run React Native app on expo environment on Android

I cannot run React Native app on expo environment on Android; it throws this error when running the app on Expo on my Android phone:
Something went wrong.
32.0.0 is not a valid sdk version. Options are 35.0.0, 34.0.0, 33.0.0, UNVERSIONED.
Same app works perfectly on Expo environment on my iOS phone.
I launch 'expo start' from my MAC and connect both phones to the same WIFI as my MACBOOK PRO.
Here is my app.json file :
{
"expo": {
"name": "travel-management-app",
"slug": "travel-management-app",
"description": "Travel management application",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"primaryColor": "#cccccc",
"icon": "./assets/icons/bg_screen5_square.png",
"splash": {
"image": "./assets/icons/bg_screen5.png"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
Here is my package.json file :
{
"name": "travel-management-app",
"version": "1.0.0",
"description": "Travel management Application",
"author": "Luchian Chivoiu",
"private": true,
"homepage": "https://www.sienna.ro",
"main": "src/index.native.js",
"dependencies": {
"#babel/polyfill": "^7.2.5",
"#expo/vector-icons": "^9.0.0",
"expo": "^32.0.0",
"expo-linear-gradient": "^3.0.0",
"gh-pages": "^2.0.1",
"lodash": "^4.17.4",
"material-ui": "^0.20.2",
"prop-types": "^15.7.2",
"react": "16.5.0",
"react-art": "^16.8.3",
"react-autowhatever": "^10.2.0",
"react-dom": "^16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-autocomplete-input": "^4.1.0",
"react-native-elements": "^1.0.0-beta8",
"react-native-gesture-handler": "1.0.17",
"react-native-gesture-handler-web": "npm:react-native-gesture-handler#1.1.0",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-picker-select": "^6.3.3",
"react-native-ratings": "^6.3.0",
"react-native-touchable-scale": "2.0.0",
"react-native-vector-icons": "^6.3.0",
"react-native-web": "^0.10.0",
"react-navigation": "^3.5.1",
"react-navigation-animated-switch": "^0.2.1",
"react-redux": "6.0.1",
"react-scripts": "^2.1.5",
"react-select": "^3.0.4",
"redux": "^4.0.4",
"redux-thunk": "^2.3.0"
},
"scripts": {
"web": "react-app-rewired start",
"native": "expo start",
"build:web": "react-app-rewired build",
"deploy": "gh-pages -d build",
"build:android": "expo ba",
"build:ios": "expo bi",
"eject:web": "react-scripts eject",
"eject:native": "expo eject",
"prettify": "prettier --write 'src/**/*.js'",
"clean-install": "rm -rf node_modules && npm cache clean --force && watchman watch-del-all && yarn"
},
"devDependencies": {
"#babel/plugin-proposal-class-properties": "^7.3.4",
"babel-preset-expo": "^5.0.0",
"customize-cra": "^0.2.12",
"prettier": "^1.15.3",
"react-app-rewired": "^2.1.0"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
package-lock.json contains this:
"react-native": {
"version": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"integrity": "sha512-+taJh7bN2owmwaZpJUrNpHdmPAL6ZynNCZj15uLQgjaPFq0ZBIG2ZWuSJ48eGoUjAb3lrWxkmLlHb2eJFXc7sQ==",
How can I make this work on Android too? This app worked on expo on my Android phone some days ago until I did some package update.
I have updated something, some package , a package and maybe that made this Android expo app not able to run.
You are using an outdated Expo SDK and applications, SDK 32 and below is no longer maintained.
Follow the instructions on this link you should be good to go
Hope this Helps!

React Native app error when running with Relay

I have successfully generated create-react-native-app however, when I install relay along with graphql, I am getting error:
> react-native-scripts start
10:50:27 AM: Starting packager...
***ERROR STARTING PACKAGER***
Warning: Problem validating app.json: Unable to perform cache refresh for /home/vagrant/.cache/expo/schema-27.0.0.json: Error: certificate is not yet valid.
Error: Invalid sdkVersion. Valid options are 10.0.0, 11.0.0, 12.0.0, 13.0.0, 14.0.0, 15.0.0, 16.0.0, 17.0.0, 18.0.0, 19.0.0, 20.0.0, 21.0.0, 22.0.0, 23.0.0, 24.0.0, 25.0.0, 7.0.0, 8.0.0, 9.0.0
This is my package.json:
{
"name": "blah",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-plugin-relay": "^1.6.2",
"graphql": "^14.0.2",
"jest-expo": "~27.0.0",
"react-native-scripts": "1.14.0",
"react-test-renderer": "16.3.1",
"relay-compiler": "^1.6.2"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest",
"relay": "relay-compiler --src ./ --schema ./db/schema.json"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^27.0.1",
"react": "16.3.1",
"react-dom": "^16.5.0",
"react-native": "~0.55.2",
"react-relay": "^1.6.2"
}
}
UPDATED
My app.json has:
{
"expo": {
"sdkVersion": "27.0.0"
}
}

Plugin/Preset files are not allowed to export objects, only functions - v 0.56.0

I'm facing this issue in react native v-0.56.0. Please Help me out. When i am downgrading to 50 or 49 it's working fine, but on latest version it's giving this error when creating build !
cmd npm run ios
My babelrc
{
"presets": [
"babel-preset-react-native-stage-0/decorator-support"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
]
}
}
}
And my package.json
{
"name": "my-project",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-preset-react-native": "^5.0.0",
"babel-preset-react-native-stage-0": "^1.0.1",
"jest": "^23.3.0",
"jest-react-native": "^18.0.0",
"react-test-renderer": "16.3.1"
},
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"test": "jest"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"react": "^16.3.0",
"react-native": "^0.56.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0"
}
}

Resources