electron-builder: Unable to sign NSIS
- Electron-Builder Version: 24.11.0
- Node Version: 19.8.2
- Electron Version: 28.1.4
- Electron Type (current, beta, nightly): current
- Target: nsis (x64)
I am tryingg to build our Windows app in Docker, however I am always getting the following signing error:
⨯ Exit code: 255. Command failed: /root/.cache/electron-builder/winCodeSign/winCodeSign-2.6.0/linux/osslsigncode -in **REDACTED**E.exe -out **REDACTED**-signed-sha256.exe -t http://timestamp.digicert.com -pkcs12 ./build/**REDACTED**.p12 -h sha256 -n **REDACTED** -i **REDACTED** -nest -pass **REDACTED** (sha256 hash) to extract existing signature in -nest mode
We are using gitlab, here is the part ofthe .gitlab.yml
Windows:
stage: build
tags:
- docker
image: electronuserland/builder:wine
script:
- yarn
- yarn run gsf:download --secretId 6 -o apps/raptor-electron # downloads the electron-builder.env
- yarn workspace @**REDACTED**/raptor-electron run compile -w # Here it stops with the exception
- mv 'apps/raptor-electron/dist/**REDACTED**.exe' './'
- mv 'apps/raptor-electron/dist/**REDACTED**.exe.blockmap' './'
- yarn workspace @**REDACTED**/raptor-electron run compile:appx
- mv 'apps/raptor-electron/dist/**REDACTED**.appxbundle' './'
artifacts:
paths:
- **REDACTED**.exe
- **REDACTED**.exe.blockmap
- **REDACTED**.appxbundle
rules:
- if: $NIGHTLY =~ /raptor/
when: on_success
- changes:
- apps/raptor/**/*
- apps/raptor-electron/**/*
when: on_success
I first thought that the password of the Certificate file is wrong, but it is verified and correct. We are using the electron-builder.env file in the projects root directory which is downloaded by the build script. As a key for the Certificate File I am using WIN_CSC_KEY_PASSWORD
The job is executed on a Debian Machine
About this issue
- Original URL
- State: open
- Created 6 months ago
- Comments: 36 (11 by maintainers)
Bingo, I think I can investigate further from here. But maybe a minimum reproducible repo would also help as the unit tests are super complex and a vanilla repo would probably really help here. Would you be willing to put one together?
https://github.com/electron-userland/electron-builder/actions/runs/7729511593/job/21072858970?pr=8023
@Slapbox I didn’t further investigate this as i currently have to prioritize other things at work.
Tho I’d definitely like to help investigate this if someone needs information.
Fixed in v24.13.3 Apologies for any frustrations this caused and thanks for your patience!
It doesn’t appear that changing the config there is respected…
I used a modified version that prints the values:
@Slapbox I will try to verify it by changing
electronuserland/builder:winetoelectronuserland/builder:18-wineRegarding the
electron-builder.envIt obviously doesn’t look exactly like this, I do have the following keys defined
WIN_CSC_KEY_PASSWORD,APPLE_API_KEY,APPLE_API_KEY_ID,APPLE_API_KEY_ISSUER, we use a.p12format, as we did in our currently running project.The currently running project uses a very old version
electron-builderand is build on a macMini with Paralels Desktop.Can you give this
sign.jsscript forwin.signconfig as a test of my current assumption?I think what
isNestis doing is that it’s appending to file signatures, which don’t seem to exist within a docker image? DisablingisNextI think will bypass this and only update/create a signature