builded application stops and close after 1 second.

  • I’m using managed workflow
  • eas-cli version is “3.13.2”, expo version is “48.0.18”
  • Situation : When I start my application, It shows loading screen just 1 seconds and stop.
    In Expo Go, It has no problem. But after build, It has problem using eas-cli and local expo build too.

here is my dependencies

{
  "dependencies": {
    "@react-navigation/bottom-tabs": "^6.5.7",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "@tanstack/react-query": "^4.29.12",
    "@types/react-native": "^0.72.2",
    "axios": "^1.4.0",
    "eas-cli": "^3.13.2",
    "expo": "~48.0.18",
    "expo-av": "~13.2.1",
    "expo-constants": "~14.2.1",
    "expo-device": "~5.2.1",
    "expo-font": "~11.1.1",
    "expo-image-picker": "~14.1.1",
    "expo-status-bar": "~1.4.4",
    "react": "18.2.0",
    "react-native": "0.71.8",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-reanimated": "~2.14.4",
    "react-native-reanimated-carousel": "^3.3.2",
    "react-native-simple-dialogs": "^1.5.0",
    "recoil": "^0.7.7",
    "typescript": "^4.9.5"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

here is my eas.json

{
  "cli": {
    "version": ">= 3.13.2"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "ios": {
        "resourceClass": "m-medium"
      }
    },
    "preview": {
      "android": {
        "buildType": "apk"
      },
      "ios": {
        "simulator": true
      }
    },
    "production": {
      "ios": {
        "resourceClass": "m-medium"
      },
      "android": {
        "buildType": "apk"
      }
    }
  },
  "submit": {
    "production": {}
  }
}

here is my app.json(name, slug, ios.bundleIdentifier, android.package, extra.projectId is exist but I erase In here)"

{
  "expo": {
    "name": "",
    "slug": "",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": false,
      "bundleIdentifier": "",
      "buildNumber": "1.0.0"
    },
    "android": {
      "versionCode": 1,
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#000000"
      },
      "package": ""
    },
    "extra": {
      "eas": {
        "projectId": ""
      }
    },
    "plugins": [
      [
        "expo-image-picker",
        {
          "photosPermission": "The app accesses your photos to let you share them with your friends."
        }
      ]
    ]
  }
}

Remove the eas-cli dependency and re-build it again. You do not need eas-cli as a dependency in your project.

I uninstall eas-cli and build again, but same problem occured…

When you say it stops, does the app crashes?

Also, when you are creating development build, are you using npx expo start --dev-client command to star the development server? If not, what type of build are you running on your device/emulator/simulator?

After I just install

    "expo-splash-screen": "~0.18.2",
    "react-native-screens": "~3.20.0",
    "react-native-safe-area-context": "4.5.0"

these things, the problem resolved!!
Can you explain why??

Looks like you didn’t have @react-navigation/native peer dependencies before as mentioned in React Navigatiotion docs: React Navigation

Not sure why it was working in Expo Go for you before. This is required expo-splash-screen if you are using SplashScreen API. I see expo-font in your package.json, are you using some way to show splash screen when fonts are loading before rendering the first screen of the app?

This is My App.js!
I just use expo-font here.

import { useFonts } from "expo-font";
import { Suspense } from "react";
import { RecoilRoot } from "recoil";
import LoadingOverlay from "./components/LoadingOverlay";
import InApp from "./InApp";
import { gestureHandlerRootHOC } from "react-native-gesture-handler";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

const queryClient = new QueryClient();

export default gestureHandlerRootHOC(function App() {
  const [fontsLoaded, error] = useFonts({
    KoPubWorldDotum500: require("./assets/fonts/KoPubWorld-Dotum-Medium.ttf"),
    KoPubWorldDotum700: require("./assets/fonts/KoPubWorld-Dotum-Bold.ttf"),
    Cafe24Classictype: require("./assets/fonts/Cafe24Classictype.ttf"),
  });

  if (!fontsLoaded) {
    return <LoadingOverlay />;
  }

  return (
    <RecoilRoot>
      <QueryClientProvider client={queryClient}>
        <Suspense fallback={<LoadingOverlay />}>
          <InApp />
        </Suspense>
      </QueryClientProvider>
    </RecoilRoot>
  );
});

and My package.json was

{
  "name": "",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-navigation/bottom-tabs": "^6.5.7",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "@tanstack/react-query": "^4.29.12",
    "@types/react-native": "^0.72.2",
    "axios": "^1.4.0",
    "expo": "~48.0.18",
    "expo-av": "~13.2.1",
    "expo-constants": "~14.2.1",
    "expo-device": "~5.2.1",
    "expo-font": "~11.1.1",
    "expo-image-picker": "~14.1.1",
    "expo-status-bar": "~1.4.4",
    "react": "18.2.0",
    "react-native": "0.71.8",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-reanimated": "~2.14.4",
    "react-native-reanimated-carousel": "^3.3.2",
    "react-native-simple-dialogs": "^1.5.0",
    "recoil": "^0.7.7",
    "typescript": "^4.9.5"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

and now

{
  "name": "",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-navigation/bottom-tabs": "^6.5.7",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "@tanstack/react-query": "^4.29.12",
    "@types/react-native": "^0.72.2",
    "axios": "^1.4.0",
    "expo": "~48.0.18",
    "expo-av": "~13.2.1",
    "expo-constants": "~14.2.1",
    "expo-device": "~5.2.1",
    "expo-font": "~11.1.1",
    "expo-image-picker": "~14.1.1",
    "expo-status-bar": "~1.4.4",
    "react": "18.2.0",
    "react-native": "0.71.8",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-reanimated": "~2.14.4",
    "react-native-reanimated-carousel": "^3.3.2",
    "react-native-simple-dialogs": "^1.5.0",
    "recoil": "^0.7.7",
    "typescript": "^4.9.5",
    "expo-splash-screen": "~0.18.2",
    "react-native-screens": "~3.20.0",
    "react-native-safe-area-context": "4.5.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.