electron-builder: Unable to build on windows with 22.10.5
-
Version: 22.10.5
-
Electron Version: 11.1.1
-
Electron Type (current, beta, nightly): current
-
Target: windows
Building on an Azure DevOps build server. I have 2 builds and the only difference between a working and an non-working is the electron-builder version and that its a Windows target. The macos target builds fine.
working: electron-builder 22.9.1 not working: 22.10.5
here are the outputs. I’ll truncate the stacktrace as it doesn’t really have any value being repetative.
WORKING
D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand>npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=11.1.1
• electron-builder version=22.9.1 os=10.0.17763
• artifacts will be published if draft release exists reason=CI detected
• loaded configuration file=D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand\bin\electron-builder.json
• description is missed in the package.json appPackageFile=D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand\package.json
• packaging platform=win32 arch=x64 electron=11.1.1 appOutDir=D:\a\1\s\dist\win-unpacked
• downloading url=https://github.com/electron/electron/releases/download/v11.1.1/electron-v11.1.1-win32-x64.zip size=78 MB parts=8
• downloaded url=https://github.com/electron/electron/releases/download/v11.1.1/electron-v11.1.1-win32-x64.zip duration=3.946s
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=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.7z duration=567ms
• building target=nsis file=D:\a\1\s\dist\stackify-prefix.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.7z size=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.7z duration=352ms
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z size=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.7z duration=405ms
• building block map blockMapFile=D:\a\1\s\dist\stackify-prefix.exe.blockmap
⨯ GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand>
... done
NOT WORKING
D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand>npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=11.1.1
• electron-builder version=22.10.5 os=10.0.17763
• artifacts will be published if draft release exists reason=CI detected
• loaded configuration file=D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand\bin\electron-builder.json
• description is missed in the package.json appPackageFile=D:\a\1\s\src\Prefix-App\obj\desktop\-encodedCommand\package.json
• packaging platform=win32 arch=x64 electron=11.1.1 appOutDir=D:\a\1\s\dist\win-unpacked
• Unpacking electron zip zipPath=undefined
• downloading url=https://github.com/electron/electron/releases/download/v11.1.1/electron-v11.1.1-win32-x64.zip size=78 MB parts=4
• downloaded url=https://github.com/electron/electron/releases/download/v11.1.1/electron-v11.1.1-win32-x64.zip duration=1.812s
⨯ editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening. stackTrace=
Error: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
at new Errlop (C:\npm\prefix\node_modules\electron-builder\node_modules\errlop\edition-es5\index.js:61:18)
at Object.errtion (C:\npm\prefix\node_modules\electron-builder\node_modules\editions\edition-es5\util.js:23:14)
at determineEdition (C:\npm\prefix\node_modules\electron-builder\node_modules\editions\edition-es5\index.js:317:21)
at solicitEdition (C:\npm\prefix\node_modules\electron-builder\node_modules\editions\edition-es5\index.js:350:16)
at Object.requirePackage (C:\npm\prefix\node_modules\electron-builder\node_modules\editions\edition-es5\index.js:364:9)
at Object.<anonymous> (C:\npm\prefix\node_modules\electron-builder\node_modules\istextorbinary\index.cjs:4:38)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\npm\prefix\node_modules\electron-builder\node_modules\app-builder-lib\electron-osx-sign\util.js:135:22)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
↳ Error: editions-autoloader-none-suitable: Unable to determine a suitable edition, as none were suitable.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 13
- Comments: 37 (2 by maintainers)
Commits related to this issue
- Downgrade electron-builder The Linux version does not build with the current version 22.10.5. It could be related to electron-builder issue #5668 https://github.com/electron-userland/electron-builder... — committed to c3er/mdview by c3er 3 years ago
- waiting for electron-build fix see https://github.com/electron-userland/electron-builder/issues/5668 — committed to MagiusCHE/gamedek by MagiusCHE 3 years ago
- `istextorbinary` throws some weird errors on various build environments. Reverting back to previous usage of `isbinaryfile`, but retaining the signing logic flow (#5668) — committed to mmaietta/electron-builder by mmaietta 3 years ago
- fix: build fails with istextorbinary error stacktrace (#5668) (#5851) `istextorbinary` throws some weird errors on various build environments. Reverting back to previous usage of `isbinaryfile`, but ... — committed to electron-userland/electron-builder by mmaietta 3 years ago
- Downgrade electron-builder until bug is resolved See: https://github.com/electron-userland/electron-builder/issues/5668 — committed to isle-project/isle-editor by Planeshifter 3 years ago
- Bump electron-builder Summary: `yarn build --mac` started failing with errors. This fixes it. Probable root cause: https://github.com/electron-userland/electron-builder/issues/5668 Reviewed By: aigo... — committed to facebook/flipper by mweststrate 3 years ago
- build: update electron-builder CI seemed to be running into https://github.com/electron-userland/electron-builder/issues/5668, likely due to the github CI images being updated to node 16. We can eit... — committed to athensresearch/athens by filipesilva 3 years ago
- Downgrade electron-builder The Linux version does not build with the current version 22.10.5. It could be related to electron-builder issue #5668 https://github.com/electron-userland/electron-builder... — committed to luxuereal/md_viewer_electron by deleted user 3 years ago
- Downgrade electron-builder The Linux version does not build with the current version 22.10.5. It could be related to electron-builder issue #5668 https://github.com/electron-userland/electron-builder... — committed to luxuereal/md_viewer_electron by luxuereal 3 years ago
for all having this issue right now, downgrade your nodeJS to anything below 16.0 or downgrading electron-builder to 22.10.4 might fix it as well, not sure
Thankfully this was fixed for me after downgrading NodeJS from 16.0.0 to 15.14.0.
FWIW my issue was fixed by upgrading from Node 13.8.0 to 15.12.0.
I have same issue when packing on
electronuserland/builder:winedocker image with electron 12.0.1 and electron-builder 22.10.5. Downgrading electron-builder version to 22.10.4 resolved issue.Stack trace when build failed is following.
Looks like this was fixed in 22.11.4 and a regression appeared in 22.11.5 that recreated the issue.
I ran the experiment I mentioned in my previous post and the build appears to work properly with 22.11.7 on Mac OS 10.15.7, Node 16.1, and an Intel processor. So if you’re seeing problems you probably need to first update all the related tools and then if still having trouble provide more details (and given the developer’s choice not to re-open this issue file a new one with the details needed to reproduce the problem).
This sucks, electron-builder breaks all the time and node-abi is always out of date.
Should be fixed in 22.11.4
On macOS: if you’re running
zshopen Terminal and typevim ~/.zshrcpress<enter>Next press
ito insert and add the following line to the top of the file:export PATH="$PATH:/usr/local/bin"Then press
escand type:wq!and press<enter>Close this Terminal window and open a new Terminal and re-run your command.
@quinton-ashley Can you do better? Theses packages depends on A LOT of stuff and we are very lucky to have this team. Please be constructive on repos you don’t own.
It doesn’t seem like there’s any open issue tracking the new regression here… Should this be reopened, or should a new issue be filed?
It seems this issue really related to Node 16, we have it on Windows, Mac and Linux build in Github Actions. Get the same weird error “Unable to determine a suitable edition, even after broadening” (even with electron-builder changed to 22.10.4. https://github.com/ever-co/ever-gauzy/runs/2474464184)
So maybe @danatcofo can rename the issue title to include “Node 16 build issues” 😦
Update: switch to Node 15.4 helps right away (https://github.com/ever-co/ever-gauzy/actions/runs/799093744)
Also having this issue on M1 mac mini and node 16. downgrading electron-builder to 22.10.4 fixes the issue.
Tested working on windows with node 16
Same issue on a Mac here. Running Big Sur 11.31.
Downgrading from v16 to 15.14.0 did the trick.
For those wondering how to downgrade:
npm install -g nn 15.14.0(might need to run with sudo)
Same issue on MacOS Apple Silicon, switch to Node 15.14.0 is well.
Same iussue here on Manjaro and NodeJs 16.
Folks who want to be productive about this should probably re-test against 22.11.7 (the current version as of this message) and if the issue continues open a new issue for the bug. Include a reference to this issue and the fact that it appears to have been a regression in 22.11.5 to help the developers search for the breaking change. I haven’t had the time to do that myself in part because 22.11.4 still works for my project.
Hi @danatcofo, I’m honestly sure why the downloads would fail for electron-builder on local but not on the build server. It does indeed seem like an edge case.
Curious, if you change the electron version, would it still fail? Can you run with
DEBUG=electron-builderand post what the logs throw out?