EAS build ios consistently hanging

Hi, this is my first time using Expo and EAS, would love any help, thank you!

  • Managed workflow
  • eas-cli/3.12.0 darwin-arm64 node-v20.0.0, SDK 48

This build hanged and timed out after 2 hours: Build Details — 4d137bb7-b8cc-408a-ac8c-4692aefaec18 — taro — Expo

The next build (with a couple extra minor commits) did the same: Build Details — aceed0ab-96da-4262-83a0-d7192ec804d4 — taro — Expo

It hangs during Fastlane after this log line: Bundle React Native code and images the transform cache was reset.

There are a couple duplicate method warnings, but the same warnings show up locally, where it successfully builds.

Here’s my local output for npx expo run:ios --configuration Release

› Linking   taro » taro
⚠️  ld: duplicate method '+moduleName' in
┌─[category]: ExpoBridgeModule-3ee9fcd0f088bca0be67188a5354d05d.o ExpoModulesCore/libExpoModulesCore.a
└─[class]: ExpoBridgeModule-a4e4568e8acc593fa8a5753a3ce9a37a.o ExpoModulesCore/libExpoModulesCore.a

⚠️  ld: method '+UIStatusBarAnimation:' in category from /Users/kalvin/Library/Developer/Xcode/DerivedData/taro-frtwqjqzckqwsoghoksqhqrhbtfg/Build/Products/Release-iphonesimulator/React-CoreModules/libReact-CoreModules.a(RCTStatusBarManager.o) conflicts with same method from another category
› Linking   taro » taro
⚠️  ld: duplicate method '+moduleName' in
┌─[category]: ExpoBridgeModule-3ee9fcd0f088bca0be67188a5354d05d.o ExpoModulesCore/libExpoModulesCore.a
└─[class]: ExpoBridgeModule-a4e4568e8acc593fa8a5753a3ce9a37a.o ExpoModulesCore/libExpoModulesCore.a

⚠️  ld: method '+UIStatusBarAnimation:' in category from /Users/kalvin/Library/Developer/Xcode/DerivedData/taro-frtwqjqzckqwsoghoksqhqrhbtfg/Build/Products/Release-iphonesimulator/React-CoreModules/libReact-CoreModules.a(RCTStatusBarManager.o) conflicts with same method from another category
› Generating debug taro » taro.app.dSYM
› Executing taro » Bundle React Native code and images
    the transform cache was reset.
› Executing taro » [CP] Copy Pods Resources
› Executing taro » [CP] Embed Pods Frameworks
› Signing   taro » taro.app
› Creating  taro » taro.app
    Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'taro' from project 'taro')
    Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'taro' from project 'taro')
    Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
› Build Succeeded

› 0 error(s), and 10 warning(s)

Only difference between local build and EAS I’m aware of, is that the local .yarnrc.yml has two extra lines:

enableGlobalCache: true
yarnPath: .yarn/releases/yarn-3.5.1.cjs

These lines are a workaround for the following errors that otherwise appear when running yarn locally:

➤ YN0066: │ typescript@patch:typescript@npm%3A5.0.4#builtin<compat/typescript>::version=5.0.4&hash=8133ad: Cannot apply hunk #1 (set enableInlineHunks for details)
➤ YN0066: │ typescript@patch:typescript@npm%3A4.9.5#builtin<compat/typescript>::version=4.9.5&hash=8133ad: Cannot apply hunk #2 (set enableInlineHunks for details)

hi there!

it’s hard to tell from looking at the logs what might be going on. we’re working on having builds upload their full xcode logs when they are terminated due to a timeout. this may result in some more helpful output.

one thing you could try is using patch-package to modify the bundling scripts and add your own timeout and/or verbose logs.

would you be able to share your project? i’d be curious to dig in to see what is going on here. if you can share with me on github i’m brentvatne on there.

Thanks Brent, I’ll try adding logs tonight. Would you suggest trying eas build --local as well?

I thought the EAS docs say that full xcode logs can already be viewed after a build is completed, good to know that’s not yet the case.

I just shared my project with you. If you have time to take a look today or tomorrow I’d really appreciate it. Thank you!

Hi @brents, I’m still very interested whenever you have a chance to take a look at the project! Thanks so much!

hey there! i cloned your repo and was able to reproduce it on eas build using a medium sized worker, and the build succeeded with a large worker. initially, the build succeeded locally as well, but when i tried again a bit later (with less memory available), the build process grew to take up more than 12gb of ram and my machine ran out of memory.

  1. we should handle OOM errors on mac builds better and show an appropriate error for this
  2. i can’t say for certain yet, but i believe the tamagui compiler is a likely culprit. in one other similar report to yours, the developer’s project also had tamagui installed

hi there!

i spoke with nate from tamagui about this, and he suggested trying to disable the compiler. i did this and a build of your project then succeeded for me. so it does seem like the tamagui compiler may be the culprit here.

you can try verifying this on your end by removing tamagui from your babel config (although the TAMAGUI_TARGET is still needed):

process.env.TAMAGUI_TARGET = "native" // Don't forget to specify your TAMAGUI_TARGET here

module.exports = function (api) {
  api.cache(true)
  return {
    presets: ["babel-preset-expo"],
    plugins: [
      "@babel/plugin-proposal-export-namespace-from",
      // [
      //   "@tamagui/babel-plugin",
      //   {
      //     components: ["tamagui"],
      //     config: "./tamagui.config.ts",
      //     logTimings: true
      //   }
      // ],
      [
        "transform-inline-environment-variables",
        {
          include: "TAMAGUI_TARGET",
        },
      ],
      "react-native-reanimated/plugin",
      require.resolve("expo-router/babel"),
    ],
  }
}
1 Like

also, if you’re comfortable with it, nate is interested in trying to debug this. would you be willing to share your project with him on github? his account is natew

Thanks so much, I commented out the compiler and it builds! Yes, I’ve shared with Nate, it would be great if he can help debug.