issues while migrating to EAS

I’m facing a lot of issues with migrating my expo project ot EAS.

The latest issue I’m facing is this one:

When running eas build --profile development --platform ios I’m getting:

Installing pods
Using Expo modules
Auto-linking React Native modules for target `NextcloudDeck`: RNCAsyncStorage, RNDateTimePicker, RNGestureHandler, RNReanimated, RNScreens, RNVectorIcons, react-native-pager-view, react-native-safe-area-context, and react-native-webview
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`

CocoaPods 1.11.3 is available.
To update use: `sudo gem install cocoapods`

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.3

[!] Unable to find a specification for `expo-dev-menu-interface` depended upon by `expo-dev-client`

You have either:

 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.
[stderr] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `3CDC4D4504B84E47BA590DB5` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
pod exited with non-zero code: 1

I’ve tried to fix it by adding expo-dev-menu-interface explicitely to my project but then I ran into another error:

    conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'EX_DEV_MENU_ENABLED=1')

› Compiling expo-dev-client Pods/expo-dev-menu » DevMenuInternalModule.swift


❌  (node_modules/expo-dev-client/node_modules/expo-dev-menu/ios/DevMenuManager.swift:5:35)

  3 | import EXDevMenuInterface
  4 | 
> 5 | class DevMenuBridgeProxyDelegate: DevMenuDelegateProtocol {
    |                                   ^ cannot find type 'DevMenuDelegateProtocol' in scope
  6 |   private let bridge: RCTBridge
  7 | 
  8 |   init(_ bridge: RCTBridge) {


❌  (node_modules/expo-dev-client/node_modules/expo-dev-menu/ios/DevMenuManager.swift:97:24)

   95 |    */
   96 |   @objc
>  97 |   public var delegate: DevMenuDelegateProtocol? {
      |                        ^ cannot find type 'DevMenuDelegateProtocol' in scope
   98 |     didSet {
   99 |       guard self.canLaunchDevMenuOnStart && (DevMenuSettings.showsAtLaunch || !DevMenuSettings.isOnboardingFinished), let bridge = delegate?.appBridge?(forDevMenuManager: self) as? RCTBridge else {
  100 |         return


❌  (node_modules/expo-dev-client/node_modules/expo-dev-menu/ios/Modules/DevMenuModule.swift:29:41)

  27 |   @objc
  28 |   func queryDevSessionsAsync(_ installationID: String?, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
> 29 |     DevMenuManager.shared.expoApiClient.queryDevSessionsAsync(installationID, completionHandler: { data, response, error in
     |                                         ^ value of type 'DevMenuExpoApiClientProtocol' has no member 'queryDevSessionsAsync'
  30 |       guard error == nil else {
  31 |         reject("ERR_DEVMENU_CANNOT_GET_DEV_SESSIONS", error.debugDescription, error)
  32 |         return

So, I’m not sure how to proceed (well I’ve no idea in fact :sweat_smile: )

Can anyone help me?

Hi @stcyr

What Expo SDK version are you using?
Managed or bare? (If you have an ios directory, it’s bare)

I’d try removing all dependencies you don’t directly reference in your code. Keep any dependencies that are in a newly created app.

Then try removing your node_modules and yarn.lock/package-lock.json and reinstalling your dependencies.

Yes, true, sorry I forgot:

I’m using SDK44 and it’s a managed workflow.

I’ll try your suggestion and come back :slight_smile:

Hello @wodin

I’ve tried your suggestion and have removed the expo-dev-client from my project for now.

The build now fails at the fastlane step.

There are a few warnings:

 Compiling expo-modules-core Pods/ExpoModulesCore » EXViewManagerAdapterClassesRegistry.m

⚠️  (../../../../Public/React-Core/React/RCTImageLoaderWithAttributionProtocol.h:18:70)

RCT_EXTERN BOOL RCTGetImageLoadingPerfInstrumentationForFabricEnabled();
                                                                     ^ this function declaration is not a prototype [-Wstrict-prototypes]

› Compiling expo-modules-core Pods/ExpoModulesCore » EXModuleRegistryAdapter.m

⚠️  (../../../../NativeModulesProxy/EXNativeModulesProxy.h:25:30)

- (void)callMethod:(NSString *)moduleName methodNameOrKey:(id)methodNameOrKey arguments:(NSArray *)arguments resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
                             ^ pointer is missing a nullability type specifier [-Wnullability-completeness]

 Compiling react-native-reanimated Pods/RNReanimated » UIResponder+Reanimated.mm
    pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]

› Compiling react-native-reanimated Pods/RNReanimated » REANodesManager.m
    incompatible pointer types initializing 'REAEventNode *' with an expression of type 'REANode * _Nullable' [-Wincompatible-pointer-types]

› Compiling react-native-reanimated Pods/RNReanimated » REAJSCallNode.m
    pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]

But, it’s probably failing because of the following error:

› Linking   NextcloudDeck » NextcloudDeck

⚠️  ld: method '+UIDatePickerMode:' in category from /Users/expo/Library/Developer/Xcode/DerivedData/NextcloudDeck-frvjjojbqsexcocwrxsjmhrpwpic/Build/Intermediates.noindex/ArchiveIntermediates/NextcloudDeck/BuildProductsPath/Debug-iphoneos/React-Core/libReact-Core.a(RCTDatePickerManager.o) conflicts with same method from another category

› Copying   ios/NextcloudDeck/Supporting/Expo.plist ➜ ./Expo.plist
› Compiling NextcloudDeck » SplashScreen.storyboard
› Preparing NextcloudDeck » Info.plist
› Generating debug NextcloudDeck » NextcloudDeck.app.dSYM
› Executing NextcloudDeck » Bundle React Native code and images

    the transform cache was reset.

▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ 	PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/NextcloudDeck-frvjjojbqsexcocwrxsjmhrpwpic/Build/Intermediates.noindex/ArchiveIntermediates/NextcloudDeck/IntermediateBuildFilesPath/NextcloudDeck.build/Debug-iphoneos/NextcloudDeck.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'NextcloudDeck' from project 'NextcloudDeck')

▸ (1 failure)

** ARCHIVE FAILED **
The following build commands failed:
	PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/NextcloudDeck-frvjjojbqsexcocwrxsjmhrpwpic/Build/Intermediates.noindex/ArchiveIntermediates/NextcloudDeck/IntermediateBuildFilesPath/NextcloudDeck.build/Debug-iphoneos/NextcloudDeck.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'NextcloudDeck' from project 'NextcloudDeck')

(1 failure)

Exit status: 65

What should I do?

Damned, I can’t remove expo-dev-client

This drives me crazy

When I add ´expo-dev-clientI'm getting the error that EAS doesn't find a specification forexpo-dev-menu-interface` (I don’t even understand how I could pass this step in my previous message?!?)

But when I add expo-dev-menu-interface, I’m getting loads of errors like:

 Compiling expo-dev-client Pods/expo-dev-menu » DevMenuInternalModule.swift


❌  (node_modules/expo-dev-client/node_modules/expo-dev-menu/ios/DevMenuManager.swift:5:35)

  3 | import EXDevMenuInterface
  4 | 
> 5 | class DevMenuBridgeProxyDelegate: DevMenuDelegateProtocol {
    |                                   ^ cannot find type 'DevMenuDelegateProtocol' in scope
  6 |   private let bridge: RCTBridge
  7 | 
  8 |   init(_ bridge: RCTBridge) {


❌  (node_modules/expo-dev-client/node_modules/expo-dev-menu/ios/DevMenuManager.swift:97:24)

   95 |    */
   96 |   @objc
>  97 |   public var delegate: DevMenuDelegateProtocol? {
      |                        ^ cannot find type 'DevMenuDelegateProtocol' in scope
   98 |     didSet {
   99 |       guard self.canLaunchDevMenuOnStart && (DevMenuSettings.showsAtLaunch || !DevMenuSettings.isOnboardingFinished), let bridge = delegate?.appBridge?(forDevMenuManager: self) as? RCTBridge else {
  100 |         return


❌  (node_modules/expo-dev-client/node_modules/expo-dev-menu/ios/Modules/DevMenuModule.swift:29:41)

  27 |   @objc
  28 |   func queryDevSessionsAsync(_ installationID: String?, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
> 29 |     DevMenuManager.shared.expoApiClient.queryDevSessionsAsync(installationID, completionHandler: { data, response, error in
     |                                         ^ value of type 'DevMenuExpoApiClientProtocol' has no member 'queryDevSessionsAsync'
  30 |       guard error == nil else {
  31 |         reject("ERR_DEVMENU_CANNOT_GET_DEV_SESSIONS", error.debugDescription, error)
  32 |         return

Please post your dependencies and devDependencies sections from package.json?

Yes, thanks:

  "dependencies": {
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/datetimepicker": "^6.1.3",
    "@react-navigation/elements": "^1.2.1",
    "@react-navigation/native": "^6.0.0",
    "@react-navigation/stack": "^6.0.0",
    "@reduxjs/toolkit": "^1.5.1",
    "axios": "^0.25.0",
    "base-64": "^1.0.0",
    "expo": "^44.0.0",
    "expo-app-loading": "~1.3.0",
    "expo-dev-client": "~0.8.5",
    "expo-dev-menu": "^0.10.6",
    "expo-dev-menu-interface": "^0.6.0",
    "expo-device": "~4.1.0",
    "expo-linking": "~3.0.0",
    "expo-localization": "~12.0.0",
    "expo-screen-orientation": "~4.1.1",
    "expo-splash-screen": "~0.14.1",
    "expo-status-bar": "~1.2.0",
    "expo-system-ui": "~1.1.0",
    "expo-updates": "~0.11.7",
    "i18n-js": "^3.8.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-bouncy-checkbox": "^2.1.1",
    "react-native-drax": "^0.8.0",
    "react-native-dropdown-picker": "^5.3.0",
    "react-native-elements": "^3.4.2",
    "react-native-gesture-handler": "~2.1.0",
    "react-native-material-menu": "^1.2.0",
    "react-native-pager-view": "5.4.9",
    "react-native-reanimated": "~2.3.1",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.10.1",
    "react-native-tab-view": "^3.0.1",
    "react-native-toast-message": "^2.0.2",
    "react-native-vector-icons": "^8.1.0",
    "react-native-web": "0.17.1",
    "react-native-webview": "11.15.0",
    "react-redux": "^7.2.4",
    "redux": "^4.1.0",
    "tslib": "^2.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "eslint": "^7.0.0",
    "eslint-plugin-react": "^7.26.1"
  },```

Remove these two, and it should build.

I’ll try again, but up until now, I’ve always received the following error at the install pods step when I don’t have them in my package.json file:

[!] Unable to find a specification for expo-dev-menu-interfacedepended upon byexpo-dev-client

(see my original post)

I managed to build a simulator “preview” build with your dependencies after removing the expo-dev-menu and expo-dev-menu-interface dependencies.

Oh, I forgot to say I also ran expo doctor --fix-dependencies, which downgraded the @react-native-community/datetimepicker to 4.0.0.

I’m currently waiting in the queue to build a simulator dev client. Looks like it’s going to be a while.

The dev client build also succeeded. So, I was able to build using the simpreview and simdev profiles defined in eas.json (see below):

dependencies
  "dependencies": {
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/datetimepicker": "4.0.0",
    "@react-navigation/elements": "^1.2.1",
    "@react-navigation/native": "^6.0.0",
    "@react-navigation/stack": "^6.0.0",
    "@reduxjs/toolkit": "^1.5.1",
    "axios": "^0.25.0",
    "base-64": "^1.0.0",
    "expo": "^44.0.0",
    "expo-app-loading": "~1.3.0",
    "expo-dev-client": "~0.8.5",
    "expo-device": "~4.1.0",
    "expo-linking": "~3.0.0",
    "expo-localization": "~12.0.0",
    "expo-screen-orientation": "~4.1.1",
    "expo-splash-screen": "~0.14.1",
    "expo-status-bar": "~1.2.0",
    "expo-system-ui": "~1.1.0",
    "expo-updates": "~0.11.7",
    "i18n-js": "^3.8.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-bouncy-checkbox": "^2.1.1",
    "react-native-drax": "^0.8.0",
    "react-native-dropdown-picker": "^5.3.0",
    "react-native-elements": "^3.4.2",
    "react-native-gesture-handler": "~2.1.0",
    "react-native-material-menu": "^1.2.0",
    "react-native-pager-view": "5.4.9",
    "react-native-reanimated": "~2.3.1",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.10.1",
    "react-native-tab-view": "^3.0.1",
    "react-native-toast-message": "^2.0.2",
    "react-native-vector-icons": "^8.1.0",
    "react-native-web": "0.17.1",
    "react-native-webview": "11.15.0",
    "react-redux": "^7.2.4",
    "redux": "^4.1.0",
    "tslib": "^2.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "eslint": "^7.0.0",
    "eslint-plugin-react": "^7.26.1"
  },
eas.json
{
  "cli": {
    "version": ">= 0.52.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "simdev": {
      "extends": "development",
      "ios": {
        "simulator": true
      }
    },
    "preview": {
      "distribution": "internal"
    },
    "simpreview": {
      "extends": "preview",
      "ios": {
        "simulator": true
      }
    },
    "production": {}
  },
  "submit": {
    "production": {}
  }
}

What?!? But, how do you build your app?

I’ve removed the expo-dev-menu and expo-dev-menu-interface dependencies, removed the node_modules folder and the package-lock.json file, ran npm i, launched a build with eas build --profile development --platform ios, and it fails at the install pods step:

Installing pods
Using Expo modules
Auto-linking React Native modules for target `NextcloudDeck`: RNCAsyncStorage, RNDateTimePicker, RNGestureHandler, RNReanimated, RNScreens, RNVectorIcons, react-native-pager-view, react-native-safe-area-context, and react-native-webview
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`

CocoaPods 1.11.3 is available.
To update use: `sudo gem install cocoapods`

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.3

[!] Unable to find a specification for `expo-dev-menu-interface` depended upon by `expo-dev-launcher`

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.
[stderr] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `6F3B60BF6A4F467EA56D5405` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
pod exited with non-zero code: 1

If ever you want to try and build my particular app, it’s there => Cyrille Bollu / deck-react-native · GitLab

Regards,

Cyrille

Hi again

In the dependencies you said you were using there was no mention of expo-cli or eas-cli, but I see you do have them installed. Those should be installed globally and not locally in your package.json.

Here are the differences between the dependencies in the test app that I was able to build (on the left), and your app (on the right):

Although that is not, apparently, the cause of the error you’re getting, it seems it would nevertheless cause problems down the line if not fixed:

After removing those I was still getting the same error. Then I tried removing package-lock.json and installing the dependencies with yarn instead. It worked!

So I think there are two possibilities:

  • Some weird bug in npm that is not affecting yarn
  • More likely, I think: By removing the lock file and then installing with yarn I suspect some package versions (of things not specifically mentioned in your package.json) were changed

So it might also work if you basically do the same thing, but re-install the dependencies with npm instead of yarn. I removed yarn.lock and node_modules again. At this point I had no yarn.lock and no package-lock.json and package.json was like yours, but without eas-cli and expo-cli. I then ran npm i and discovered that the resulting package-lock.json was significantly different to what it was before removing it and re-installing the dependencies.

deck-react-native$ git diff --stat
 package-lock.json | 2154 ++++++++++++++++++++++++++++++++---------------------
 1 file changed, 1319 insertions(+), 835 deletions(-)

I tried building again, and it worked.

So, in summary:

  • I ran expo doctor --fix-dependencies
  • I removed eas-cli and expo-cli
  • I did the following:

and it builds for me :slight_smile:

See if that works for you.

EDIT: Here are the patches:

Damned, I tried again everything and it didn’t work.

Then, I installed yarn, re-installed the dependencies, and, BOOOM, it worked

It works, but, man, I don’t like such an untrustable environment :frowning:

we strongly advise against installing expo-cli and eas-cli locally to your project and mention this in the installation instructions. but this happens often enough that i think we need to actually warn people in expo doctor when they do this

1 Like

Well, that was not the problem I believe.

I’m almost sure I’ve installed expo-cli/eas-cli, out of despair, much later during my troubleshooting steps

@notbrent, you recently mentioned that expo doctor doesn’t check peer dependencies(?) or maybe it was dependencies of dependencies? I assume that’s still the case?

I have a feeling that if that was fixed it might have helped in this case.

I’d be interested to know if the following works:

  • Delete yarn.lock and node_modules again
  • Download package.json and package-lock.json from my gist
  • Re-run npm install
  • See if it builds