Vue-cli-plugin-electron-builder: Error with Windows code signing when running on electronuserland/builder:wine Docker image

Created on 10 Apr 2020  路  3Comments  路  Source: nklayman/vue-cli-plugin-electron-builder

Describe the bug
Windows code signing fails on the electronuserland/builder:wine image due to improper curl version. I believe it is related to this issue, and could be fixed by upgrading electron-builder to v22.4.0 or above. When trying to build you get the following output:

/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /root/.cache/electron-builder/winCodeSign/winCodeSign-2.5.0/linux/osslsigncode)

To Reproduce
Steps to reproduce the behavior:

  1. Create a repo with windows code signing certificate (I am not going to provide an example for obvious reasons)
  2. Run vue-cli-service electron-build -w on the electronuserland/builder:wine docker image

Expected behavior
The expected behavior is for the command to successfully sign and build a windows installer.

Environment (please complete the following information):

  • electronuserland/builder:wine docker image
  • vue-cli-plugin-electron-builder version : 1.4.4
  • electron version: 5.0.10

Most helpful comment

You can either use the 2.0 beta version, or you can use yarn resolutions:

(package.json)

{
  "resolutions": {
    "vue-cli-plugin-electron-builder/electron-builder": "^22.2.0"
  }
}

v22.x of electron builder works fine with 1.x of the plugin, but since it has breaking changes I can't make upgrade it unless I make a major update to the plugin to keep semver compatibility.

All 3 comments

How to build electron app for multiple platform such as for linux and windows or all three platforms

Looks like the upcoming beta will be upgrading electron-builder to v22.x.x. In the meantime, I did find a workaround for this. Just need to remove libcurl4 and install libcurl3 and libcurl-openssl1.0-dev on the builder:wine image before attempting to build and sign the executable.

    - apt-get update
    - apt-get remove libcurl4 -y
    - apt-get install libcurl3 libcurl-openssl1.0-dev -y

You can either use the 2.0 beta version, or you can use yarn resolutions:

(package.json)

{
  "resolutions": {
    "vue-cli-plugin-electron-builder/electron-builder": "^22.2.0"
  }
}

v22.x of electron builder works fine with 1.x of the plugin, but since it has breaking changes I can't make upgrade it unless I make a major update to the plugin to keep semver compatibility.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iamazik picture iamazik  路  5Comments

getflourish picture getflourish  路  5Comments

nklayman picture nklayman  路  3Comments

fridzema picture fridzema  路  4Comments

HarlanGitHub picture HarlanGitHub  路  4Comments