Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jordmccord opened this issue May 15, 2024 · 17 comments
Closed

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

jordmccord opened this issue May 15, 2024 · 17 comments

Comments

@jordmccord
Copy link

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

@jordmccord jordmccord added the needs review Issue is ready to be reviewed by a maintainer label May 15, 2024
@12levoav
Copy link

@jordmccord
Copy link
Author

Managed to fix this by updating the EAS_LOCAL_BUILD_WORKINGDIR

@arvidnilber
Copy link

arvidnilber commented May 16, 2024

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
Copy link
Author

jordmccord commented May 16, 2024

@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
Copy link

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

@jimmyl02
Copy link

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
Copy link

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
Copy link

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
Copy link
Member

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

@szdziedzic szdziedzic added eas build needs more info and removed needs review Issue is ready to be reviewed by a maintainer labels May 20, 2024
@techied
Copy link

techied commented May 20, 2024

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

@imranbarbhuiya
Copy link

the issue got fixed tracked and fixed in expo repo expo/expo#28890

@szdziedzic
Copy link
Member

awesome, I'm closing then

@jordmccord
Copy link
Author

jordmccord commented Jun 13, 2024

This as of version 51.0.14 is not fixed. Removing the EAS_LOCAL_BUILD_WORKINGDIR results in the following error:

[PREPARE_ARTIFACTS] Preparing artifacts
[UPLOAD_APPLICATION_ARCHIVE] 
TypeError: Cannot read properties of undefined (reading 'c')
    at prepareArtifacts (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/eas-cli-local-build-plugin/dist/artifacts.js:25:29)
    at async BuildContext.uploadArtifact [as _uploadArtifact] (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/eas-cli-local-build-plugin/dist/ios.js:31:24)
    at async BuildContext.uploadArtifact (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/context.js:131:27)
    at async uploadApplicationArchive (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/utils/artifacts.js:97:5)
    at async /Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/builders/ios.js:127:9
    at async BuildContext.runBuildPhase (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/context.js:107:28)
    at async buildAsync (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/builders/ios.js:126:5)
    at async runBuilderWithHooksAsync (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
    at async Object.iosBuilder (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/builders/ios.js:33:16)
    at async buildIosAsync (/Users/runner/.npm/_npx/fc877ae864f0cd09/node_modules/eas-cli-local-build-plugin/dist/ios.js:41:12)

Build failed

See: https://github.com/utilitywarehouse/design-systems/actions/runs/9501407781/job/26186857991

@jordmccord
Copy link
Author

Also when running with EAS_LOCAL_BUILD_WORKINGDIR and a plugin in the app.config.js I'm getting the same error as @jimmyl02:

PluginError: Failed to resolve plugin for module "expo-xml-font" relative to "eas-build/build/apps/native-ui-storybook"
    at resolvePluginForModule (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:72:11)
    at resolveConfigPluginFunctionWithInfo (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:152:7)
    at resolveConfigPluginFunction (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:143:7)
    at withStaticPlugin (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js:87:70)
    at /Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/plugins/withPlugins.js:30:84
    at Array.reduce (<anonymous>)
    at withPlugins (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/plugins/withPlugins.js:30:18)
    at withConfigPlugins (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config/build/plugins/withConfigPlugins.js:36:47)
    at fillAndReturnConfig (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config/build/Config.js:218:78)
    at getConfig (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config/build/Config.js:270:12)

Build failed

@jordmccord
Copy link
Author

@szdziedzic can you reopen or start a new issue?

@majimaccho
Copy link

I'm still getting this
error: SHA-1 for file /var/folders/dm/88b38gj92jj53dgxdsm12qf00000gn/T/eas-build-local-nodejs/0b71ea85-1a88-4676-8c1c-b3ae9af43ae5/build/native/node_modules/expo/AppEntry.js (/var/folders/dm/88b38gj92jj53dgxdsm12qf00000gn/T/eas-build-local-nodejs/0b71ea85-1a88-4676-8c1c-b3ae9af43ae5/build/native/node_modules/expo/AppEntry.js) is not computed.

expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.5
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 18.20.3 - ~/hostedtoolcache/node/18.20.3/arm64/bin/node
      Yarn: 3.5.1 - ~/.yarn/bin/yarn
      npm: [10](https://github.com/micin-jp/sasanqua-ps/actions/runs/9511287724/job/26219300433#step:10:11).7.0 - ~/hostedtoolcache/node/18.20.3/arm64/bin/npm
    Managers:
      CocoaPods: 1.14.3 - /opt/homebrew/lib/ruby/gems/3.0.0/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
      Android SDK:
        API Levels: 33, 33, 33, 34, 34, 34
        Build Tools: 33.0.2, 33.0.3, 34.0.0
        Android NDK: 26.3.[11](https://github.com/micin-jp/sasanqua-ps/actions/runs/9511287724/job/26219300433#step:10:12)579264
    IDEs:
      Xcode: 15.3/15E204a - /usr/bin/xcodebuild
    Expo Workflow: managed

with expo 51.8

@pvinis
Copy link

pvinis commented Oct 22, 2024

Theres this nativewind/nativewind#1009 (comment) happening also, on expo 51.0.38, expo-updates 0.25.27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants