`eas build --profile development --platform android --local` builds a release apk instead of dev client

tl;dr: eas build --profile development --platform android --local with eas-cli version 0.34.0 builds in release mode, whereas the build farm builds in debug mode.

Today I tried to build a new dev client for an app after upgrading from SDK 43 beta to SDK 43. I got a message saying that there was a new version of eas-cli, so I decided to upgrade first. I am not sure what version worked previously.

Current version of eas-cli:

$ eas --version
eas-cli/0.34.0 linux-x64 node-v12.22.5

When I run the following command, the resulting APK appears to be a production, standalone APK. It opens the app directly. Not a dev client.

eas build --profile development --platform android --local

If I build on the build farm with:

eas build --profile development --platform android

I do get a dev client as a result.

Also, if I compare an app that I have deliberately compiled in release mode (using the apk profile (see below)) to a dev client build compiled on the build farm, I see that the dev client build contains (amongst other things):

META-INF/expo_debug.kotlin_module

whereas the release APK contains:

META-INF/expo_release.kotlin_module

The APK compiled on my local machine with --profile development contains the release version of the above file (and res/raw etc.).

eas.json

{
  "build": {
    "release": {},
    "apk": {
      "android": {
        "buildType": "apk",
        "image": "latest"
      }
    },
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    }
  },
  "submit": {
    "release": {}
  },
  "cli": {
    "version": ">= 0.34.0",
    "requireCommit": true
  }
}

Please let me know if you need more info.

make sure you have the latest version of eas-cli-local-build-plugin

For remote builds, we are maintaining api compatibility for some time after depreactaion, but for local ones we are only ensuring that latest cli works with latest eas-cli-local-build-plugin

Breaking changes in internal API are marked with [EAS_BUILD_API] in CHANGELOG e.g. eas-cli/CHANGELOG.md at main · expo/eas-cli · GitHub

Ah, I forgot about that package! I had a pretty old version:

eas-cli-local-build-plugin@0.0.35

Upgrading it does indeed fix the problem:

eas-cli-local-build-plugin@0.0.45

EDIT: Is there any way to prompt the user to upgrade this package as well as is done for eas-cli and expo-cli?

Is there any way to prompt the user to upgrade this package as well as is done for eas-cli and expo-cli ?

If I remember correctly when job object does not pass validation error message should suggest updating that package, but in this case new cli sent valid job object, just some of the values were ignored/changed meaning.

1 Like

OK. Thanks for your help.

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