Android versionCode missing in all EAS information

I originally mentioned this together with a couple of feature requests, but I ran into it again today in a different context, and this is really starting to become a blocker, so I hope you’ll forgive me for creating its own topic for it.

Android versionCode is missing in the web interface (making it hard to identify a build),

It’s missing in the webhook (making sending out a notification on build complete with the versionCode in there impossible),

And it also seems to be missing in the eas build:list command output (I was planning to use this information, or the query it uses in eas-cli to make a config plugin that automatically increases versionCode by looking at the last used number, and increasing that, so that you don’t need to keep track of it in app.json anymore).

I would love to add it, but I think that ultimately all roads lead to your internal graphQL implementation, which is not open-sourced as far as I can see, so my hands are tied.

Thanks!

I just tested it, version code is displayed both in build:list and on the website(both for managed and bare projects). It should be available in webhook data as appBuildVersion

  • make sure that you are using latest cli
  • if you are using dynamic app config make sure that it resolves to the same value both locally and on worker

There’s no dynamic app config and I’m on the latest CLI. I am seeing this on two new projects, here’s a couple of build links for both of them, maybe that can tell you why I’m not seeing it?

1 Like

There is step Read app config in build logs that displays app.json (or result of app.config.js evaluation), there is no versionCode specified there in your builds.

2 Likes

what does your app.json look like for those builds?

here’s an example of what I see when building with versionCode:

I used the default app.json for a new project, with just a couple fields added:

{
  "expo": {
    "name": "agartha",
    "slug": "agartha",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "buildNumber": "1",
      "supportsTablet": true,
      "bundleIdentifier": "com.notbrent.agartha"
    },
    "android": {
      "versionCode": 1,
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "package": "com.notbrent.agartha"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}
1 Like

Okay, so here’s the thing. Yes, versionCode was missing, so I’ll give you that :slight_smile:
And yes, when I provide it, it works :+1:

However… what threw me off was: I hadn’t specified a buildNumber on iOS either, and that one is displayed (as 1), like in this build: Build Details — 86bb7154-395d-4685-a199-9130dc609088 — TestAppExpo — Expo

So that’s probably the only part that I don’t fully get: if I don’t specify either on a newly created project, then it shows buildNumber for iOS, but not versionCode for Android, that’s why I assumed it to be something specific to Android.

good point! the defaults are different here and i don’t think that there is a good reason for that. we’ll resolve that

1 Like

inconsistency should be fixed in the next release use default version code when it's not defined for managed project in app.json by dsokal · Pull Request #526 · expo/eas-cli · GitHub

1 Like