EAS Build, Missing bundleIdentifier

I am trying to build a standalone iOS app using the eas build --platform ios command and I am encountering the following error:

Prebuilding managed project
[04:57:52] ๐Ÿ“  iOS Bundle Identifier Learn more: https://expo.fyi/bundle-identifier
[stderr] [04:57:52] Input is required, but Expo CLI is in non-interactive mode.
[stderr] Your project must have a `bundleIdentifier` set in the Expo config (app.json or app.config.js).
[stderr] See https://expo.fyi/bundle-identifier
node exited with non-zero code: 1

I can build the app successfully using the expo build ios command.

app.json

{
    "expo": {
      "name": "App Name",
      "description": "App description",
      "slug": "app-slug",
      "owner": "owner",
      "privacy": "unlisted",
      "platforms": [
        "ios",
        "android"
      ],
      "orientation": "portrait",
      "version": "0.4",
      "userInterfaceStyle": "automatic",
      "primaryColor": "#2b354c",
      "backgroundColor": "#2b354c",
      "icon": "./src/assets/images/app-icon.png",
      "splash": {
        "backgroundColor": "#2b354c",
        "resizeMode": "cover",
        "image": "./src/assets/images/splash.png",
        "tabletImage": "./src/assets/images/splash.png",
        "userInterfaceStyle": "light"
      },
      "notification": {
        "icon": "./src/assets/images/notificationLogo.png",
        "androidMode": "default",
        "color": "#cc0f3d",
        "iosDisplayInForeground": true
      },
      "assetBundlePatterns": [
        "./src/assets/images/*",
        "./src/assets/images/icons/*",
        "./src/assets/images/laundry/*",
        "./src/assets/images/tiles/*",
        "./src/assets/fonts/*"
      ],
      "updates": {
        "enabled": true,
        "checkAutomatically": "ON_LOAD",
        "fallbackToCacheTimeout": 20000
      },
      "ios": {
        "bundleIdentifier": "com.my.org",
        "googleServicesFile": "./GoogleService-Info.plist",
        "buildNumber": "0.4",
        "icon": "./src/assets/images/app-icon.png",
        "supportsTablet": true,
        "isTabletOnly": false,
        "usesIcloudStorage": false,
        "infoPlist": {
          "NSLocationWhenInUseUsageDescription": "Allow ...",
          "NSLocationAlwaysUsageDescription": "Allow ...",
          "NSFaceIDUsageDescription": "Allow ...",
          "LSApplicationQueriesSchemes": [
            "ms-outlook",
            "zoomus"
          ]
        }
      },
      "androidStatusBar": {
        "barStyle": "light-content",
        "hidden": false,
        "translucent": false
      },
      "androidNavigationBar": {
        "backgroundColor": "#2b354c",
        "barStyle": "light-content"
      },
      "android": {
        "useNextNotificationsApi": true,
        "package": "com.my.org",
        "googleServicesFile": "./google-services.json",
        "versionCode": 25,
        "icon": "./src/assets/images/app-icon.png",
        "permissions": [
          "ACCESS_COARSE_LOCATION",
          "ACCESS_FINE_LOCATION",
          "com.google.android.c2dm.permission.RECEIVE",
          "ACCESS_NETWORK_STATE",
          "ACCESS_WIFI_STATE",
          "INTERNET"
        ],
        "playStoreUrl": "https://play.google.com/store/apps/details?id=org.app&hl=en_GB",
        "config": {
          "googleMaps": {
            "apiKey": "00000000"
          }
        }
      },
      "web": {
        "config": {
          "firebase": {
            "apiKey": "key",
            "authDomain": "xyz.firebaseapp.com",
            "projectId": "xyz",
            "storageBucket": "xyz.appspot.com",
            "messagingSenderId": "000000",
            "appId": "000000",
            "measurementId": "G-000000"
          }
        }
      },
      "hooks": {
        "postPublish": [
          {
            "file": "sentry-expo/upload-sourcemaps",
            "config": {
              "organization": "org",
              "project": "my-app",
              "authToken": "0000000"
            }
          }
        ]
      },
      "extra": {
        "token": "00001"
      }
    }
  }

Any help will be greatly appreciated

Hi!

what version of eas-cli are you using? If you run expo config, does the output contain the expected value of your bundleIdentifier? (if it doesnโ€™t, maybe you have 2 app.json files or an app.config.js?)

Hi,

I am running eas-cli/0.14.1 linux-x64 node-v14.16.1 (installed globally today). The expo config output matches what I provided before, bundleIdentifier set within the iOS section. I only have one app.json and no app.config.js.

output from expo config

{
  name: 'App name',
  description: 'App description',
  slug: 'slug-App',
  owner: 'owner',
  privacy: 'unlisted',
  platforms: [
    'ios',
    'android'
  ],
  orientation: 'portrait',
  version: '0.4',
  userInterfaceStyle: 'automatic',
  primaryColor: '#2b354c',
  backgroundColor: '#2b354c',
  icon: './src/assets/images/app-icon.png',
  assetBundlePatterns: [
    './src/assets/images/*',
    './src/assets/images/icons/*',
    './src/assets/images/laundry/*',
    './src/assets/images/tiles/*',
    './src/assets/fonts/*'
  ],
  sdkVersion: '41.0.0',
  splash: {
    backgroundColor: '#2b354c',
    resizeMode: 'cover',
    image: './src/assets/images/app-splash.png',
    tabletImage: './src/assets/images/app-splash.png',
    userInterfaceStyle: 'light'
  },
  notification: {
    icon: './src/assets/images/notificationLogo.png',
    androidMode: 'default',
    color: '#cc0f3d',
    iosDisplayInForeground: true
  },
  updates: {
    enabled: true,
    checkAutomatically: 'ON_LOAD',
    fallbackToCacheTimeout: 20000
  },
  ios: {
    bundleIdentifier: 'com.org.name',
    googleServicesFile: './GoogleService-Info.plist',
    buildNumber: '0.4',
    icon: './src/assets/images/app-icon.png',
    supportsTablet: true,
    isTabletOnly: false,
    usesIcloudStorage: false,
    infoPlist: {
      NSLocationWhenInUseUsageDescription: 'Allow ...',
      NSLocationAlwaysUsageDescription: 'Allow ...',
      NSFaceIDUsageDescription: 'Allow ...',
      LSApplicationQueriesSchemes: [
        'ms-outlook',
        'zoomus'
      ]
    }
  },
  androidStatusBar: {
    barStyle: 'light-content',
    hidden: false,
    translucent: false
  },
  androidNavigationBar: {
    backgroundColor: '#2b354c',
    barStyle: 'light-content'
  },
  android: {
    useNextNotificationsApi: true,
    package: 'com.org.name',
    googleServicesFile: './google-services.json',
    versionCode: 25,
    icon: './src/assets/images/app-icon.png',
    permissions: [
      'ACCESS_COARSE_LOCATION',
      'ACCESS_FINE_LOCATION',
      'com.google.android.c2dm.permission.RECEIVE',
      'ACCESS_NETWORK_STATE',
      'ACCESS_WIFI_STATE',
      'INTERNET'
    ],
    playStoreUrl: 'https://play.google.com/....',
    config: {
      googleMaps: {
        apiKey: '0000'
      }
    }
  },
  web: {
    config: {
      firebase: {
        apiKey: '00000',
        authDomain: '00000.firebaseapp.com',
        projectId: '00000',
        storageBucket: '0000.appspot.com',
        messagingSenderId: '0000000',
        appId: '00006',
        measurementId: 'G-00000000'
      }
    }
  },
  hooks: {
    postPublish: [
      {
        file: 'sentry-expo/upload-sourcemaps',
        config: {
          organization: 'org',
          project: 'app',
          authToken: '000000000000'
        }
      }
    ]
  },
  extra: {
     "token": "00001"
  },
  _internal: {
    isDebug: false,
    projectRoot: '/home/node/app',
    dynamicConfigPath: null,
    staticConfigPath: '/home/node/app/app.json',
    packageJsonPath: '/home/node/app/package.json'
  }
}

are you depending on setting some environment variable to produce that config? remember that you need to configure environment variables on the build jobs if you depend on them. also, we only upload files that are part of your git tree. it looks like the bundle identifier is read fine locally, and the job was kicked off, but then during the build job on our servers we canโ€™t find it, so i strongly suspect there is something going on in app.config.js that depends on your local environment. if you can share more info about what your app.config.js actually looks like this would be helpful.

Thanks for the feedback. All my changes had been committed, I restarted my docker container and performed a git push/pull (no changes as everything up-to-date). Ran the eas build --platform ios command and the build has now completed successfully. Not sure why it worked after performing these steps :thinking: