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

The version of Xcode downloaded by e load-xcode produces a "damaged and can't be opened" popup #514

Open
NoelTautges opened this issue Aug 31, 2023 · 3 comments

Comments

@NoelTautges
Copy link

Operating System

macOS 13.5.1, arm64

To Reproduce

This is only a problem on macOS 10.15 (Catalina) or higher because that's when the notarization requirement was introduced.

  1. Run e load-xcode.
  2. Provided you already have a config set, run e sync.

Expected Behavior

The source code is downloaded.

Actual Behavior

The following is logged, along with 2 '"Xcode-14.3.0.app" is damaged and can't be opened. You should move it to the trash.' popups, one per invocation of git:

Running "gclient sync --with_branch_heads --with_tags -vv" in /Users/ntautges/electron/src
Updating depot_tools...
git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
git: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
depot_tools update failed. Couldn't fetch main branch.
Retry later or reclone depot_tools
git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
git: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
ERROR Error: spawnSync /bin/sh ENOENT
    at Object.spawnSync (node:internal/child_process:1110:20)
    at spawnSync (node:child_process:871:24)
    at Object.execSync (node:child_process:952:15)
    at setRemotes (/Users/ntautges/.electron_build_tools/src/e-sync.js:29:8)
    at runGClientSync (/Users/ntautges/.electron_build_tools/src/e-sync.js:62:5)
    at Command.<anonymous> (/Users/ntautges/.electron_build_tools/src/e-sync.js:77:7)
    at Command.listener [as _actionHandler] (/Users/ntautges/.electron_build_tools/node_modules/commander/lib/command.js:480:17)
    at /Users/ntautges/.electron_build_tools/node_modules/commander/lib/command.js:1234:65
    at Command._chainOrCall (/Users/ntautges/.electron_build_tools/node_modules/commander/lib/command.js:1151:12)
    at Command._parseCommand (/Users/ntautges/.electron_build_tools/node_modules/commander/lib/command.js:1234:27)

Screenshots

xcode is damaged

Additional Information

The developer tools can be manually authorized by going to Settings > Privacy & Security > '"Xcode-14.3.0.app was blocked from use because it is not from an identified developer.' > Open Anyway > Open. Rerunning the command makes everything work.

This might be able to be solved by renotarizing the stripped-down version of Xcode (if possible, I don't have experience with the process) or informing the user of a workaround, maybe running an executable a couple times just so they can manually authorize it?

Thank you for your work on this project.

@devm33
Copy link

devm33 commented Sep 5, 2023

Or if there is a way to point to the locally installed /Applications/Xcode.app that could resolve here as well?

(I'm hitting the same issue, thank you for the work around @NoelTautges 🎉 )

@dsanders11
Copy link
Member

dsanders11 commented Nov 7, 2023

See the screenshot in #494. We should improve our documentation now that this is more prevalent, but that is the correct solution.

@Sajjon
Copy link

Sajjon commented Aug 20, 2024

I got this too, for Xcode 15.0. Which is old btw. Electron Build Tools ought to update its Xcode releases list more often.

Furthermore I recommend using sha1 checksum then you can leverage xcodereleases projects checksums, see xcodereleases.com.

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

No branches or pull requests

4 participants