expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
726 stars 79 forks source link

iOS internal distribution build is failing during Pods Install step #2308

Closed speedhawk21 closed 3 months ago

speedhawk21 commented 3 months ago

Build/Submit details page URL

https://expo.dev/accounts/briansc/projects/toprecall/builds/ca8d63fc-542b-4de4-807a-b27612d4301e

Summary

When I push to EAS, the build fails at the Install Pods stage. Expo Doctor on EAS also shows an error, with strip-ansi related to Metro.

Locally the build succeeds and there are no issues with Expo Doctor. I'm able to run the app in the IOS simulator without issue and also run a local web build.

The error only occurs when deploying to EAS when it reaches the Pod Install stage. Here is the error:

Using Expo modules
[Expo] Enabling modular headers for pod ExpoModulesCore
[!] Invalid `Podfile` file: undefined method `[]' for nil:NilClass.
   from /Users/expo/workingdir/build/ios/Podfile:42
   -------------------------------------------
     use_expo_modules!
 >    config = use_native_modules!

   -------------------------------------------

Here is my package.json:

{
  "name": "toprecall",
  "version": "0.0.1",
  "main": "expo-router/entry",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "preview:ios": "EXPO_DEBUG=true eas build --profile preview --platform ios --non-interactive",
    "build:web": "expo export -p web",
    "serve": "serve dist",
    "prettier:write": "npx prettier --write ./src/**/*.{js,jsx,ts,tsx,json} && npx prettier --write *.{js,jsx,ts,tsx,json}",
    "lint": "tsc --noEmit && eslint --ext .js,.jsx,.ts,.tsx ./src/"
  },
  "dependencies": {
    "@aws-amplify/react-native": "^1.0.24",
    "@aws-amplify/rtn-web-browser": "^1.0.25",
    "@aws-amplify/ui-react-native": "^2.1.4",
    "@tanstack/query-async-storage-persister": "^5.18.0",
    "@tanstack/react-query": "^5.17.15",
    "@tanstack/react-query-persist-client": "^5.18.0",
    "aws-amplify": "^6.0.23",
    "react-native-gesture-handler": "~2.14.0",
    "react-native-get-random-values": "~1.8.0",
    "react-native-reanimated": "~3.6.2",
    "@expo/vector-icons": "^14.0.0",
    "@react-navigation/native": "^6.0.2",
    "expo": "~50.0.14",
    "expo-font": "~11.10.3",
    "expo-linking": "~6.2.2",
    "expo-router": "~3.4.8",
    "expo-splash-screen": "~0.26.4",
    "expo-status-bar": "~1.11.1",
    "expo-system-ui": "~2.9.3",
    "expo-web-browser": "~12.8.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.73.6",
    "react-native-safe-area-context": "4.8.2",
    "react-native-screens": "~3.29.0",
    "react-native-web": "~0.19.6",
    "@react-native-async-storage/async-storage": "1.21.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/eslint-parser": "^7.23.10",
    "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
    "@react-native-community/eslint-config": "^3.2.0",
    "@tanstack/eslint-plugin-query": "^5.17.7",
    "@types/react": "~18.2.45",
    "eslint": "^8.56.0",
    "eslint-plugin-react": "^7.33.2",
    "eslint-plugin-react-native": "^4.1.0",
    "jest": "^29.2.1",
    "jest-expo": "~50.0.4",
    "prettier": "^3.2.4",
    "react-test-renderer": "18.2.0",
    "typescript": "^5.1.3"
  },
  "private": true
}

Managed or bare?

Managed

Environment

npx expo-doctor
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for issues with metro config
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that packages match versions required by installed Expo SDK
✔ Check native tooling versions
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
npx expo-env-info
Need to install the following packages:
expo-env-info@1.2.0
Ok to proceed? (y) 

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.3.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
      Yarn: 1.22.21 - ~/.nvm/versions/node/v18.18.2/bin/yarn
      npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
    Managers:
      CocoaPods: 1.14.3 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
    IDEs:
      Xcode: 15.3/15E204a - /usr/bin/xcodebuild
    npmPackages:
      expo: ~50.0.14 => 50.0.14 
      expo-router: ~3.4.8 => 3.4.8 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.73.6 => 0.73.6 
      react-native-web: ~0.19.6 => 0.19.10 
    npmGlobalPackages:
      eas-cli: 7.6.2
    Expo Workflow: managed

Error output

Using Expo modules
[Expo] Enabling modular headers for pod ExpoModulesCore
[!] Invalid `Podfile` file: undefined method `[]' for nil:NilClass.
 #  from /Users/expo/workingdir/build/ios/Podfile:42
 #  -------------------------------------------
 #    use_expo_modules!
 >    config = use_native_modules!
 #  
 #  -------------------------------------------
Error: Unknown error. See logs of the Install pods build phase for more information.

Reproducible demo or steps to reproduce from a blank project

This error occurs when running the build command:

eas build --profile preview --platform ios --non-interactive

speedhawk21 commented 3 months ago

Was able to resolve this by removing plugins and pages. The issue was unrelated to the eas-cli after all so closing this.