EAS build error (managed) ios internal distribution

I´m working in a managed workflow and I need a internal distribution version but i get a fastlane error when I run eas build

Build failed: fastlane exited with non-zero code: 1
Error: fastlane exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.EventEmitter.emit (domain.js:486:12)
    at maybeClose (internal/child_process.js:1048:16)
    at Socket.<anonymous> (internal/child_process.js:439:11)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:486:12)
    at Pipe.<anonymous> (net.js:673:12)
    ...
    at Object.spawnAsync [as default] (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at Object.spawn [as default] (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/node_modules/@expo/turtle-spawn/dist/index.js:17:42)
    at Object.runFastlane [as default] (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/node_modules/@expo/fastlane/dist/index.js:16:40)
    at Object.runFastlaneGym (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/node_modules/@expo/build-tools/dist/ios/fastlane.js:15:29)
    at async /Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/node_modules/@expo/build-tools/dist/builders/iosManaged.js:46:13
    at async ManagedBuildContext.runBuildPhase (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/node_modules/@expo/build-tools/dist/context.js:35:28)
    at async Object.iosManagedBuilder (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/node_modules/@expo/build-tools/dist/builders/iosManaged.js:45:9)
    at async build (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/dist/ios/build.js:72:16)
    at async buildIos (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/dist/ios/build.js:29:31)
    at async BuildService.attemptBuild (/Users/expo/.nvm/versions/node/v14.15.1/lib/node_modules/@expo/eas-build-worker/dist/service.js:180:13)

eas.json

{
  "builds": {
    "android": {
      "release": {
        "workflow": "managed"
      },
      "preview": {
        "distribution": "internal",
        "workflow": "managed"
      }
    },
    "ios": {
      "release": {
        "workflow": "managed"
      },
      "preview": {
        "distribution": "internal",
        "workflow": "managed",
        "credentialsSource": "remote"
      }
    }
  }
}

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/samples": "~3.0.3",

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

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

    "@react-native-community/slider": "3.0.3",

    "@react-navigation/web": "^1.0.0-alpha.9",

    "axios": "^0.21.1",

    "d3-interpolate": "^1.4.0",

    "expo": "^40.0.0",

    "expo-app-loading": "^1.0.1",

    "expo-asset": "~8.2.1",

    "expo-barcode-scanner": "~9.1.0",

    "expo-constants": "~9.3.3",

    "expo-device": "~2.4.0",

    "expo-font": "~8.4.0",

    "expo-keep-awake": "~8.4.0",

    "expo-linear-gradient": "~8.4.0",

    "expo-notifications": "~0.8.2",

    "expo-updates": "^0.4.2",

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

    "lodash": "^4.17.20",

    "lodash.merge": "^4.6.2",

    "lodash.range": "^3.2.0",

    "moment": "^2.24.0",

    "react": "^17.0.1",

    "react-dom": "^17.0.1",

    "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",

    "react-native-camera": "git+https://git@github.com/react-native-community/react-native-camera.git",

    "react-native-chart-kit": "^5.6.1",

    "react-native-color-picker": "^0.5.2",

    "react-native-date-ranges": "^2.5.0",

    "react-native-easy-toast": "^1.2.0",

    "react-native-elements": "^1.1.0",

    "react-native-flash-message": "^0.1.21",

    "react-native-floating-action": "^1.20.0",

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

    "react-native-hms-map": "^0.0.2-u-11",

    "react-native-maps": "0.27.1",

    "react-native-maps-directions": "^1.8.0",

    "react-native-modal-popover": "^0.0.12",

    "react-native-phone-call": "^1.0.9",

    "react-native-progress-wheel": "^1.0.5",

    "react-native-qrcode-scanner": "^1.3.1",

    "react-native-range-datepicker": "^1.9.1",

    "react-native-reanimated": "^1.13.2",

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

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

    "react-native-status-bar-height": "^2.5.0",

    "react-native-svg": "12.1.0",

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

    "react-native-tooltips": "^1.0.2",

    "react-native-walkthrough-tooltip": "^1.1.9",

    "react-native-web": "^0.14.11",

    "react-navigation": "^4.4.3",

    "react-navigation-drawer": "^2.3.3",

    "react-navigation-stack": "^2.10.2",

    "react-navigation-tabs": "^2.6.0",

    "react-redux": "^7.1.1",

    "redux": "^4.0.4",

    "redux-thunk": "^2.3.0"

  },

  "devDependencies": {

    "babel-preset-expo": "8.3.0",

    "jest-expo": "^40.0.0"

  },

  "private": true,

  "rnpm": {

    "assets": [

      "./assets/fonts/"

    ]

  }

}

And in the XCode Log from eas i got some errors like this

Error: Unable to resolve module ../screens/SignupScreen.js from /Users/expo/project/build/navigation/SignUpNavigation.js: 
None of these files exist:
  * screens/SignupScreen.js(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  * screens/SignupScreen.js/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
e[0m e[90m 1 | e[39me[36mimporte[39m { createStackNavigator } from e[32m"react-navigation-stack"e[39me[33m;e[39me[0m
e[0me[31me[1m>e[22me[39me[90m 2 | e[39me[36mimporte[39m e[33mSignupScreene[39m from e[32m"../screens/SignupScreen.js"e[39me[33m;e[39me[0m
e[0m e[90m   | e[39m                          e[31me[1m^e[22me[39me[0m
e[0m e[90m 3 | e[39me[36mimporte[39m e[33mFirstCellotrackScreene[39m from e[32m"../screens/FirstCellotrackScreen"e[39me[33m;e[39me[0m
e[0m e[90m 4 | e[39me[36mimporte[39m e[33mFirstSensorScreene[39m from e[32m"../screens/FirstSensorScreen"e[39me[33m;e[39me[0m
e[0m e[90m 5 | e[39me[36mimporte[39m { e[33mPlatforme[39m } from e[32m"react-native"e[39me[33m;e[39me[0m
    at ModuleResolver.resolveDependency (/Users/expo/project/build/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:168:15)
    at DependencyGraph.resolveDependency (/Users/expo/project/build/node_modules/metro/src/node-haste/DependencyGraph.js:353:43)
    at Object.resolve (/Users/expo/project/build/node_modules/metro/src/lib/transformHelpers.js:271:42)
    at resolve (/Users/expo/project/build/node_modules/metro/src/DeltaBundler/traverseDependencies.js:571:33)
    at /Users/expo/project/build/node_modules/metro/src/DeltaBundler/traverseDependencies.js:587:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (/Users/expo/project/build/node_modules/metro/src/DeltaBundler/traverseDependencies.js:586:33)
    at /Users/expo/project/build/node_modules/metro/src/DeltaBundler/traverseDependencies.js:275:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/expo/project/build/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)

there is an error in your app javascript code, you can see that in the last stack you shared. managed support for eas build is not production ready yet, we will announce support for that soon!

1 Like

I have a similar error:

Error: fastlane exited with non-zero code: 1
Error: fastlane exited with non-zero code: 1
    at ChildProcess.completionListener (/usr/local/eas-build-worker/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.EventEmitter.emit (domain.js:486:12)
    at maybeClose (internal/child_process.js:1048:16)
    at Socket.<anonymous> (internal/child_process.js:439:11)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:486:12)
    at Pipe.<anonymous> (net.js:673:12)
    ...
    at Object.spawnAsync [as default] (/usr/local/eas-build-worker/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at Object.spawn [as default] (/usr/local/eas-build-worker/node_modules/@expo/turtle-spawn/dist/index.js:17:42)
    at Object.runFastlane [as default] (/usr/local/eas-build-worker/node_modules/@expo/fastlane/dist/index.js:16:40)
    at Object.runFastlaneGym (/usr/local/eas-build-worker/node_modules/@expo/build-tools/dist/ios/fastlane.js:15:29)
    at async /usr/local/eas-build-worker/node_modules/@expo/build-tools/dist/builders/iosManaged.js:46:13
    at async ManagedBuildContext.runBuildPhase (/usr/local/eas-build-worker/node_modules/@expo/build-tools/dist/context.js:37:28)
    at async Object.iosManagedBuilder (/usr/local/eas-build-worker/node_modules/@expo/build-tools/dist/builders/iosManaged.js:45:9)
    at async build (/usr/local/eas-build-worker/dist/ios/build.js:79:16)
    at async Object.buildIos [as default] (/usr/local/eas-build-worker/dist/ios/build.js:29:31)
    at async Object.build (/usr/local/eas-build-worker/dist/build.js:31:31)

I’m not sure if this is related, but this error occurs earlier in the logs:

[stderr] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` 
attempted to initialize an object with an unknown UUID. `484AC3182EF44398B0084B6A` for attribute: `files`. 
This can be the result of a merge and the unknown UUID is being discarded.

Any ideas for a workaround would be great, we use EAS Build for internal distribution from a Linux setup.

are you using credentials.json? is that a managed or bare project? does it run locally? (i guess if you’re using linux and trying to build for ios the answer would be no, but what about on any other macos machines eg: of colleague?)

credentials.json: Yes, though it only has an android property.

It’s a managed workflow.

If I understand you properly, yes, it runs locally just fine. Internal distribution has also worked fine until now, the only significant change has been the installation and use of expo-auth-session.

can you share a link to your build page? the error that you’re seeing should have more context in xcode logs (you can see those at the bottom of the build log page), you have to download them, or higher up in the logs

also, yeah, using eas build for managed apps isn’t recommended yet. in sdk 40 many things will not work, we’ve been working on resolving those for sdk 41. we’ll be rolling out proper support for managed apps into the eas build preview soon.

Here’s one from this morning: https://expo.io/accounts/weflop/builds/bf7f0bdf-7028-4f02-a535-ccbdfcac9d1b. Looking through the logs, I got an exit status 65. And earlier are the aforementioned stderrs.

Fair! I suppose I could run a branch just for ejected workflows.

1 Like

here’s the error:

+ node /Users/expo/workingdir/build/Melange/node_modules/react-native/cli.js bundle --entry-file index.js --platform ios --dev false --reset-cache --bundle-output /Users/expo/Library/Developer/Xcode/DerivedData/Melange-bmldocjxcuobnfgmkqqytskvknkx/Build/Intermediates.noindex/ArchiveIntermediates/Melange/BuildProductsPath/Release-iphoneos/melange.app/main.jsbundle --assets-dest /Users/expo/Library/Developer/Xcode/DerivedData/Melange-bmldocjxcuobnfgmkqqytskvknkx/Build/Intermediates.noindex/ArchiveIntermediates/Melange/BuildProductsPath/Release-iphoneos/melange.app
warning: the transform cache was reset.
                 Welcome to React Native!
                Learn once, write anywhere


error Unable to resolve module expo-random from /Users/expo/workingdir/build/Melange/node_modules/expo-auth-session/build/PKCE.js: expo-random could not be found within the project.

i found it at the bottom of the xcode logs

expo-auth-session requires that you install expo-random as well: AuthSession - Expo Documentation

Thank you!