expo / eas-cli

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

error: SHA-1 for file /var/folders... is not computed. #2382

Closed jordmccord closed 1 week ago

jordmccord commented 2 weeks ago

Build/Submit details page URL

No response

Summary

When running local eas build since upgrading to SDK51 iOS builds are getting to the Executing NativeUI » Bundle React Native code and images step in the build then erroring out

error: SHA-1 for file /var/folders/sx/ffjs5mm92nbfx8q5kj8g86100000gn/T/eas-build-local-nodejs/069db7f2-cdcf-4746-a3d7-f5115dad9afe/build/apps/native-ui-storybook/index.js (/var/folders/sx/ffjs5mm92nbfx8q5kj8g86100000gn/T/eas-build-local-nodejs/069db7f2-cdcf-4746-a3d7-f5115dad9afe/build/apps/native-ui-storybook/index.js) is not computed.

This is happening locally on MacOS and on GH actions m1 runners.

Managed or bare?

Managed

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.4.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
      Yarn: 1.22.22 - ~/Repos/design-systems/node_modules/.bin/yarn
      npm: 10.5.1 - ~/.nvm/versions/node/v18.17.0/bin/npm
      Watchman: 2024.04.15.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /Users/jordmccord/.rvm/gems/ruby-2.7.6/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
    IDEs:
      Android Studio: 2022.2 AI-222.4459.24.2221.10121639
      Xcode: 15.4/15F31d - /usr/bin/xcodebuild
    npmPackages:
      react-native: 0.74.1 => 0.74.1 
    npmGlobalPackages:
      eas-cli: 9.0.5
    Expo Workflow: managed
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check for issues with metro config
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that packages match versions required by installed Expo SDK
✔ 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

Didn't find any issues with the project!

Error output

[RUN_FASTLANE] › Generating debug NativeUI » NativeUI.app.dSYM
[RUN_FASTLANE] › Executing NativeUI » Bundle React Native code and images
[RUN_FASTLANE]     Bundler cache is empty, rebuilding (this may take a minute)
[RUN_FASTLANE]
❌  error: SHA-1 for file /var/folders/4v/vsbt5f350nb4g9vj2q3yk5xm0000gp/T/eas-build-local-nodejs/4c9f174c-069c-40b3-9020-723da997aa34/build/apps/native-ui-storybook/index.js (/var/folders/4v/vsbt5f350nb4g9vj2q3yk5xm0000gp/T/eas-build-local-nodejs/4c9f174c-069c-40b3-9020-723da997aa34/build/apps/native-ui-storybook/index.js) is not computed.

[RUN_FASTLANE] ▸ ** BUILD FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸    PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /var/folders/4v/vsbt5f350nb4g9vj2q3yk5xm0000gp/T/eas-build-local-nodejs/4c9f174c-069c-40b3-9020-723da997aa34/build/apps/native-ui-storybook/ios/build/Build/Intermediates.noindex/NativeUI.build/Release-iphonesimulator/NativeUI.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'NativeUI' from project 'NativeUI')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** BUILD FAILED **
[RUN_FASTLANE]
[RUN_FASTLANE]
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE]  PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /var/folders/4v/vsbt5f350nb4g9vj2q3yk5xm0000gp/T/eas-build-local-nodejs/4c9f174c-069c-40b3-9020-723da997aa34/build/apps/native-ui-storybook/ios/build/Build/Intermediates.noindex/NativeUI.build/Release-iphonesimulator/NativeUI.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'NativeUI' from project 'NativeUI')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE]
[RUN_FASTLANE] +---------------------------------------+
[RUN_FASTLANE] |           Build environment           |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path  | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.219.0                 |
[RUN_FASTLANE] | sdk         | iPhoneOS17.5.sdk        |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE]
[RUN_FASTLANE] Looks like fastlane ran into a build/archive error with your project
[RUN_FASTLANE] It's hard to tell what's causing the error, so we wrote some guides on how
[RUN_FASTLANE] to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[RUN_FASTLANE] Before submitting an issue on GitHub, please follow the guide above and make
[RUN_FASTLANE] sure your project is set up correctly.
[RUN_FASTLANE] fastlane uses `xcodebuild` commands to generate your binary, you can see the
[RUN_FASTLANE] the full commands printed out in yellow in the above log.
[RUN_FASTLANE] Make sure to inspect the output above, as usually you'll find more error information there
[RUN_FASTLANE]
[RUN_FASTLANE] [!] Error building the application - see the log above
[RUN_FASTLANE] Error: The "Run fastlane" step failed with an unknown error. Refer to "Xcode Logs" below for additional, more detailed logs.

Build failed
The "Run fastlane" step failed with an unknown error. Refer to "Xcode Logs" below for additional, more detailed logs.
npx exited with non-zero code: 1
Error: npx exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/spawn-async/build/spawnAsync.js:41:23)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5)
    ...
    at spawnAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at runLocalBuildAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/local.js:42:56)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/build.js:85:13
    at async startBuildAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:288:12)
    at async prepareAndStartBuildAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:274:19)
    at async runBuildAndSubmitAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:104:49)
    at async Build.runAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/commands/build/index.js:42:9)
    at async Build._run (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/command.js:80:22)
    at async Config.runCommand (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/config/config.js:301:25) {
  pid: 64510,
  output: [ '', '' ],
  stdout: '',
  stderr: '',
  status: 1,
  signal: null
}
    Error: build command failed.

Reproducible demo or steps to reproduce from a blank project

Run eas build --profile preview -p ios --local --output './build/native-ui.tar.gz' --clear-cache --non-interactive

12levoav commented 2 weeks ago

+

jordmccord commented 2 weeks ago

Managed to fix this by updating the EAS_LOCAL_BUILD_WORKINGDIR

arvidnilber commented 2 weeks ago

Facing the same issue.

@jordmccord could you explain more how you managed to fix this? Tried to set EAS_LOCAL_BUILD_WORKINGDIR in my .env file to /tmp/eas-native-build but the issue persists.

jordmccord commented 2 weeks ago

@arvidnilber I ran EAS_LOCAL_BUILD_WORKINGDIR='./eas-buld' eas build --profile preview -p ios --local --output './build/my-app.tar.gz' just for my iOS build. Don't know if the issue was with the /tmp folder?!

arvidnilber commented 2 weeks ago

Your snippet worked! Thanks, spent a lot of time debugging this. @jordmccord

jimmyl02 commented 2 weeks ago

I'm facing the same issue when attempting a local build for ios, however I get the following error message when attempting the workaround

PluginError: Failed to resolve plugin for module "expo-build-properties" relative to "eas-build/build"

Did anyone else face this issue for the workaround?

israelouteiro commented 2 weeks ago

even after run npx expo install --fix bug stils happen to me, so i change this line on package.json and bug goes away

    "main": "expo/AppEntry.js",
jimmyl02 commented 1 week ago

after spending wayyyy too many hours, what ended up fixing this for me was changing the package.json main entrypoint

previously, I had

"main": "./src/App.tsx"

and once changing it to

"main": "src/App.tsx"

the build at least seems to have worked

szdziedzic commented 1 week ago

Hey, it's hard for me to reproduce it at the moment 🤔 Can you share a minimal reproducible example, please?

techied commented 1 week ago

I was experiencing this issue on expo 51.0.6. Updating to 51.0.8 solved this for me.

imranbarbhuiya commented 1 week ago

the issue got fixed tracked and fixed in expo repo https://github.com/expo/expo/issues/28890

szdziedzic commented 1 week ago

awesome, I'm closing then