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

chore: Add details to entitlement option for macOS configurations #7097

Merged
merged 3 commits into from Aug 31, 2022
Merged

chore: Add details to entitlement option for macOS configurations #7097

merged 3 commits into from Aug 31, 2022

Conversation

AxelTerizaki
Copy link
Contributor

Added some details on what an entitlment.plist file should contain and why wrong entitlements can make a build crash.

Also updated links to the default entitlement.plist as the previous one was giving a 404 (it's been moved adn renamed). Not sure if I linked the right files though. Maybe adding a link to the whole entitlements folder instead would be more suitable, as it contains self-explanatory filenames for the different usecases ?

Thanks to @jeremyspiegel @mmaietta and @idanwork for helping pinpoint the issue.

Closes #7050

Added some details on what an entitlment.plist file should contain and why wrong entitlements can make a build crash.

Also updated links to the default entitlement.plist as the previous one was giving a 404 (it's been moved adn renamed). Not sure if I linked the right files though. Maybe adding a link to the whole `entitlements` [folder](https://github.com/electron/osx-sign/tree/main/entitlements) instead  would be more suitable, as it contains self-explanatory filenames for the different usecases ?

Thanks to @jeremyspiegel @mmaietta and @idanwork for helping pinpoint the issue.

Closes #7050
@changeset-bot
Copy link

changeset-bot bot commented Aug 27, 2022

🦋 Changeset detected

Latest commit: c22ae84

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Aug 27, 2022

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit c22ae84
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/630e3a86b4af7d000c38adf4
😎 Deploy Preview https://deploy-preview-7097--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@mmaietta mmaietta changed the title Add details to entitlement option for macOS configurations chore: Add details to entitlement option for macOS configurations Aug 28, 2022
@mmaietta
Copy link
Collaborator

Maybe adding a link to the whole entitlements folder instead would be more suitable, as it contains self-explanatory filenames for the different usecases ?

I'm in favor of this. Would you mind updating the PR to use that link? Then also regenerate all docs pnpm generate-all

@AxelTerizaki
Copy link
Contributor Author

Hello.

I tried to generate the docs by following your instructions as well as what's in CONTRIBUTING to setup the project, but generate-all seems to fail at some point when generating the docs:

C:\dev\electron-builder [patch-1 ≡ +2 ~1 -0 !]> pnpm generate-all

> @electron-builder/monorepo@ generate-all C:\dev\electron-builder
> pnpm generate-schema && pnpm generate-docs && pnpm prettier


> @electron-builder/monorepo@ generate-schema C:\dev\electron-builder
> typescript-json-schema packages/app-builder-lib/tsconfig-scheme.json Configuration --out packages/app-builder-lib/scheme.json --noExtraProps --useTypeOfKeyword --strictNullChecks --required && node ./scripts/fix-schema.js


> @electron-builder/monorepo@ generate-docs C:\dev\electron-builder
> pnpm compile && pnpm jsdoc && pnpm jsdoc2md2html


> @electron-builder/monorepo@ compile C:\dev\electron-builder
> tsc --build


> @electron-builder/monorepo@ jsdoc C:\dev\electron-builder
> ts2jsdoc packages/builder-util-runtime packages/builder-util packages/app-builder-lib packages/electron-builder packages/electron-publish packages/electron-updater packages/dmg-builder

Generating JSDoc to C:\dev\electron-builder\scripts\jsdoc\out\builder-util-runtime
Generating JSDoc to C:\dev\electron-builder\scripts\jsdoc\out\builder
Generating JSDoc to C:\dev\electron-builder\scripts\jsdoc\out\util
Generating JSDoc to C:\dev\electron-builder\scripts\jsdoc\out\publisher
exception evaluating "this.packager.config.dmg || Object.create(null)" for property options
Generating JSDoc to C:\dev\electron-builder\scripts\jsdoc\out\dmg-builder
exception evaluating "{ ...this.packager.platformSpecificBuildOptions, ...(this.packager.config as any)[this.name] }" for property options
exception evaluating "{
    ...this.packager.platformSpecificBuildOptions,
    ...(this.packager.config as any)[this.name],
  }" for property options
exception evaluating "{ ...this.packager.platformSpecificBuildOptions, ...(this.packager.config as any)[this.name] }" for property options
exception evaluating "{ ...this.packager.platformSpecificBuildOptions, ...(this.packager.config as any)[this.name] }" for property options
exception evaluating "{
    allowAnywhere: true,
    allowCurrentUserHome: true,
    allowRootDirectory: true,
    ...this.packager.config.pkg,
  }" for property options
Generating JSDoc to C:\dev\electron-builder\scripts\jsdoc\out\builder-lib
Generating JSDoc to C:\dev\electron-builder\scripts\jsdoc\out\updater
Error: ENOENT: no such file or directory, open 'C:\dev\electron-builder\scripts\jsdoc\out\builder-lib\app-builder-lib-out-asar\asar.js'
    at processImmediate (node:internal/timers:471:21)
From previous event:
    at transpilePaths (C:\dev\electron-builder\node_modules\.pnpm\ts-jsdoc@3.2.2_typescript@4.3.5\node_modules\ts-jsdoc\src\util.ts:15:26)
    at Object.transpile (C:\dev\electron-builder\node_modules\.pnpm\ts-jsdoc@3.2.2_typescript@4.3.5\node_modules\ts-jsdoc\src\util.ts:11:10)
    at Object.<anonymous> (C:\dev\electron-builder\node_modules\.pnpm\ts-jsdoc@3.2.2_typescript@4.3.5\node_modules\ts-jsdoc\src\ts2jsdoc.ts:9:1)
    at Module._compile (node:internal/modules/cjs/loader:1120:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
    at Module.load (node:internal/modules/cjs/loader:998:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47
 ELIFECYCLE  Command failed with exit code 4294967295.
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

Any help would be appreciated to complete this PR :)

@mmaietta
Copy link
Collaborator

Hmmm I just tried out your PR locally and generate-all worked fine. I'm on node 14.19.1

@AxelTerizaki
Copy link
Contributor Author

AxelTerizaki commented Aug 29, 2022

I was on node 18, but I downgraded using nvm to node 14 but I still get the same result.

Here's how I try to generate the docs :

c:
cd \dev
pushd electron-builder
pnpm install
pnpm generate-all

I tried several times after removing the various node_modules folders in the main repo and all packages, but to no avail.

So I'm not too sure of how to solve this to be able to push my PR properly now, since docs need to be generated somehow.

@mmaietta
Copy link
Collaborator

I'll just regenerate the docs on my side post-merge of this PR :)

@AxelTerizaki
Copy link
Contributor Author

Thank you :) No idea why it wouldn't generate on my end.

@mmaietta mmaietta merged commit e78a65c into electron-userland:master Aug 31, 2022
@github-actions github-actions bot mentioned this pull request Aug 31, 2022
@mmaietta
Copy link
Collaborator

mmaietta commented Sep 1, 2022

Merged and released

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

Successfully merging this pull request may close these issues.

Mac ARM64 app crashes on startup (sigtrap) while X64 works fine.
2 participants