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

Local build TypeError: Cannot read properties of undefined (reading 'c') #2430

Closed
jordmccord opened this issue Jun 14, 2024 · 9 comments
Closed
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@jordmccord
Copy link

jordmccord commented Jun 14, 2024

Build/Submit details page URL

No response

Summary

When running a local build, and the build is complete, the [UPLOAD_APPLICATION_ARCHIVE] step starts. At this point, the following error occurs: Cannot read properties of undefined (reading 'c').

Managed or bare?

Managed

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.5
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v18.17.0/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
    npmGlobalPackages:
      eas-cli: 10.0.0
    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 for issues with metro config
✔ Check npm/ yarn versions
✔ 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] › Build Succeeded
[UPLOAD_APPLICATION_ARCHIVE] Application archives:
[UPLOAD_APPLICATION_ARCHIVE]   - /var/folders/4v/vsbt5f350nb4g9vj2q3yk5xm0000gp/T/eas-build-local-nodejs/f99f70fc-3930-4883-99b9-9a71ad987a2a/build/apps/native-ui-storybook/ios/build/Build/Products/Release-iphonesimulator/NativeUI.app (640 B)
[UPLOAD_APPLICATION_ARCHIVE] Uploading application archive...
[PREPARE_ARTIFACTS] Preparing artifacts
[UPLOAD_APPLICATION_ARCHIVE]
TypeError: Cannot read properties of undefined (reading 'c')
    at prepareArtifacts (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/eas-cli-local-build-plugin/dist/artifacts.js:25:29)
    at async BuildContext.uploadArtifact [as _uploadArtifact] (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/eas-cli-local-build-plugin/dist/ios.js:31:24)
    at async BuildContext.uploadArtifact (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/context.js:131:27)
    at async uploadApplicationArchive (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/utils/artifacts.js:97:5)
    at async /Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/builders/ios.js:127:9
    at async BuildContext.runBuildPhase (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/context.js:107:28)
    at async buildAsync (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/builders/ios.js:126:5)
    at async runBuilderWithHooksAsync (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
    at async Object.iosBuilder (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/build-tools/dist/builders/ios.js:33:16)
    at async buildIosAsync (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/eas-cli-local-build-plugin/dist/ios.js:41:12)

Build failed
Unknown error. See logs of the Upload application archive build phase for more information.
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:290:12)
    at async prepareAndStartBuildAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:276: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: 45531,
  output: [ '', '' ],
  stdout: '',
  stderr: '',
  status: 1,
  signal: null
}
    Error: build command failed.
 ELIFECYCLE  Command failed with exit code 1.

Reproducible demo or steps to reproduce from a blank project

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

Preview build:

preview": {
  "cache": {
    "paths": ["./ios/Podfile.lock"]
  },
  "env": {
    "STORYBOOK_ENABLED": "true"
  },
  "ios": {
    "simulator": true
  },
  "android": {
    "buildType": "apk"
  }
},

See the full output of the build: https://github.com/utilitywarehouse/design-systems/actions/runs/9501407781/job/26186857991

@jordmccord jordmccord added the needs review Issue is ready to be reviewed by a maintainer label Jun 14, 2024
@jordmccord
Copy link
Author

Reverting to cli version 9.2.0 fixes the issue

@Hantex9
Copy link

Hantex9 commented Jun 14, 2024

I’m facing the same error. As @jordmccord mentioned, reverting to CLI version 9.2.0 resolves the issue.

@frankfuu
Copy link

So for those who are new this would be

then make sure eas.json doesn't have the version 10 constraint so set it to something like

"cli" :{
"version": ">= 9.2.0"
}

@Nantris
Copy link

Nantris commented Jun 16, 2024

Same issue.

EAS 10.0.0 - Node 20.12.0

@dr-zr
Copy link

dr-zr commented Jun 17, 2024

Same issue

@szdziedzic
Copy link
Member

Hi,

I can't replicate the issue on my device so far. We recently bumped a bunch of dependencies and I suspect that it might be somehow connected with caching 🤔

@jordmccord can you try to change
https://github.com/utilitywarehouse/design-systems/blob/main/.github/workflows/previews.yml#L157-L161 to

- name: 🏗 Setup EAS
        uses: expo/expo-github-action@v8
        with:
          eas-version: '9.2.0'
          token: ${{ secrets.EXPO_TOKEN }}
          eas-cache: false

and check if it helps?

@szdziedzic
Copy link
Member

szdziedzic commented Jun 17, 2024

Ok I think I figured out what the issue is: expo/eas-build#418

This PR should fix the issue

@szdziedzic
Copy link
Member

The issue should be fixed in 10.0.1

@JohnGeorgiadis
Copy link

Same issue with 10.0.0 once 10.0.1 is out I will give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

7 participants