EAS update prevent my app endpoints from working

EAS update prevents my app endpoints from working. They kept returning “Network request failed”, and unless I removed the URL from the updates field (https://u.expo.dev/[PROJECT.ID]) in my config file (app.json), my endpoints aren’t working again.

Please, am I missing something here?

workflow: managed
eas-cli: 2.1.0
sdk: 45.0.5

Here is how my eas config looks:

{
  "cli": {
    "version": ">= 0.60.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      },
      "ios": {
        "simulator": true
      }
    },
    "staging": {
      "distribution": "internal",
      "env": {
        "APP_ENV": "staging"
      },
      "channel": "staging"
    },
    "production": {
      "env": {
        "APP_ENV": "production"
      },
      "channel": "production"
    }
  },
  "submit": {
    "production": {
      "android": {
        "serviceAccountKeyPath": "-"
      },
      "ios": {
        "appleId": "-",
        "ascAppId": "-",
        "appleTeamId": "-"
      }
    }
  }
}

Hey, I am just guessing right into the dark here but this reminds me of one thing I needed to do while upgrading the SDK versions:

  • } = Constants.manifest.extra;
  • } = Constants.expoConfig.extra;

So if you’re storing some information about your endpoints in the extra field of your app.json, you need to get it now from Constants.expoConfig.

You can import this like this:
import Constants from 'expo-constants';

Good luck!

1 Like

In my case, I had to reference the manifest2, which is actually for new expo apps using the modern expo update.

I can’t believe that I didn’t think of checking if the Constant library was returning the app info.

Thanks a ton, mate. Your comment gave me a headway.

Hi @abacus-engineering

I think they’re moving towards using Constants.expoConfig instead of Constants.manifest or Constants.manifest2. I think there are still a few things that are not available in Constants.expoConfig, so they haven’t yet deprecated the other two.

So if you can, use Constants.expoConfig.

See Dynamic configuration:
Screenshot of Dynamic config docs

1 Like

Thanks for your response. @wodin

We just used the Constants options as fallbacks so that we don’t have to worry about the deprecation in future.

    Constants?.expoConfig?.extra?.[key] ||
    Constants.manifest?.extra?.[key] ||
    Constants.manifest2?.extra?.expoClient?.extra?.[key]

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