App is working correctly in development and on building to apk in using "eas build -p android –profile preview" the app builds successfully with no specified errors, but app breaks in production without even passing the splash screen.
On run npx expo-env-info:
expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 20.5.0 - ~AppDataRoamingnpmnode.CMD
Yarn: 1.22.19 - ~AppDataRoamingnpmyarn.CMD
npm: 9.8.1 - ~AppDataRoamingnpmnpm.CMD
IDEs:
Android Studio: AI-222.4459.24.2221.9971841
npmPackages:
@expo/webpack-config: ^19.0.0 => 19.0.0
expo: ^49.0.0 => 49.0.11
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.4 => 0.72.4
react-native-web: ~0.19.6 => 0.19.8
Expo Workflow: managed
On run npx expo-doctor:
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that packages match versions required by installed Expo SDK
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
Didn't find any issues with the project!
Error output
While lauching on an andriod device it returned this error:
I have tried debuging using andriod studio, and also building, it builds successfully but still the same issue.
I have also tried updating and upgrading all packages same issue
Here is my package.json file:
{
"name": "yoris",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.341.0",
"@expo-google-fonts/lato": "^0.2.2",
"@expo-google-fonts/oswald": "^0.2.2",
"@expo/vector-icons": "^13.0.0",
"@expo/webpack-config": "^19.0.0",
"@gorhom/bottom-sheet": "^4.4.5",
"@material-tailwind/react": "^1.4.2",
"@miblanchard/react-native-slider": "*",
"@react-md/divider": "^5.1.3",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-native-community/datetimepicker": "7.2.0",
"@react-native-community/geolocation": "^3.0.6",
"@react-native-community/netinfo": "9.3.10",
"@react-native-community/progress-bar-android": "^1.0.5",
"@react-native-community/slider": "4.4.2",
"@react-native-community/viewpager": "5.0.11",
"@react-native-picker/picker": "2.4.10",
"@react-navigation/bottom-tabs": "^6.5.5",
"@react-navigation/drawer": "^6.6.1",
"@react-navigation/material-top-tabs": "^6.5.3",
"@react-navigation/native": "^6.1.4",
"@react-navigation/native-stack": "^6.9.10",
"@react-navigation/stack": "^6.2.1",
"@reduxjs/toolkit": "^1.9.3",
"@rneui/base": "^4.0.0-rc.7",
"@rneui/themed": "^4.0.0-rc.7",
"@sanity/client": "^5.2.1",
"@sanity/image-url": "^1.0.2",
"@volkenomakers/react-native-country-picker": "^1.0.0",
"aws-amplify": "^5.2.2",
"aws-amplify-react-native": "^7.0.2",
"aws-sdk": "^2.1381.0",
"axios": "^1.3.2",
"babel-plugin-inline-import": "^3.0.0",
"camelize": "^1.0.0",
"canvas": "^2.11.0",
"countries-list": "^2.6.1",
"country-list": "^2.3.0",
"crypto-js": "^4.1.1",
"date-fns": "^2.29.3",
"dotenv": "^16.0.3",
"expo": "^49.0.0",
"expo-av": "~13.4.1",
"expo-barcode-scanner": "~12.5.3",
"expo-camera": "~13.4.4",
"expo-checkbox": "~2.4.0",
"expo-constants": "~14.4.2",
"expo-contacts": "~12.2.0",
"expo-dev-client": "~2.4.8",
"expo-document-picker": "~11.5.4",
"expo-image-manipulator": "~11.3.0",
"expo-image-picker": "~14.3.2",
"expo-linear-gradient": "~12.3.0",
"expo-location": "~16.1.0",
"expo-media-library": "~15.4.1",
"expo-permissions": "~14.2.1",
"expo-radio-button": "^1.0.8",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"firebase": "^9.17.2",
"formik": "^2.2.9",
"install": "^0.13.0",
"jsbarcode": "^3.11.5",
"lodash": "^4.17.21",
"lottie-react-native": "5.1.6",
"moment": "^2.29.2",
"native-base": "^3.4.25",
"nativewind": "^2.0.11",
"pod-install": "^0.1.38",
"qrcode-generator": "^1.4.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-google-autocomplete": "^2.7.3",
"react-google-places-autocomplete": "^4.0.1",
"react-hook-form": "^7.33.1",
"react-md": "^5.1.4",
"react-native": "0.72.4",
"react-native-actions-sheet": "^0.8.21",
"react-native-animatable": "^1.3.3",
"react-native-animated-splash-screen": "^2.0.5",
"react-native-art": "^1.0.0",
"react-native-aws3": "^0.0.9",
"react-native-ble-manager": "^8.4.3",
"react-native-ble-plx": "^2.0.3",
"react-native-calendar": "^0.13.1",
"react-native-calendars": "^1.1293.0",
"react-native-canvas": "^0.1.38",
"react-native-chart-kit": "^6.12.0",
"react-native-country-codes-picker": "^2.2.2",
"react-native-country-picker-modal": "^2.0.0",
"react-native-currency-input": "^1.0.1",
"react-native-date-picker": "^4.2.2",
"react-native-datepicker": "^1.7.2",
"react-native-dotenv": "^3.4.7",
"react-native-dropdown-picker": "^5.4.4",
"react-native-dropdown-select-list": "^2.0.4",
"react-native-eject": "^0.1.2",
"react-native-fit-image": "^1.5.5",
"react-native-gesture-handler": "~2.12.0",
"react-native-google-autocomplete": "^0.2.0",
"react-native-google-places-autocomplete": "^2.5.1",
"react-native-heroicons": "^2.2.0",
"react-native-image-header-scroll-view": "^1.0.0",
"react-native-image-picker": "^5.0.0",
"react-native-maps": "1.7.1",
"react-native-maps-directions": "^1.8.0",
"react-native-modal-datetime-picker": "^13.1.2",
"react-native-modal-dropdown": "^1.0.2",
"react-native-pager-view": "6.2.0",
"react-native-paper": "^5.2.0",
"react-native-permissions": "^3.6.1",
"react-native-phone-code-select": "^1.1.0",
"react-native-phone-number-input": "^2.1.0",
"react-native-progress": "^5.0.0",
"react-native-qrcode-scanner": "^1.5.5",
"react-native-qrcode-svg": "^6.2.0",
"react-native-reanimated": "~3.3.0",
"react-native-responsive-linechart": "^5.7.1",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",
"react-native-select-dropdown": "^3.2.1",
"react-native-sliding-up-down-panels": "^1.0.0",
"react-native-step-indicator": "^1.0.3",
"react-native-svg": "13.9.0",
"react-native-swipe-up-down": "^1.2.0",
"react-native-swiper": "^1.6.0",
"react-native-switch": "^1.5.1",
"react-native-tab-view": "^3.3.4",
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^9.2.0",
"react-native-video": "^5.2.1",
"react-native-view-shot": "3.7.0",
"react-native-web": "~0.19.6",
"react-native-webview": "13.2.2",
"react-redux": "^8.0.5",
"react-s3": "^1.3.1",
"redux": "^4.2.0",
"redux-thunk": "^2.4.1",
"rn-range-slider": "^2.2.2",
"rn-sliding-up-panel": "^2.4.6",
"socket.io-client": "^4.5.4",
"styled-components": "^5.3.6",
"tailwind-react-native-classnames": "^1.5.1",
"twrnc": "^3.6.0",
"typescript": "^5.1.3",
"uid": "^2.0.1",
"watchman": "^1.0.0",
"webpack-dev-server": "^4.11.1",
"yup": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}
2
Answers
Update your Expo SDK and dependencies, disable unnecessary third-party libraries, run your app in debug mode, and build your app from Android Studio.
I noticed that you’ve included four different packages for handling date pickers in your project:
To fix your issue, you should only keep the one that best suits your needs and remove the others from your project.
Additionally, I saw that your
package.json
file includes many unnecessary packages. These extra packages can make your app’s file size larger and can potentially cause errors. So, please be mindful when adding libraries to your project. If you decide to use a different library and no longer need the old one, make sure to remove it. This will help avoid conflicts between different libraries that use the same methods.