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

Windows build: create_dist --build_omaha fails without certain env. vars #21528

Closed
mherrmann opened this issue Mar 8, 2022 · 0 comments · Fixed by brave/brave-core#12557
Closed

Comments

@mherrmann
Copy link

Description

Omaha is used for Brave's auto-update functionality on Windows. It's included as a dependency in brave-core's DEPS file. One step of Brave's build process on Windows is the command:

npm run create_dist -- Static --channel=nightly --skip_signing --target_arch=x64 --build_omaha --tag_ap=x64-ni --use_goma

Unless environment variables KEY_PFX_PATH and AUTHENTICODE_PASSWORD are set, this fails with the following error:

"C:\Go-1.14.6-amd64/bin/go.exe" run C:\Users\micha\dev\brave-browser\src\brave\vendor\omaha\omaha/../common/certificate_tag/certificate_tag.go -set-superfluous-cert-tag=Gact2.0Omaha -padded-length=8206 -out scons-out\opt-win\obj\installers\BraveUpdateSetup.exe scons-out\opt-win\obj\installers\authenticode_BraveUpdateSetup.exe
Could not parse input as either PE32 or MSI:
PE32: authenticodetag: error parsing headers: file does not have certificate data
MSI: msi file is not an msi file: either the header signature is missing or the clsid is not zero as required
exit status 1
scons: *** [scons-out\opt-win\obj\installers\BraveUpdateSetup.exe] Error 1
scons: building terminated because of errors.
Error in hammer.bat:96.

At the same time, the environment variables should not be required because Omaha contains test certificates that can be used if no other certificate is supplied.

Steps to Reproduce

Execute the following build commands on Windows without the environment variables KEY_PFX_PATH and AUTHENTICODE_PASSWORD:

  1. npm run build -- Static --channel=nightly --skip_signing --target_arch=x64 --use_goma
  2. npm run create_dist -- Static --channel=nightly --skip_signing --target_arch=x64 --build_omaha --tag_ap=x64-ni --use_goma

Actual result:

The error above is shown in the build output.

Expected result:

No error should be shown in the build output.

Reproduces how often:

Always.

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