EAS Build SDK 41+42, build succeed, but app crashes because it can't find API keys

I used eas build and after installing the build on phone, it crashes. I can see in the logs that the crash is because of missing API keys (for firebase, for Google Maps, etc).
Here’s my app.config.ts:

const tenant = 'taranis'
//import app.json
import appJson from './app.json'

export default {
  version: process.env.TARANIS_CONNECT_APP_VERSION || appJson.expo.version,
  orientation: appJson.expo.orientation,
  icon: appJson.expo.icon,
  name: appJson.expo.name,
  slug: appJson.expo.slug,
  extra: {
    tenant,
    enableOffline: process.env.ENABLE_OFFLINE,
    storybook: process.env.STORYBOOK_START === 'true',
    firebase_api_key: process.env.FIREBASE_API_KEY,
    firebase_auth_domain: process.env.FIREBASE_AUTH_DOMAIN,
    firebase_db_url: process.env.FIREBASE_DB_URL,
    firebase_project_id: process.env.FIREBASE_PROJECT_ID,
    firebase_storage_bucket: process.env.FIREBASE_STORAGE_BUCKET,
    firebase_messaging_sender_id: process.env.FIREBASE_MESSAGING_SENDER_ID,
    firebase_app_id: process.env.FIREBASE_APP_ID,
    mixpanel_token: process.env.MIXPANEL_TOKEN,
    sentry_dsn: process.env.SENTRY_DSN,
    track_analytics: process.env.TRACK_ANALYTICS,
    is_automations: process.env.IS_AUTOMATIONS,
  },
  hooks: {
    postPublish: [
      {
        file: 'sentry-expo/upload-sourcemaps',
        config: {
          organization: 'taranis',
          project: 'taranis-connect-app',
          authToken: process.env.SENTRY_AUTH_TOKEN,
        },
      },
    ],
  },
  notification: {
    icon: './assets/images/notifIcon.png',
  },
  ios: {
    bundleIdentifier: 'ag.taranis.connect',
    googleServicesFile: './GoogleService-Info.plist',
    config: {
      googleMapsApiKey: process.env.GOOGLE_MAPS_API_KEY_IOS,
    },
    infoPlist: {
      LSApplicationQueriesSchemes: ['itms-beta'],
      UIStatusBarStyle: 'UIStatusBarStyleLightContent',
      CFBundleDisplayName: appJson.expo.name,
      CFBundleName: appJson.expo.name
    },
    supportsTablet: true,
    buildNumber: appJson.expo.ios.buildNumber,
  },

  web: {
    config: {
      firebase: {
        appId: process.env.FIREBASE_APP_ID,
        apiKey: process.env.FIREBASE_API_KEY,
        measurementId: process.env.FIREBASE_MEASURMENT_ID,
      },
    },
  },

  android: {
    softwareKeyboardLayoutMode: 'pan',
    useNextNotificationsApi: true,
    package: 'ag.taranis.connect',
    googleServicesFile: './google-services.json',
    config: {
      googleMaps: {
        apiKey: process.env.GOOGLE_MAPS_API_KEY_ANDROID,
      },
    },
    versionCode: appJson.expo.android.versionCode,
    intentFilters: [
      {
        action: 'VIEW',
        data: [
          {
            scheme: 'https',
            host: 'taranisconnect.page.link',
            pathPrefix: '/',
          },
        ],
        category: ['BROWSABLE', 'DEFAULT'],
      },
    ],
    permissions: [
      'NOTIFICATIONS',
      'READ_EXTERNAL_STORAGE',
      'WRITE_EXTERNAL_STORAGE',
    ],
    adaptiveIcon: {
      foregroundImage: './assets/images/foregroundAndroid.png',
      backgroundColor: '#256E46',
    },
  },

  androidStatusBar: {
    barStyle: 'dark-content',
    backgroundColor: '#E0E0E0',
  },
  splash: {
    backgroundColor: '#E0E0E0',
    image: './assets/images/powered_by_taranis.png',
  },
}
1 Like

ok, I now understand I need to read this:

2 Likes