If I run the app in Expo Go, it runs and works completely fine with all its features but when I switch to development build or create a build with eas the app just doesn’t start at all. I click on it and for a moment its icon fils the screen and creashes saying “the app keeps stopping” (when ran on physical device or emulator) and when I click on it in while in development build in expo app it simply doesn’t react or sometimes just throws me back out immediately after clicking. I’m sorry if I somehow didn’t manage to make things clear, this is my first app and first experience working with expo and rn. It’s been a few days i’m struggling with this and can’t resolve nor find the issue. I don’t even know how to properly debug it. I’m looking for any help. Thanks in advance to anyone who reached out to help!
- SDK Version: 49
- Platforms(Android/iOS/web/all): Android
- Expo SDK Expo Application Services (EAS) Expo Development Tools Expo Development Tools
My app.json file:
{
"expo": {
"name": "Restaurants-Manager",
"slug": "Restaurants-Manager",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/icon.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.agent.RestaurantsManager"
},
"android": {
"package": "com.agent.RestaurantsManager",
"adaptiveIcon": {
"foregroundImage": "./assets/icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "my project id"
}
}
}
}
My eas.json file:
{
"cli": {
"version": ">= 5.2.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"android": {
"buildType": "apk"
},
"distribution": "internal"
},
"preview2": {
"android": {
"gradleCommand": ":app:assembleRelease"
}
},
"preview3": {
"developmentClient": true
},
"production": {
"env": {
"EXPO_PUBLIC_API_URL": "my api url"
}
}
},
"submit": {
"production": {}
}
}
My package.json file:
{
"name": "Restaurants-Manager",
"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",
"build:tailwind": "tailwindcss --input input.css --output tailwind.css --no-autoprefixer && tailwind-rn",
"dev:tailwind": "concurrently \"tailwindcss --input input.css --output tailwind.css --no-autoprefixer --watch\" \"tailwind-rn --watch\""
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.5.8",
"@react-navigation/drawer": "^6.6.3",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"axios": "^1.4.0",
"expo": "~49.0.7",
"expo-dev-client": "~2.4.10",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"react": "18.2.0",
"react-native": "0.72.3",
"react-native-gesture-handler": "~2.12.0",
"react-native-reanimated": "~3.3.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"concurrently": "^8.2.0",
"postcss": "^8.4.27"
},
"private": true
}
This is the first useEffect that runs when the component mounts:
useEffect(() => {
console.log('app launched');
setTimeout(() => {
fetchData();
}, 3000);
}, []);
That console.log doesn’t even log anything when I run the app as a development build but prints the text when I run it using Expo Go