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

strictVerify option is broken #8835

Open
t3chguy opened this issue Feb 3, 2025 · 2 comments
Open

strictVerify option is broken #8835

t3chguy opened this issue Feb 3, 2025 · 2 comments

Comments

@t3chguy
Copy link
Contributor

t3chguy commented Feb 3, 2025

It is of type boolean, states also that the default value is true.

If you provide true the signing breaks due to electron/osx-sign#344

And if you try to provide a string e.g. strictVerify: "all" and ignore the typescript error then the runtime schema validation fails.

• electron-builder  version=26.0.1 os=6.8.0-1020-azure
  • loaded configuration  file=/home/runner/work/element-desktop/element-desktop/electron-builder.ts
  ⨯ Invalid configuration object. electron-builder 26.0.1 has been initialized using a configuration object that does not match the API schema.
 - configuration.mac.strictVerify should be a boolean.
   -> Whether to let `@electron/osx-sign` verify the contents or not.
     How to fix:
     1. Open https://www.electron.build/mac
     2. Search the option name on the page (or type in into Search to find across the docs).
       * Not found? The option was deprecated or not exists (check spelling).
       * Found? Check that the option in the appropriate place. e.g. "title" only in the "dmg", not in the root.
  failedTask=build stackTrace=ValidationError: Invalid configuration object. electron-builder 26.0.1 has been initialized using a configuration object that does not match the API schema.
 - configuration.mac.strictVerify should be a boolean.
   -> Whether to let `@electron/osx-sign` verify the contents or not.
     How to fix:
     1. Open https://www.electron.build/mac
     2. Search the option name on the page (or type in into Search to find across the docs).
       * Not found? The option was deprecated or not exists (check spelling).
       * Found? Check that the option in the appropriate place. e.g. "title" only in the "dmg", not in the root.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              at validate (/home/runner/work/element-desktop/element-desktop/node_modules/@develar/schema-utils/dist/validate.js:86:11)
    at validateConfiguration (/home/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/util/config/config.ts:239:3)
    at Packager.validateConfig (/home/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/packager.ts:354:5)
    at Packager.build (/home/runner/work/element-desktop/element-desktop/node_modules/app-builder-lib/src/packager.ts:362:5)
    at executeFinally (/home/runner/work/element-desktop/element-desktop/node_modules/builder-util/src/promise.ts:12:[14](https://github.com/element-hq/element-desktop/actions/runs/13109836482/job/36571249455#step:9:15))
error Command failed with exit code 1.
@mmaietta
Copy link
Collaborator

mmaietta commented Feb 3, 2025

Let's see what happens in electron/osx-sign#344 as the default value of true should mean that you don't need to pass in strictVerify: true currently and can workaround the issue. To pass in a string, we'll need their type definitions updated.
https://github.com/electron/osx-sign/blob/757fa60716efd7310006153c55172fdcec46452a/src/types.ts#L175-L180

@t3chguy
Copy link
Contributor Author

t3chguy commented Feb 3, 2025

Sure, its just a safety thing of not relying on defaults and how they may change through breaking versions. Its good to be explicit with important things like code signing.

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

2 participants