Description
Pre-flight checklist
- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project uses.
- I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
7.2.0
Electron version
28.2.3
Operating system
macOS 14.3.1
Last known working Electron Forge version
No response
Expected behavior
I'd like the packagerConfig.quiet
to be default to true
, or at least to let me change it's value.
Actually it's "locked" by the following lines :
forge/packages/api/core/src/api/package.ts
Lines 305 to 317 in 3c5bf3d
(both lines 305 and 317 do force the value to false
after the custom user configuration).
Actual behavior
When trying to sign the app, I got issues that I could not debug without having to go deep into the code and console.log
things
I used both DEBUG=electron-osx-sign*
and DEBUG=electron-notarize*
, but I still struggled at some point (see below).
Steps to reproduce
I do not know if you can reproduce this, but I can show the deep dive I had to do (quick version).
For the record, with the same configuration, I had no issue on a mac "x64".
When trying to sign and notarize a mac app, when running yarn make
, I got the following output
[STARTED] Packaging for arm64 on darwin
[STARTED] Copying files
[SUCCESS] Copying files
[STARTED] Preparing native dependencies
[TITLE] Preparing native dependencies
[SUCCESS] Preparing native dependencies
[STARTED] Finalizing package
2024-03-17T20:11:59.644Z electron-osx-sign electron-osx-sign@1.0.5
2024-03-17T20:11:59.645Z electron-osx-sign `identity` passed in arguments.
2024-03-17T20:11:59.645Z electron-osx-sign Executing... security find-identity -v
[FAILED] Failed to codesign your application with code: 1
[FAILED]
[FAILED] Tiana Tables.app: code has no resources but signature indicates they must be present
[FAILED]
[FAILED]
By running with DEBUG=electron-osx-sign*
, the last log I got was Walking...
from https://github.com/electron/osx-sign/blob/97b1e13b9a6de43a5add8dccf609ac10a780b1e8/src/util.ts#L136
I tried adding a line just bellow and nothing was displayed.
I added a try / catch
, and then I got an issue displayed with EMFILE: too many open files
(but that's not the point of this issue).
By going up with this, I found that all error send in the signApp, will be throwned to the caller (as mentioned in the documentation).
I then went into the packager package, that does call signApp
here where there is a continueOnError
option
I tried to add this option into my osxSign
option, but TypeScript does throw with
Object literal may only specify known properties, and 'continueOnError' does not exist in type 'OsxSignOptions'.ts(2353)
I continue to dive as I did not saw neither the error, nor the warning message "Code sign failed; please retry manually"
In the warning function, we do nothing when the quiet
option is true : https://github.com/electron/packager/blob/d5cd2b7dcd8e85c1c1bdcdd3c4e77edc9ac729f2/src/common.ts#L30
I tried to set the quiet
option in my packagerConfig
object. TypeScript is OK with this, still no log.
As I said in the "Expected behavior" section, it's locked here
forge/packages/api/core/src/api/package.ts
Lines 305 to 317 in 3c5bf3d
Additional information
I would like your input about if this is intended, if I could open a PR that either allow "quiet" to be changed, or if "true" should be the default value (or both).
For the record, the quiet
option has been added in #8 by @malept 8 years ago.