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.

Signing error on docker with WSL 2 engine

See original GitHub issue
  • Version: 22.8.0
  • Electron Version: 8.1.1
  • Electron Type (current, beta, nightly): current
  • Target: nsis
  • Docker-Image: electronuserland/builder:wine

I changed the windows docker engine from Hyper-V to WSL 2, an error occurred when signing the exe. With Hyper-V it works correctly. Because of the engine on WSL 2 the microsoft-standard os is used with Hyper-V the linuxkit. WSL 2 Engine:

• electron-builder  version=22.8.0 os=4.19.104-microsoft-standard
• loaded configuration  file=package.json ("build" field)
• public/electron.js not found. Please see https://medium.com/@kitze/%EF%B8%8F-from-react-to-an-electron-app-ready-for-production-a0468ecb1da3
• loaded parent configuration  preset=react-cra
• packaging       platform=win32 arch=x64 electron=8.1.1 appOutDir=release/win-unpacked
• downloading     url=https://github.com/electron/electron/releases/download/v8.1.1/electron-v8.1.1-win32-x64.zipsize=71 MB parts=8
• downloaded      url=https://github.com/electron/electron/releases/download/v8.1.1/electron-v8.1.1-win32-x64.zipduration=9.932s
• downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7zsize=5.6 MB parts=1
• downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7zduration=7.353s

⨯ cannot execute  cause=exit status 1
command=/root/.cache/electron-builder/winCodeSign/winCodeSign-2.6.0/rcedit-x64.exe '/usr/src/app/release/win-unpacked/<EXE_NAME>.exe' --set-version-string FileDescription '<EXE_NAME>' --set-version-string ProductName '<EXE_NAME>' --set-version-string LegalCopyright '<Copyright>' --set-file-version 1.0.5 --set-product-version 1.0.5.0 --set-version-string InternalName '<EXE_NAME>' --set-version-string OriginalFilename '' --set-version-string CompanyName '<COMPANY_NAME>' --set-icon /usr/src/app/assets/icon.ico
workingDir=
• Above command failed, retrying 3 more times

Hyper-V Engine:

• electron-builder  version=22.8.0 os=4.19.76-linuxkit
• loaded configuration  file=package.json ("build" field)
• public/electron.js not found. Please see https://medium.com/@kitze/%EF%B8%8F-from-react-to-an-electron-app-ready-for-production-a0468ecb1da3
• loaded parent configuration  preset=react-cra
• packaging       platform=win32 arch=x64 electron=8.1.1 appOutDir=release/win-unpacked
• downloading     url=https://github.com/electron/electron/releases/download/v8.1.1/electron-v8.1.1-win32-x64.zipsize=71 MB parts=4
• downloaded      url=https://github.com/electron/electron/releases/download/v8.1.1/electron-v8.1.1-win32-x64.zipduration=17.446s
• downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7zsize=5.6 MB parts=1
• downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7zduration=6.271s
• signing         file=release/win-unpacked/<EXE_NAME>.exe certificateFile=/usr/src/app/csc/<CODE_FILE>
• signing         file=release/win-unpacked/resources/app.asar.unpacked/node_modules/node-notifier/vendor/snoreToast/SnoreToast.exe certificateFile=/usr/src/app/csc/<CODE_FILE>
• signing         file=release/win-unpacked/resources/app.asar.unpacked/node_modules/node-notifier/vendor/notifu/notifu.exe certificateFile=/usr/src/app/csc/<CODE_FILE>
• signing         file=release/win-unpacked/resources/app.asar.unpacked/node_modules/node-notifier/vendor/notifu/notifu64.exe certificateFile=/usr/src/app/csc/<CODE_FILE>
• building        target=nsis file=release/<EXE_NAME> Setup 1.0.5.exe archs=x64 oneClick=true perMachine=false
• downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7zsize=1.3 MB parts=1
• downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7zduration=2.892s
• signing         file=release/win-unpacked/resources/elevate.exe certificateFile=/usr/src/app/csc/<CODE_FILE>
• downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7zsize=731 kB parts=1
• downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7zduration=2.593s
•   Signing NSIS uninstaller  file=release/__uninstaller-nsis-<EXE_NAME>.exe certificateFile=/usr/src/app/csc/<CODE_FILE>
• signing         file=release/<EXE_NAME> Setup 1.0.5.exe certificateFile=/usr/src/app/csc/<CODE_FILE>
• building block map  blockMapFile=release/<EXE_NAME> Setup 1.0.5.exe.blockmap

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:29 (6 by maintainers)

github_iconTop GitHub Comments

9reactions
KomTak001commented, Nov 13, 2020

I have the same issue with WSL2 and docker(electronuserland/builder:wine)

The execution point via wine mentioned below seemed to be suspicious, so I lowered the version of electron-builder to v21.0.10 and executed the build and it succeeded.

https://github.com/electron-userland/electron-builder/issues/5185#issuecomment-670040150

2reactions
jonathanpelcommented, Apr 7, 2021

I tested the patch and it fixed the problem for me on WSL2. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker Desktop WSL 2 backend on Windows
When Docker Desktop starts, go to Settings > Resources > WSL Integration. The Docker-WSL integration will be enabled on your default WSL distribution....
Read more >
Docker not starting on Windows 11 with WSL 2 - Stack Overflow
I downloaded Docker Desktop, and when I tried to follow the quick start guide, I got the following error: docker: error during connect:...
Read more >
Developers - Signing error on docker with WSL 2 engine -
I changed the windows docker engine from Hyper-V to WSL 2, an error occurred when signing the exe. With Hyper-V it works correctly....
Read more >
Installing Docker Desktop for Windows and WSL 2
In this post I show how to install Docker Desktop for Windows, including WSL 2, and explore the initial experience of running a...
Read more >
Docker WSL 2 installation is incomplete - Super User
By default, in Settings > General the option "Use the WSL 2 based engine" was already selected. This might be due to me...
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