TransWikia.com

electron-build fails with ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

Stack Overflow Asked on December 27, 2021

goal

I want to build an electron app ON a windows Machine for a Rasperry PI 4 running Raspbian32

configuration

"linux": {
        "target" : [
            {
                "target": "AppImage",
                "arch": ["armv7l"]
            }
        ]
    },

calling

"build-dist-lin": "webpack –mode production && electron-builder -l –config .env.json",

returned ERROR

cannot get, wait error=Get
"https://service.electron.build/find-build-agent?no-cache=1ghlrte":
dial tcp 51.15.76.176:443: connectex: A connection attempt failed
because the connected party did not properly respond after a period of
time, or established connection failed because connected host has
failed to respond.
attempt=0
waitTime=2
Error: C:ARepotestnode_modulesapp-builder-binwinx64app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

No Leads

There is no further information in this log to know where then … it goes wrong. In the same env.json I also have a Windows Configuration part which runs perfectly well with calling it with -w. So that means that the configuration is probably ok. And that means it fails somewhere else.

full log:

 0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\A\Tools\nodejs\node.exe',
1 verbose cli   'C:\A\Tools\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build-dist-lin'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild-dist-lin', 'build-dist-lin', 'postbuild-dist-lin' ]
5 info lifecycle [email protected]~prebuild-dist-lin: [email protected]
6 info lifecycle [email protected]~build-dist-lin: [email protected]
7 verbose lifecycle [email protected]~build-dist-lin: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build-dist-lin: PATH: C:AToolsnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:ARepotestingtestplayernode_modules.bin;C:Python27;C:Python27Scripts;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:WINDOWSSystem32OpenSSH;C:atoolsnodejs;C:ProgramDatachocolateybin;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:Program FilesMicrosoft SQL ServerClient SDKODBC170ToolsBinn;C:Program Files (x86)Microsoft SQL Server150DTSBinn;C:Program FilesMicrosoft SQL Server150DTSBinn;C:Program Files (x86)Microsoft SQL Server150ToolsBinn;C:Program FilesMicrosoft SQL Server150ToolsBinn;C:Program Filesdotnet;C:atoolsGitcmd;C:Usersedward.deleauAppDataLocalMicrosoftWindowsApps;C:atoolsMicrosoft VS Codebin;C:Usersedward.deleauAppDataRoamingnpm;C:Usersedward.deleau.dotnettools;C:Usersedward.deleau.dotnettools
9 verbose lifecycle [email protected]~build-dist-lin: CWD: C:ARepotestingtestplayer
10 silly lifecycle [email protected]~build-dist-lin: Args: [
10 silly lifecycle   '/d /s /c',
10 silly lifecycle   'webpack --mode production && electron-builder -l --config .env.json'
10 silly lifecycle ]
11 silly lifecycle [email protected]~build-dist-lin: Returned: code: 1  signal: null
12 info lifecycle [email protected]~build-dist-lin: Failed to exec build-dist-lin script
13 verbose stack Error: [email protected] build-dist-lin: `webpack --mode production && electron-builder -l --config .env.json`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:AToolsnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:311:20)
13 verbose stack     at ChildProcess.<anonymous> (C:AToolsnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:311:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:ARepotestingtestplayer
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\A\Tools\nodejs\node.exe" "C:\A\Tools\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build-dist-lin"
18 verbose node v12.16.1
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build-dist-lin: `webpack --mode production && electron-builder -l --config .env.json`
22 error Exit status 1
23 error Failed at the [email protected] build-dist-lin script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

2 Answers

Unfortunately it doesn't seem that such issue will be fixed anytime soon, as we can see from the amount of (mostly open) GitHub issues that have been opened from users that are trying to deal with such problem in the past months:

That said, I used the following workarond using Docker that made me able to build a Linux redistributable .deb package for my Electron App from Windows 10 in less than 5 minutes:

docker pull electronuserland/builder

  • From the Electron project's root folder (such as C:MyApp), type the following command-line command to run the container and map the Electron project's root folder to the /project virtual path:

docker run -rm -ti -v C:MyApp:/project -w /project electronuserland/builder

  • From inside the container, type the following commands to upgrade the Electron project's Yarn packages, globally install the electron-builder package and build the Linux redistributable package:

cd /project

yarn upgrade

yarn global add electron-builder

electron-builder -l

If everything went smooth, you should be able to locate your MyApp.deb file (or rpm, AppImage, or anything you've configured within the electron-builder's package.json file) inside the Electron project's /dist/ folder.

For further info about this whole procedure and a bit of background, check out this post on my blog.

Answered by Darkseal on December 27, 2021

Seems to be an issue with the electron builder. Since the free service host associated with the electron builder is unavailable and there by it refuses the connection. You could monitor the issue thread from the below link. This issue has been watched along for a long time I believe.

https://github.com/electron-userland/electron-builder/issues/3569

Answered by Outlooker on December 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP