EAS build - Unable to find a specification for `UMCore` depended upon by `ExpoModulesCore`

Environment info:

  • EXPO SDK 45 (bare app)
  • eas-cli v0.54.1
  • nodejs v16.15.1
  • Same error whether I’m using local or cloud build
  • Expo doctor returns no errors
  • Classic build works fine on expo-cli v5.4.12

Hi all, I have recently switched to a bare expo repo and since I was at it I’ve decided to move on to EAS builds. The problem is that the build fails during the pods install phase (I haven’t tried android yet). these are the last rows in the console:

[INSTALL_PODS] [Codegen] Found FBReactNativeSpec
[INSTALL_PODS] /private/var/folders/cz/sj8s_yqd6_90pd24j7j71lb40000gn/T/eas-build-local-nodejs/ae5bc3bf-4a82-40a0-9ba9-3fd421edfd9b/build/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:50: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
[INSTALL_PODS] /private/var/folders/cz/sj8s_yqd6_90pd24j7j71lb40000gn/T/eas-build-local-nodejs/ae5bc3bf-4a82-40a0-9ba9-3fd421edfd9b/build/node_modules/react-native/scripts/react_native_pods_utils/script_phases.rb:50: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
[INSTALL_PODS] Fetching podspec for `RCT-Folly` from `../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[INSTALL_PODS] Fetching podspec for `boost` from `../../../node_modules/react-native/third-party-podspecs/boost.podspec`
[INSTALL_PODS] Fetching podspec for `glog` from `../../../node_modules/react-native/third-party-podspecs/glog.podspec`
[INSTALL_PODS] [!] Unable to find a specification for `UMCore` depended upon by `ExpoModulesCore`
[INSTALL_PODS] You have either:
[INSTALL_PODS]  * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
[INSTALL_PODS]  * mistyped the name or version.
[INSTALL_PODS]  * not added the source repo that hosts the Podspec to your Podfile.
Error: pod exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/@expo/spawn-async/build/spawnAsync.js:43:23)
    at Object.onceWrapper (node:events:642:26)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
    at spawnAsync (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/@expo/spawn-async/build/spawnAsync.js:8:21)
    at spawn (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/@expo/turtle-spawn/dist/index.js:17:47)
    at installPods (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/@expo/build-tools/dist/ios/pod.js:12:38)
    at /Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/@expo/build-tools/dist/builders/ios.js:41:41
    at BuildContext.runBuildPhase (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/@expo/build-tools/dist/context.js:49:34)
    at Object.iosBuilder (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/@expo/build-tools/dist/builders/ios.js:40:19)
    at async buildIosAsync (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/eas-cli-local-build-plugin/dist/ios.js:49:27)
    at async buildAsync (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/eas-cli-local-build-plugin/dist/build.js:28:32)
    at async main (/Users/brein/.npm/_npx/b36b56d605c88fbd/node_modules/eas-cli-local-build-plugin/dist/main.js:16:9)
[CLEAN_UP_CREDENTIALS] Destroying keychain - /var/folders/cz/sj8s_yqd6_90pd24j7j71lb40000gn/T/turtle-v2-aab4229a-2cac-498f-b03f-5da62d68e742.keychain
[CLEAN_UP_CREDENTIALS] Removing provisioning profile

Build failed
pod exited with non-zero code: 1
    Error: npx exited with non-zero code: 1

I tried running with no success pod repo update or with pod install --repo-update as suggested (although it’s probably not relevant?)
Googling I have found similar issues where people were using old unsupported packages but I believe it is not the case for ExpoModulesCore

Hi @playup

Could you run yarn why expo-modules-core or npm why expo-modules-core and post the results?

Also, if the Classic build “works fine”, do you need to be on the bare workflow?

the output of yarn why expo-modules-core is a mere 2 liner:

└─ expo@npm:45.0.6
   └─ expo-modules-core@npm:0.9.2 (via npm:0.9.2)

as to why bare: we need to implement a 3rd party marketing SDK. I’m trying to make it work without first to have a good “verified” starting point

this is the beginning of the install pods phase, there is a deprecation warning, not sure if it’s important…
prepend to what I posted yesterday and it’s complete

[INSTALL_PODS] Installing pods
[INSTALL_PODS] (node:48628) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /private/var/folders/cz/sj8s_yqd6_90pd24j7j71lb40000gn/T/eas-build-local-nodejs/366a81f4-7031-4ef5-87f5-f48c759b31eb/build/node_modules/@expo/devcert/node_modules/tslib/package.json.
[INSTALL_PODS] Update this package.json to use a subpath pattern like "./*".
[INSTALL_PODS] (Use `node --trace-deprecation ...` to show where the warning was created)
[INSTALL_PODS] (node:48628) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /private/var/folders/cz/sj8s_yqd6_90pd24j7j71lb40000gn/T/eas-build-local-nodejs/366a81f4-7031-4ef5-87f5-f48c759b31eb/build/node_modules/tslib/package.json.
[INSTALL_PODS] Update this package.json to use a subpath pattern like "./*".
[INSTALL_PODS] Using Expo modules
[INSTALL_PODS] Auto-linking React Native modules for target `pupstaging`: RNCAsyncStorage, RNCMaskedView, RNCPicker, RNDateTimePicker, RNGestureHandler, RNReanimated, RNSVG, RNScreens, react-native-netinfo, react-native-safe-area-context, and react-native-webview
[INSTALL_PODS] [Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[INSTALL_PODS] Analyzing dependencies
[INSTALL_PODS] Fetching podspec for `DoubleConversion` from `../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[INSTALL_PODS] [Codegen] Found FBReactNativeSpec

The deprecation warnings should be ok.

Maybe try expo prebuild --clean to regenerate the native projects. Just make sure you have everything committed to Git first so you can revert the changes if necessary.

Then you can see what changes were made and whether ypu are happy with them before trying the build again.

By the way, you might want to look into writing a config plugin for the SDK. Then you could stick to the managed workflow. You would still need to build a dev client (instead of using Expo Go). But of course it should also be fine to use the bare workflow.

I have never explored what can be done with plugins… do you think it’s possible to write a plugin to make this SDK work? it also requires adding some code to appdelegate.

Eventually I was able to get the build to work by manually installing expo-modules-core… I had already encountered this issue in a different ticket… not sure why it is not automatically imported.
this is the output of npm why expo-modules-core:

expo-modules-core@0.9.2 extraneous
  expo-modules-core@"0.9.2" from expo@45.0.6
    expo@"~45.0.0" from playup-portal-rn@1.0.0
    peer expo@"*" from expo-application@4.1.0
      expo-application@"~4.1.0" from expo@45.0.6
    peer expo@"*" from expo-error-recovery@3.1.0
      optional expo-error-recovery@"~3.1.0" from expo@45.0.6
    peer expo@"*" from expo-constants@13.1.1
      expo-constants@"~13.1.1" from expo@45.0.6
    peer expo@"*" from expo-keep-awake@10.1.1
      expo-keep-awake@"~10.1.1" from expo@45.0.6
    peer expo@"*" from expo-file-system@14.0.0
      expo-file-system@"~14.0.0" from expo@45.0.6
    peer expo@"*" from expo-font@10.1.0
      expo-font@"~10.1.0" from expo@45.0.6
    peer expo@"*" from expo-splash-screen@0.15.1
      expo-splash-screen@"~0.15.1" from playup-portal-rn@1.0.0

any insights would be appreciated…

also I have removed all the packages form package.json but the ones that come when initialising a new expo project to make sure issues were not introduced by some external package:

  "dependencies": {
    "expo": "~45.0.0",
    "expo-splash-screen": "~0.15.1",
    "expo-status-bar": "~1.3.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-web": "0.17.7"
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react": "~17.0.21",
    "@types/react-native": "~0.67.6",
    "typescript": "~4.3.5"

I am not an expert on config plugins, myself, but I have some experience with writing them. I have not yet had to write ones that modify MainApplication.java or AppDelegate.m, but you can do it by modifying the code by finding the place in the existing code (e.g. with a regex) and inserting the modified code there. This is not 100% reliable because e.g. later versions of React Native might produce a slightly different AppDelegate.m or other config plugins might make incompatible changes to the file, so your config plugin might break down the line. That’s why things like withAppDelegate are marked as Dangerous in the config plugin documentation.

For examples, it’s useful to look in the expo/expo-cli, expo/expo', 'expo/config-plugins' repositories for uses of withAppDelegate, withMainApplication, withProjectBuildGradle`, etc.

For the FCM stuff, have a look at the existing FCM-related/Google Services info in the Expo docs. You probably won’t need to do that in a config plugin yourself.

Are you saying that with only the above dependencies you’re still getting that error about UMCore when you try to build, unless you manually install expo-modules-core? I’m not sure why that might be.