Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Expo Build Failing due to cocoapods version #2241

Closed
sugaith opened this issue Feb 21, 2024 · 1 comment
Closed

React Native Expo Build Failing due to cocoapods version #2241

sugaith opened this issue Feb 21, 2024 · 1 comment
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@sugaith
Copy link

sugaith commented Feb 21, 2024

Summary

Recently, expo eas started to spontaneously install cocoapods 1.15.0 which was causing expo iOS builds to fail.

The thing is that even forcing the installation (in several ways) of a previous working cocoapods version (in our case, 1.14.3), the expo build overwrites it and still uses 1.15.0 to run pod install.

Already Modified eas.json with

...
 "ios": {
        "image": "latest",
        "resourceClass": "default",
        "cocoapods": "1.14.3"
   },
   ...

but this takes no effect at all. eas build with --clear-cache also no effect

Using app configuration:

[READ_APP_CONFIG] Using app configuration:
[READ_APP_CONFIG] {
  "name": "Closet Kitchen Sink",
  "slug": "closet-kitchen-sink",
  "version": "0.1.2",
  "sdkVersion": "49.0.0",
  "platforms": [
    "ios",
    "android",
    "web"
  ],
  "orientation": "portrait",
  "icon": "./assets/icon.png",
  "splash": {
    "image": "./assets/splash.png",
    "resizeMode": "contain",
    "backgroundColor": "#ffffff"
  },
  "updates": {
    "fallbackToCacheTimeout": 0,
    "url": "https://u.expo.dev/e45e67a4-43eb-4b49-9510-314c393e4783"
  },
  "assetBundlePatterns": [
    "**/*"
  ],
  "ios": {
    "supportsTablet": true,
    "bundleIdentifier": "com.xxxxxx.closetkitchensink",
    "infoPlist": {
      "UIBackgroundModes": [
        "fetch",
        "remote-notification"
      ]
    },
    "googleServicesFile": "./GoogleService-Info-qa.plist"
  },
  "android": {
    "allowBackup": false,
    "softwareKeyboardLayoutMode": "pan",
    "adaptiveIcon": {
      "foregroundImage": "./assets/adaptive-icon.png",
      "backgroundColor": "#FFFFFF"
    },
    "package": "com.xxxxxxx.closetkitchensink",
    "googleServicesFile": "./google-services-qa.json"
  },
  "web": {
    "favicon": "./assets/favicon.png",
    "bundler": "metro"
  },
  "plugins": [
    [
      "expo-build-properties",
      {
        "ios": {
          "flipper": false,
          "deploymentTarget": "14.0",
          "useFrameworks": "static"
        }
      }
    ],
    [
      "@react-native-firebase/app"
    ],
    [
      "./plugins/withAndroidRiveAssets"
    ]
  ],
  "extra": {
    "eas": {
      "projectId": "333333333333"
    }
  },
  "owner": "xxx-xxx",
  "runtimeVersion": {
    "policy": "sdkVersion"
  }
}

Some logs:

Cocoapods version in your eas.json does not match the version currently installed in your system
[SETUP_WORKINGDIR] Preparing workingdir /var/folders/gh/0cww6vn93nv_jjsw3xkm0b4m0000gn/T/eas-build-local-nodejs/dcc0aa2c-750e-4b87-b960-a3fa38047581
[START_BUILD] Starting build
 "job": {
   "type": "managed",
   "platform": "ios",
   "projectArchive": {
     "type": "PATH",
     "path": "/var/folders/gh/0cww6vn93nv_jjsw3xkm0b4m0000gn/T/eas-cli-nodejs/713f90[82](https://github.com/xxxxxxxxxxxx/actions/runs/7991059456/job/21821579243#step:13:83)-5b0f-4af4-9d9c-90a019cc0deb.tar.gz"
   },
   "projectRootDirectory": "apps/kitchen-sink-app",
   "builderEnvironment": {
     "image": "latest",
     "cocoapods": "1.14.3"
   },
   "cache": {
     "disabled": false,
     "paths": [],
     "clear": true
   },
   "updates": {},
   "scheme": "ClosetKitchenSink",
   "version": {
     "buildNumber": "[96](https://xxxxxxxxx/Closet-Kitchen-Sink/actions/runs/7991059456/job/21821579243#step:13:97)"
   },
   "experimental": {},
   "mode": "build",
   "triggeredBy": "EAS_CLI"
 }

...

[INSTALL_PODS] Installing glog (0.3.5)
[INSTALL_PODS] Installing hermes-engine (0.72.10)
[INSTALL_PODS] [!] Error installing hermes-engine
[INSTALL_PODS] ――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[INSTALL_PODS] ### Command
[INSTALL_PODS] ```
[INSTALL_PODS] /usr/local/lib/ruby/gems/3.0.0/bin/pod install
[INSTALL_PODS] ```
[INSTALL_PODS] ### Report
[INSTALL_PODS] * What did you do?
[INSTALL_PODS] * What did you expect to happen?
[INSTALL_PODS] * What happened instead?
[INSTALL_PODS] ### Stack
[INSTALL_PODS] ```
[INSTALL_PODS]    CocoaPods : 1.15.0
[INSTALL_PODS]         Ruby : ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-darwin21]
[INSTALL_PODS]     RubyGems : 3.5.5
[INSTALL_PODS]         Host : macOS 12.7.3 (21H1015)
[INSTALL_PODS]        Xcode : 14.2 (14C18)
[INSTALL_PODS]          Git : git version 2.43.0
[INSTALL_PODS] Ruby lib dir : /usr/local/Cellar/[email protected]/3.0.6_1/lib

Managed or bare?

Managed

Environment

expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 12.7.3
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 18.19.0 - /var/folders/gh/0cww6vn93nv_jjsw3xkm0b4m0000gn/T/yarn--1708531962090-0.9098061866296252/node
      Yarn: 1.22.19 - /var/folders/gh/0cww6vn93nv_jjsw3xkm0b4m0000gn/T/yarn--1708531962090-0.9098061866296252/yarn
      npm: 10.2.3 - ~/hostedtoolcache/node/18.19.0/x64/bin/npm
    Managers:
      CocoaPods: 1.14.3 - /Users/runner/hostedtoolcache/Ruby/2.7.6/x64/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
      Android SDK:
        API Levels: 31, 32, 33, 33, 33, [34](https://github.com/Utility-NYC/Closet-Kitchen-Sink/actions/runs/7991911947/job/21824514886#step:15:35), 34, 34
        Build Tools: 31.0.0, 32.0.0, 33.0.0, 33.0.1, 33.0.2, 33.0.3, 34.0.0
        Android NDK: 25.2.9519653
    IDEs:
      Xcode: 14.2/14C18 - /usr/bin/xcodebuild
    npmPackages:
      @expo/metro-config: ~0.10.7 => 0.10.7 
      babel-preset-expo: ~9.5.1 => 9.5.2 
      expo: ~[49](https://xxxxxxxxxx/Closet-Kitchen-Sink/actions/runs/7991911947/job/21824514886#step:15:50).0.18 => 49.0.22 
      metro: 0.78.0 => 0.78.0 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.72.10 => 0.72.10 
      react-native-web: ~0.19.6 => 0.19.9 
    Expo Workflow: managed

Error output

No response

Reproducible demo or steps to reproduce from a blank project

eas build --profile=store --plarform=ios

@sugaith sugaith added the needs review Issue is ready to be reviewed by a maintainer label Feb 21, 2024
@szdziedzic
Copy link
Member

Hi there, I see that your logs come from the --local build. There are some limitations regarding local builds: https://docs.expo.dev/build-reference/local-builds/#limitations. One of them is that Customizing versions of software is not supported, fields node, yarn, fastlane, cocoapods, ndk, image in eas.json are ignored.
So basically if you run a build not on EAS servers (--local) you are responsible for making sure that the correct tool version is installed on the device. You can also see a warning about version mismatch in your logs:

Cocoapods version in your eas.json does not match the version currently installed in your system
[SETUP_WORKINGDIR] Preparing workingdir /var/folders/gh/0cww6vn93nv_jjsw3xkm0b4m0000gn/T/eas-build-local-nodejs/dcc0aa2c-750e-4b87-b960-a3fa38047581
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants