Fail when building app using eas build

Hello, I am trying to build the app using ‘eas build’ but im getting an error on fastlane:

Build failed: Fastlane build failed with unknown error. Please refer to the “Run fastlane” and “Xcode Logs” phases.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.

This is a managed project using expo sdk version 44.0.
If i build the project using ‘expo build:ios’ it build correctly.

› Executing MyApp » 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/MyApp-bodhpwrointcyubyhcoeqbzktitc/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'MyApp' from project 'MyApp')
▸ (1 failure)
** ARCHIVE FAILED **
The following build commands failed:
	PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/MyApp-bodhpwrointcyubyhcoeqbzktitc/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'MyApp' from project 'MyApp')
(1 failure)
Exit status: 65
+-------------+-------------------------+
|           Build environment           |
+-------------+-------------------------+
| xcode_path  | /Applications/Xcode.app |
| gym_version | 2.185.1                 |
| sdk         | iPhoneOS15.0.sdk        |
+-------------+-------------------------+

Hey @nxtzbr, can you share your eas.json and package.json? Also, can you try creating a brand new projecting and try to build with eas build --platform ios?

Hi there:

Same here. Do you find a solution?

package.json
{

“main”: “node_modules/expo/AppEntry.js”,

“scripts”: {

"start": "expo start",

"android": "expo start --android",

"ios": "expo start --ios",

"web": "expo start --web",

"eject": "expo eject",

"test": "jest --watchAll"

},

“jest”: {

"preset": "jest-expo"

},

“dependencies”: {

"@expo/vector-icons": "^12.0.0",

"@react-native-async-storage/async-storage": "~1.15.0",

"@react-native-community/masked-view": "0.1.10",

"@react-native-community/netinfo": "6.0.2",

"@react-native-firebase/app": "^14.5.1",

"@react-native-firebase/crashlytics": "^14.5.1",

"@react-native-firebase/messaging": "^14.5.1",

"@react-navigation/bottom-tabs": "5.11.2",

"@react-navigation/drawer": "^5.12.7",

"@react-navigation/material-top-tabs": "^6.0.2",

"@react-navigation/native": "^6.0.2",

"@react-navigation/stack": "^6.0.6",

"@types/crypto-js": "^4.0.2",

"@types/react-native-snap-carousel": "^3.8.4",

"axios": "^0.21.1",

"crypto-js": "^4.1.1",

"expo": "^43.0.0",

"expo-asset": "~8.4.3",

"expo-constants": "~12.1.3",

"expo-contacts": "~10.0.3",

"expo-dev-client": "~0.6.3",

"expo-font": "~10.0.3",

"expo-linking": "~2.4.2",

"expo-notifications": "~0.13.3",

"expo-splash-screen": "~0.13.5",

"expo-status-bar": "~1.1.0",

"expo-updates": "~0.10.15",

"expo-web-browser": "~10.0.3",

"moment": "^2.29.1",

"oauth-1.0a": "^2.2.6",

"react": "17.0.1",

"react-content-loader": "^6.0.3",

"react-dom": "17.0.1",

"react-error-boundary": "^3.1.3",

"react-hook-form": "^7.13.0",

"react-native": "0.64.3",

"react-native-base64": "^0.2.1",

"react-native-gesture-handler": "~1.10.2",

"react-native-mask-input": "^1.1.0",

"react-native-pager-view": "5.4.6",

"react-native-paper": "^4.9.2",

"react-native-reanimated": "~2.2.0",

"react-native-safe-area-context": "3.3.2",

"react-native-screens": "~3.8.0",

"react-native-snap-carousel": "^3.9.1",

"react-native-tab-view": "^2.16.0",

"react-native-web": "0.17.1",

"react-native-webview": "11.13.0",

"react-redux": "^7.2.4",

"redux": "^4.1.1",

"redux-thunk": "^2.3.0"

},

“devDependencies”: {

"@babel/core": "^7.12.9",

"@types/react": "~17.0.21",

"@types/react-native": "~0.64.12",

"@types/react-redux": "^7.1.18",

"eslint-plugin-react-hooks": "^4.2.0",

"jest-expo": "~43.0.1",

"typescript": "~4.3.5"

},

“private”: true

}

eas.json
{

"build": {

    "development": {

        "developmentClient": true,

        "distribution": "internal",

        "ios": {

            "cocoapods": "1.11.2"

        }

    },

    "production": {},

    "prod-v2": {

        "releaseChannel": "prod-v2",

        "ios": {

            "cocoapods": "1.11.2"

        }

    }

},

"cli": {

    "version": ">= 0.34.1"

}

}

I actually fixed that, but I do not remember what exactly I have done. I changed my SDK version and all my packages versions and I was using a custom package where I needed to host it so I could install through NPM but yeah, i dont know exactly what I have done to fix bro, sorry.

Error at PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images means there was a problem building js bundle, check raw xcode logs at the end of build page for more details

1 Like

Exactly, I solve finally. I has learned that this error is too generic. We most to take a look to Xcode logs… Thanks