Release for ubuntu fails due to snapcraft is not installed
See original GitHub issueDescribe the bug First, I just want to say thank you so much for this fantastic template! I was using the Vue CLI Plugin Electron Builder, but it’s not as up-to-date or as awesome as Vite, and this template made converting to Vite a breeze.
Now for the issue: the only change I made to the release.yml was as per the comment:
# To compile the application for different platforms, use:
# os: [ macos-latest, ubuntu-latest, windows-latest ]
I made that change as I’m wanting to release for all platforms, and now the release fails for ubuntu-latest. It still creates the app image perfectly, but crashes at the snap store. (I believe you can check the failed action here: https://github.com/ste163/vislit/runs/3794128439?check_suite_focus=true)
To Reproduce
- Change your release.yml’s OS line 87 to
[ macos-latest, ubuntu-latest, windows-latest ]
- Push to main
- Ubuntu should fail due snapcraft not being installed. Mac and Windows should build just fine
Expected behavior The release should build for the snap store; however, I don’t really need it. I’m good with just having the app image.
Screenshots Error message:
Error: Command failed: npx --no-install electron-builder --linux --publish always --config electron-builder.config.js
• electron-builder version=22.11.7 os=5.8.0-1042-azure
• loaded configuration file=/home/runner/work/vislit/vislit/electron-builder.config.js
• description is missed in the package.json appPackageFile=/home/runner/work/vislit/vislit/package.json
• author is missed in the package.json appPackageFile=/home/runner/work/vislit/vislit/package.json
• packaging platform=linux arch=x64 electron=15.1.0 appOutDir=dist/linux-unpacked
• building target=snap arch=x64 file=dist/vislit_21.10.4-1033_amd64.snap
• building target=AppImage arch=x64 file=dist/vislit-21.10.4-1033.AppImage
• application Linux category is set to default "Utility" reason=linux.category is not set and cannot map from macOS docs=https://www.electron.build/configuration/linux
• application Linux category is set to default "Utility" reason=linux.category is not set and cannot map from macOS docs=https://www.electron.build/configuration/linux
• publishing publisher=Github (owner: ste163, project: vislit, version: 21.10.4-1033)
• uploading file=vislit-21.10.4-1033.AppImage provider=GitHub
• overwrite published file file=vislit-21.10.4-1033.AppImage reason=already exists on GitHub
• publishing publisher=Snap Store
• uploading file=vislit_21.10.4-1033_amd64.snap provider=snapStore
⨯ snapcraft is not installed, please: sudo snap install snapcraft --classic
⨯ /home/runner/work/vislit/vislit/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE failedTask=build stackTrace=Error: /home/runner/work/vislit/vislit/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/home/runner/work/vislit/vislit/node_modules/builder-util/src/util.ts:249:14)
at Object.onceWrapper (node:events:510:26)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:144
throw err;
^
Error: Command failed: npx --no-install electron-builder --linux --publish always --config electron-builder.config.js
at checkExecSyncError (child_process.js:621:11)
at execSync (child_process.js:657:15)
at run (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:21:27)
at runAction (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:132:4)
at Object.<anonymous> (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:150:1)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 2006,
stdout: null,
stderr: null
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top GitHub Comments
Adding the following to
electron-builder.config.js
‘fixed’ the issue as it no longer targets snap:When I get to the point where my app is ready for release, I’ll check into get snap working.
Thanks for all your help!
Awesome, will check those out! Thanks!