question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Expo SDK 45] iOS EAS build config plugin sync failed

See original GitHub issue

Summary

I’m getting the following error, when building my app for iOS via EAS, which was upgraded to SDK 45:

1 Creating native project directories (./ios and ./android) and updating .gitignore 2 ✔ Created native project | gitignore already synced 3 - Adding Metro bundler config 4 - Updating your package.json scripts, dependencies, and main file 5 ✔ Updated package.json and added index.js entry point for iOS and Android 6 - Config syncing 7 ✖ Config sync failed 8 [stderr] [03:38:23] [ios.xcodeproj]: withIosXcodeprojBaseMod: Could not locate a valid AppDelegate at root: “/Users/expo/workingdir/build” 9 [stderr] Please report this as an issue on https://github.com/expo/expo-cli/issues 10 [stderr] [03:38:23] UnexpectedError: [ios.xcodeproj]: withIosXcodeprojBaseMod: Could not locate a valid AppDelegate at root: “/Users/expo/workingdir/build” 11 [stderr] Please report this as an issue on https://github.com/expo/expo-cli/issues 12 [stderr] at getAppDelegateFilePath (/Users/expo/workingdir/build/node_modules/expo-notifications/node_modules/@expo/config-plugins/src/ios/Paths.ts:52:11) 13 [stderr] at getAppDelegate (/Users/expo/workingdir/build/node_modules/expo-notifications/node_modules/@expo/config-plugins/src/ios/Paths.ts:114:20) 14 [stderr] at Object.getSourceRoot (/Users/expo/workingdir/build/node_modules/expo-notifications/node_modules/@expo/config-plugins/src/ios/Paths.ts:119:23) 15 [stderr] at setNotificationSounds (/Users/expo/workingdir/build/node_modules/expo-notifications/plugin/build/withNotificationsIOS.js:39:57) 16 [stderr] at /Users/expo/workingdir/build/node_modules/expo-notifications/plugin/build/withNotificationsIOS.js:19:9 17 [stderr] at action (/Users/expo/workingdir/build/node_modules/expo-notifications/node_modules/@expo/config-plugins/src/plugins/withMod.ts:227:29) 18 [stderr] at interceptingMod (/Users/expo/workingdir/build/node_modules/expo-notifications/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:27) 19 [stderr] at action (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/src/plugins/withMod.ts:228:14) 20 [stderr] at interceptingMod (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) 21 [stderr] at interceptingMod (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) 22 [stderr] at interceptingMod (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) 23 [stderr] at interceptingMod (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) 24 [stderr] at interceptingMod (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) 25 [stderr] at interceptingMod (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) 26 [stderr] at interceptingMod (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) 27 [stderr] at interceptingMod (/usr/local/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) 28 bash exited with non-zero code: 1

I followed the upgrade steps in the Docs and then just run the EAS build. Same error applies, when building locally.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

45

Environment

expo-env-info 1.0.3 environment info: System: OS: macOS 12.3.1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.5 - /usr/local/opt/nvm/versions/node/v14.17.5/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.16 - /usr/local/opt/nvm/versions/node/v14.17.5/bin/npm Watchman: 2022.03.14.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 26, 27, 29, 30, 31 Build Tools: 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.2 System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-31 | Intel x86 Atom_64 IDEs: Android Studio: 4.0 AI-193.6911.18.40.6514223 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild npmPackages: babel-preset-expo: ~9.1.0 => 9.1.0 expo: ^45.0.0-beta.9 => 45.0.0-beta.9 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 react-native-web: 0.17.1 => 0.17.1 npmGlobalPackages: eas-cli: 0.48.2 expo-cli: 5.4.3 Expo Workflow: managed

Reproducible demo

Since it is a build Issue, I don’t know how to build a reproducible demo.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
danscancommented, May 24, 2022

Turns out the issue is that @expo/config-plugins@4.0.15 doensn’t support .mm AppDelegates, and in my case this version is being hoisted via the expo modules you can see in the yarn why output in my previous message.

Going to figure out and share a workaround now.

More context: below is the output from expo prebuild. The same issue is happening locally as well as in EAS at the Prebuild step.

$ expo prebuild --clean && ./scripts/post-prebuild.sh
Warning! Your git working tree is dirty.
It's recommended to commit all your changes before proceeding, so you can revert the changes made by this command if necessary.

✔ Would you like to proceed? … yes

✔ Cleared android, ios code
⠼ Creating native project directories (./ios and ./android) and 
✔ Created native projects | gitignore already synced
⚠️  Skipped Metro config updates:
› Existing Metro config found; not overwriting.
› You will need to extend the default @expo/metro-config in your Metro config.
  Learn more: https://docs.expo.dev/guides/customizing-metro

✔ Updated package.json and added index.js entry point for iOS and Android
🧶 Using Yarn to install packages. Pass --npm to use npm instead.
✔ Installed JavaScript dependencies 665ms
✖ Config sync failed
[ios.xcodeproj]: withIosXcodeprojBaseMod: Could not locate a valid AppDelegate at root: "/Users/dscanlon/app"
Please report this as an issue on https://github.com/expo/expo-cli/issues
UnexpectedError: [ios.xcodeproj]: withIosXcodeprojBaseMod: Could not locate a valid AppDelegate at root: "/Users/dscanlon/app"
Please report this as an issue on https://github.com/expo/expo-cli/issues
    at getAppDelegateFilePath (/Users/dscanlon/Documents/Genesis/genesis-app/node_modules/@expo/config-plugins/src/ios/Paths.ts:52:11)
    at getAppDelegate (/Users/dscanlon/Documents/Genesis/genesis-app/node_modules/@expo/config-plugins/src/ios/Paths.ts:114:20)
    at Object.getSourceRoot (/Users/dscanlon/Documents/Genesis/genesis-app/node_modules/@expo/config-plugins/src/ios/Paths.ts:119:23)
    at setNotificationSounds (/Users/dscanlon/Documents/Genesis/genesis-app/node_modules/expo-notifications/plugin/build/withNotificationsIOS.js:39:57)
    at /Users/dscanlon/Documents/Genesis/genesis-app/node_modules/expo-notifications/plugin/build/withNotificationsIOS.js:19:9
    at action (/Users/dscanlon/Documents/Genesis/genesis-app/node_modules/@expo/config-plugins/src/plugins/withMod.ts:227:29)
    at interceptingMod (/Users/dscanlon/Documents/Genesis/genesis-app/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:27)
    at action (/Users/dscanlon/Documents/Genesis/genesis-app/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/src/plugins/withMod.ts:228:14)
    at interceptingMod (/Users/dscanlon/Documents/Genesis/genesis-app/node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
    at interceptingMod (/Users/dscanlon/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
    at interceptingMod (/Users/dscanlon/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
    at interceptingMod (/Users/dscanlon/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
    at interceptingMod (/Users/dscanlon/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
    at interceptingMod (/Users/dscanlon/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
    at interceptingMod (/Users/dscanlon/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
    at interceptingMod (/Users/dscanlon/.npm-global/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
error Command failed with exit code 1.
0reactions
danscancommented, May 24, 2022

Workaround: https://github.com/expo/expo/issues/17610#issuecomment-1135304084

Workaround via yarn resolutions:

package.json

{
  // ...
  "resolutions": {
    "@expo/config-plugins": "4.1.5"
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting build errors and crashes - Expo Documentation
Go to your build details page (find it on the build dashboard if you don't have it open already) and expand any failed...
Read more >
expo EAS build (iOS) fails in Pod installation step (SDK45 & 46)
You are seeing this error because either: - Versions in the Podfile.lock cached by EAS do not match required values for some of...
Read more >
Get Started | Customer.io Docs
This plugin has only been tested with Expo SDK versions 45 and 46, Using eas build with EAS managed credentials and a limited...
Read more >
failed to resolve plugin for module "sentry-expo" - You.com
I've sentry-expo in my package.json and in my app.config.js I have plugins: ["sentry-expo"], ... And rebuild eas build --platform ios --profile preview.
Read more >
@expo/config-plugins | Yarn - Package Manager
This is the log of notable changes to the Expo client that are developer-facing. Package-specific changes not released in any SDK will be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found