EAS build on iOS fails

My EAS build on iOS keeps failing. I’ve searched all over but can’t determine the cause or solution. It works fine with expo build:ios.

Here is the error:

Prebuilding managed project
- Creating native project directories (./ios and ./android) and updating .gitignore
✔ Created native project | gitignore already synced
- Adding Metro bundler config
✔ Added Metro config.
- Updating your package.json scripts, dependencies, and main file
✔ Updated package.json and added index.js entry point for iOS and Android.
- Config syncing
[stderr] [16:22:55] [ios.xcodeproj]: withIosXcodeprojBaseMod: (intermediate value).parseStringPromise is not a function
[stderr] [16:22:55] TypeError: [ios.xcodeproj]: withIosXcodeprojBaseMod: (intermediate value).parseStringPromise is not a function
[stderr]     at createTemplateSplashScreenAsync (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/src/plugins/unversioned/expo-splash-screen/InterfaceBuilder.ts:322:29)
[stderr]     at getSplashStoryboardContentsAsync (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/src/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.ts:74:19)
[stderr]     at setSplashStoryboardAsync (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/src/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.ts:96:26)
[stderr]     at /Users/expo/workingdir/build/node_modules/@expo/prebuild-config/src/plugins/unversioned/expo-splash-screen/withIosSplashXcodeProject.ts:22:31
[stderr]     at action (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/src/plugins/withMod.ts:214:29)
[stderr]     at interceptingMod (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/src/plugins/withMod.ts:100:27)
[stderr]     at action (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:215:14)
[stderr]     at interceptingMod (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:100:21)
node exited with non-zero code: 1


Here is my app.json:

{
  "expo": {
    "name": "Immerciv",
    "slug": "immerciv",
    "privacy": "public",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.2.1",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/ImmercivLogoHigh.png",
      "resizeMode": "contain",
      "backgroundColor": "#FFFFFF"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "bundleIdentifier": "com.aboutthisspot.ats",
      "buildNumber": "1.2.1",
      "supportsTablet": true,
      "googleServicesFile": "./GoogleService-Info.plist",
      "config": {
        "googleMapsApiKey": "process.env.GOOGLE_MAPS_TOKEN"
      }
    },
    "android": {
      "package": "com.aboutthisspot.ats",
      "googleServicesFile": "./google-services.json",
      "versionCode": 74,
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#6200EE"
      },
      "permissions": [
        "ACCESS_COARSE_LOCATION",
        "ACCESS_FINE_LOCATION",
        "CAMERA",
        "RECORD_AUDIO",
        "WRITE_EXTERNAL_STORAGE"
      ],
      "config": {
        "googleMaps": {
          "apiKey": "process.env.GOOGLE_MAPS_TOKEN"
        }
      }
    }
  }
}

And my package.json:

{
  "scripts": {
    "start": "react-native start",
    "build": "export NODE_OPTIONS=--max_old_space_size=8000 && build:ios",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "react-devtools": "react-devtools"
  },
  "dependencies": {
    "@expo/vector-icons": "^12.0.5",
    "@mapbox/polyline": "^1.1.1",
    "@material-ui/core": "^4.12.1",
    "@material-ui/icons": "^4.11.2",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/datetimepicker": "3.5.2",
    "@react-native-community/geolocation": "^2.0.2",
    "@react-native-community/slider": "3.0.3",
    "aws-sdk": "^2.946.0",
    "buffer": "^6.0.3",
    "electron": "^13.1.6",
    "expo": "^42.0.1",
    "expo-analytics": "^1.0.16",
    "expo-app-loading": "^1.1.2",
    "expo-asset": "~8.3.2",
    "expo-av": "~9.2.3",
    "expo-blur": "~9.0.3",
    "expo-camera": "~11.2.2",
    "expo-file-system": "~11.1.3",
    "expo-gl": "~10.4.1",
    "expo-haptics": "~10.1.0",
    "expo-image-manipulator": "~9.2.2",
    "expo-image-picker": "~10.2.2",
    "expo-linear-gradient": "~9.2.0",
    "expo-location": "~12.1.2",
    "expo-speech": "~9.2.0",
    "expo-three-ar": "0.0.0",
    "fbjs": "^3.0.0",
    "file-system": "^2.2.2",
    "firebase": "8.2.3",
    "geolib": "^3.3.1",
    "moment": "^2.29.1",
    "node": "^16.4.1",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "~0.63.4",
    "react-native-audio-record": "^0.2.2",
    "react-native-calendars": "^1.1264.0",
    "react-native-debugger": "^1.1.0",
    "react-native-draggable-flatlist": "^2.6.2",
    "react-native-firebase": "^5.6.0",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.4",
    "react-native-maps": "0.28.0",
    "react-native-reanimated": "^1.13.3",
    "react-native-screens": "~3.4.0",
    "react-native-svg": "12.1.1",
    "react-native-swipeout": "git+https://github.com/krakz999/react-native-swipeout.git",
    "react-native-unimodules": "~0.14.5",
    "react-native-web": "~0.13.12",
    "react-native-webview": "11.6.2",
    "react-navigation": "^4.4.4",
    "react-navigation-drawer": "^2.7.1",
    "react-navigation-header-buttons": "^7.0.2",
    "react-navigation-stack": "^2.10.4",
    "react-navigation-tabs": "^2.11.1",
    "react-redux": "^7.2.4",
    "reanimated-bottom-sheet": "^1.0.0-alpha.22",
    "redux": "^4.1.0",
    "redux-thunk": "^2.3.0",
    "typeface-roboto": "1.1.13",
    "uuid": "^8.3.2",
    "watchman": "^1.0.0",
    "expo-splash-screen": "~0.11.2",
    "expo-status-bar": "~1.0.4",
    "expo-updates": "~0.8.1"
  },
  "devDependencies": {
    "babel-preset-expo": "8.3.0",
    "eslint": "^7.32.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-plugin-import": "^2.23.4",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-react": "^7.24.0",
    "eslint-plugin-react-hooks": "^4.2.0",
    "@babel/core": "^7.9.0"
  },
  "private": true,
  "name": "immerciv",
  "version": "1.0.0"
}

Thank you for any help!

Hi! Looking at your most recent builds, it seems like you got past the issue you posted about, and the new error in your Xcode logs is:

/Users/expo/workingdir/build/node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m:20:19: error: no known class method for selector 'setScreenName:screenClass:'
    [FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];

You might wanna check out this GH issue: [BUILD IOS] No known class method for selector 'setAnalyticsCollectionEnabled:' · Issue #2275 · invertase/react-native-firebase · GitHub. What version of firebase analytics are you using?

Thanks so much for helping on the next issue. Re the original issue, yeah, I did a simple npm install on expo-splash-screen this morning and that did the trick. I should’ve thought of that.

For the firebase one, that is where I’m stuck now. I’m on v5.6.0 of RNFirebase. Just read through the thread you posted and it seems mostly related to the bare workflow and adjusting Xcode whereas I’m in the managed workflow. Any other ideas on what it could be?

This is the full error code:


❌  (node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m:20:19)

  18 | RCT_EXPORT_METHOD(setCurrentScreen:(NSString *) screenName screenClass:(NSString *) screenClassOverriew) {
  19 |   RCTUnsafeExecuteOnMainQueueSync(^{
> 20 |     [FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];
     |                   ^ no known class method for selector 'setScreenName:screenClass:'
  21 |   });
  22 | }
  23 | 
› Compiling react-native-firebase Pods/RNFirebase » RNFirebaseAdMobRewardedVideo.m
› Compiling react-native-firebase Pods/RNFirebase » RNFirebaseAdMobNativeExpressManager.m
› Compiling react-native-firebase Pods/RNFirebase » RNFirebaseAdMobInterstitial.m
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ 	CompileC /Users/expo/Library/Developer/Xcode/DerivedData/Immerciv-aczlltufkaeronbdxarseebctisn/Build/Intermediates.noindex/ArchiveIntermediates/Immerciv/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/RNFirebase.build/Objects-normal/arm64/RNFirebaseAnalytics.o /Users/expo/workingdir/build/node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

With autolinking, you shouldn’t have to worry about that. You might have missed a step in setup for react-native-firebase, so I would go over that. You can also test the project locally with expo run:ios instead of having to trigger a new eas build each time

That was it! I had missed the step of adding the config plugins mentioned at the bottom of the RNFB documentation. Thank you!

1 Like

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