Search code examples
react-nativebuildexpoeas

EAS Expo creates development build that is not loading the app (but production and simulator builds are working fine)


I have recently migrated from classic build to EAS (well, it was steep learning curve but worth it). Anyhow, now the build for iOS simulator works. Also, a production build works fine in TestFlight. However, even though developer profile build is successfully, it's only briefly showing the splash screen and goes to an error screen immediately on both iOS and Android

.

I am using a managed workflow (custom development client) and eas-cli/3.6.1 darwin-x64 node-v19.6.1, expo version 47.

iOS error: Expected MIME-Type to be 'application/javascript' or 'text/javascript', but got 'text/html'.

Android error Unable to load script. Make sure you're either running Metro or that your bundle 'index.android.bundle' is packaged correctly for release

eas.json file:

{
  "cli": {
    "version": ">= 3.6.1"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "channel": "development",
      "ios": {
        "resourceClass": "m1-medium"
      }
    },
    "simulator": {
      "distribution": "internal",
      "channel": "simulator",
      "ios": {
        "simulator": true,
        "resourceClass": "m1-medium"
      }
    },
    "production": {
      "channel": "production",
      "ios": {
        "resourceClass": "m1-medium"
      }
    }
  },
  "submit": {
    "production": {}
  }
}

I have not been able to find anything related to this error despite searching. Does anyone have a lead how to resolve this?

Many thanks!!


Solution

  • I was told by @keith from Expo team what a silly thing I was wrong. So I used the link from a EAS development build--instead of a link generated from a live server npx expo start --dev-client. So that development build is supposed to be installed as standalone similarly to production build.

    Example of a development build which is a pointer to download the build (do not try to load it in Expo dev-client) https://expo.dev/register-device/46a...

    Example of a link generated from a npx expo start --dev-client: exp+onruncurrent://expo-development-client/?url=http%3A%2F%2F10.203.60.138%3A8081