question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Building applications with electron-packager results in an error

See original GitHub issue

Context

  • Electron version: v1.8.7-hpcp-vmp1010
  • Operating system: MacOS High Sierra
  • Node version: v6.13
  • electron-packager 12.0.1 to build the Mac application (I see electron-release is using "^3.0.1")
  • electron-winstaller to build the Win application

Questions

  1. Do I need to build the unsigned version of my application with castlabs/electron-releases?
  2. Can I build the unsigned version of my app with electron/electron and then sign it using the script provided by castlabs/electron-releases?
  3. What is the recommended way to build the unsigned versions of the app? Or documentation regarding it?

What I have tried

  • I tried building with electron: "1.8.7", but then when I run your python script, it completes without an error and without creating signed applications
  • When I try to build the unsigned applications with v1.8.7-hpcp-vmp1010, electron-packager fails with an error because it creates the wrong url Downloading tmp-13310-0-electron-v1.8.7-hdcp-vmp1010-win32-x64.zip Error: GET https://github.com/electron/electron/releases/download/v1.8.7-hdcp-vmp1010/electron-v1.8.7-hdcp-vmp1010-win32-x64.zip returned 404. This is obviously the wrong url.
  • I am debugging into electron-packager, but I thought I would ask in parallel to doing that EDIT:
  • Ah, get baseUrl () { return process.env.NPM_CONFIG_ELECTRON_MIRROR || process.env.npm_config_electron_mirror || process.env.ELECTRON_MIRROR || this.opts.mirror || 'https://github.com/electron/electron/releases/download/v' }, environment variables to change where the download comes from.

Updates

  • Got the app building with "electron": "https://github.com/castlabs/electron-releases#v1.8.7-hdcp-vmp1010" with electron-packager by setting one of those environment variables (export NPM_CONFIG_ELECTRON_MIRROR=https://github.com/castlabs/electron-releases/releases/download/v
  • the signing only works for the Window .exes because electron-packager chose to download https://github.com/castlabs/electron-releases/releases/download/v1.8.7-hdcp-vmp1010/electron-v1.8.7-hdcp-vmp1010-win32-ia32.zip' and not the darwin one, so now I am debugging that
  • the signing creates a .sig file, which I assume is going to get picked up by Widevine in the application by the .sig being in the same folder as the .exe, is that correct?
  • Writing this all here to help future engineers

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
khwaajcommented, Jun 29, 2018

Great news!

The way things stand we will not release a 2.x version, but will jump directly to 3.x to be able to use some updates available in later versions of Chromium.

1reaction
khwaajcommented, Jun 29, 2018

Happy to be of help. The re-sign script works with either DER or PEM formatted files, for both the key and certificate, but if you want to convert them you can certainly use openssl to do it, like you suggest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error after packaging the app with electron-packager
First, as others stated, the version of electron that you have might be newer than the one referenced in your build command. Locate...
Read more >
Packaging darwin build on Windows results in blocked folder ...
I just have a problem with building for Mac on Windows. I use this line of code: D:\work\www\droplet>electron-packager ./ Droplet --platform=darwin ...
Read more >
A Comprehensive Guide to Building and Packaging an ...
Building and Packaging an Electron App wasn't as straight forward as I had hoped. This guide aims to help you navigate the complexities...
Read more >
How to use the electron-builder.build function in ... - Snyk
electronPackage ), { encoding: "utf-8" }); // Build! try { yield builder.build(options.packagerConfig); } catch (e) { console.log("Publish error", ...
Read more >
Common Configuration - electron-builder
in the package.json file of your project using the build key on the top level: "build": { "appId": "com.example.app" } · or through...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found