Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make-snap Issue #1652

Closed
yanike opened this issue Apr 27, 2020 · 16 comments
Closed

make-snap Issue #1652

yanike opened this issue Apr 27, 2020 · 16 comments
Labels

Comments

@yanike
Copy link

yanike commented Apr 27, 2020

This issue is happening on Ubuntu 20.04. My .DEB builds fine, but .SNAP has an issue.
Almost like what I've seen here -> #1607

{
          "name": "@electron-forge/maker-snap",
          "config": {
            "name": "xxx",
            "version": "1.0.0",
            "appConfig":{
              "base": "core18"
            },
            "features": {
              "audio": true,
              "mpris": "com.xxx.xxx",
              "webgl": true
            },
            "summary": "xxx",
            "description": "xxx"
          }
        }
An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Command failed with a non-zero return code (2):
/usr/bin/snapcraft snap --target-arch=amd64 --output=/home/xxx/xxx.snap
Error: Command failed with a non-zero return code (2):
/usr/bin/snapcraft snap --target-arch=amd64 --output=/home/xxx/xxx.snap
    at ChildProcess.<anonymous> (/home/xxx/xxx/node_modules/@malept/cross-spawn-promise/src/index.ts:155:16)
    at ChildProcess.emit (events.js:310:20)
    at ChildProcess.EventEmitter.emit (domain.js:482:12)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
@yanike yanike added the bug label Apr 27, 2020
@malept
Copy link
Member

malept commented Apr 27, 2020

Please fill out the bug template so that the problem can be diagnosed easier.

@yanike
Copy link
Author

yanike commented May 2, 2020


name: make-snap Issue
about: Issue with @electron-forge/maker-snap
labels: "Bug"

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Forge Version:
    6.0.0-beta.51
  • Electron Version:
    8.2.3
  • Operating System:
    Ubuntu 20.04 x64

Expected Behavior

this - > Developers shouldn't have to worry about setting up build tooling, native module rebuilding, etc. Everything should "just work" for them out of the box.
I expected it to work just like @electron-forge/maker-deb did.

Actual Behavior

look at the initial post.

To Reproduce

  1. https://www.electronforge.io/
  2. Follow the guide
  3. Follow steps here -> https://www.electronforge.io/config/makers/snapcraft
  4. Follow steps here -> https://js.electronforge.io/maker/snap/interfaces/makersnapconfig
  5. terminal: npm run make

Additional Information

Terminal:
xxx@xxx: ~/.../yurjo-news$ electron-forge import✔ Checking your system
✔ Initializing Git Repository
It looks like this project is already configured for Electron Forge
✔ Writing modified package.json file
✔ Installing dependencies
✔ Writing modified package.json file
✔ Fixing .gitignore

We have ATTEMPTED to convert your app to be in a format that electron-forge understands.

Thanks for using "electron-forge"!!!
xxx@xxx:~/.../yurjo-news$ npm install --save-dev @electron-forge/maker-snap
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN rm not removing /..../yurjo-news/node_modules/.bin/rimraf as it wasn't installed by /.../yurjo-news/node_modules/rimraf
npm WARN rm not removing /.../yurjo-news/node_modules/.bin/semver as it wasn't installed by /.../yurjo-news/node_modules/semver

core-js@3.6.5 postinstall /.../yurjo-news/node_modules/core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js
https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN yurjo-news@1.0.0 No repository field.

  • @electron-forge/maker-snap@6.0.0-beta.51
    added 15 packages from 13 contributors, removed 16 packages, updated 463 packages and audited 9607 packages in 25.511s

18 packages are looking for funding
run npm fund for details

found 1 low severity vulnerability
run npm audit fix to fix them, or npm audit for details
xxx@xxx:~/.../yurjo-news$ npm run make

yurjo-news@1.0.0 make /.../yurjo-news
electron-forge make

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: deb, snap
✔ Making for target: deb - On platform: linux - For arch: x64
⠙ Making for target: snap - On platform: linux - For arch: x64The browser-sandbox feature will trigger a manual review in the Snap store.
✖ Making for target: snap - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Command failed with a non-zero return code (2):
/usr/bin/snapcraft snap --target-arch=amd64 --output=/.../yurjo-news/out/make/snap/x64/yurjo-news_1.0.0_amd64.snap
Error: Command failed with a non-zero return code (2):
/usr/bin/snapcraft snap --target-arch=amd64 --output=/.../yurjo-news/out/make/snap/x64/yurjo-news_1.0.0_amd64.snap
at ChildProcess. (/.../yurjo-news/node_modules/@malept/cross-spawn-promise/src/index.ts:155:16)
at ChildProcess.emit (events.js:310:20)
at ChildProcess.EventEmitter.emit (domain.js:482:12)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yurjo-news@1.0.0 make: electron-forge make
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yurjo-news@1.0.0 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /.../.npm/_logs/2020-05-02T18_43_10_524Z-debug.log

@malept
Copy link
Member

malept commented May 27, 2020

It would help greatly if you could rerun your command as DEBUG=electron-installer-snap:snapcraft npm run make and paste the output here.

@yanike
Copy link
Author

yanike commented May 28, 2020

xxx@xxx:~/.../Electron/yurjo-news$ npm run make

> yurjo-news@1.0.0 make /.../Electron/yurjo-news
> electron-forge make

✔ Checking your system
✔ Resolving Forge Config

An unhandled rejection has occurred inside Forge:
Error: Could not find module with name: @electron-forge/maker-snap. Make sure it's listed in the devDependencies of your package.json
    at _default (/.../Electron/yurjo-news/node_modules/@electron-forge/core/src/api/make.ts:125:15)
    at /.../Electron/yurjo-news/node_modules/@electron-forge/cli/src/electron-forge-make.ts:44:5

Electron Forge was terminated. Location:
{}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yurjo-news@1.0.0 make: `electron-forge make`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the yurjo-news@1.0.0 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /.../.npm/_logs/2020-05-28T14_33_29_679Z-debug.log
xxx@xxx:~/.../Electron/yurjo-news$ electron-forge import✔ Checking your system✔ Initializing Git RepositoryIt looks like this project is already configured for Electron Forge✔ Writing modified package.json file
✔ Installing dependencies
✔ Writing modified package.json file
✔ Fixing .gitignore


We have ATTEMPTED to convert your app to be in a format that electron-forge understands.

Thanks for using "electron-forge"!!!
xxx@xxx:~/.../Electron/yurjo-news$ npm install --save-dev @electron-forge/maker-snapnpm WARN rm not removing /.../Electron/yurjo-news/node_modules/.bin/rimraf as it wasn't installed by /.../Electron/yurjo-news/node_modules/rimrafnpm WARN rm not removing /.../Electron/yurjo-news/node_modules/.bin/semver as it wasn't installed by /.../Electron/yurjo-news/node_modules/semver

> core-js@3.6.5 postinstall /.../Electron/yurjo-news/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> electron@8.2.3 postinstall /.../Electron/yurjo-news/node_modules/electron
> node install.js

npm WARN yurjo-news@1.0.0 No repository field.

+ @electron-forge/maker-snap@6.0.0-beta.51
added 10 packages from 1 contributor, removed 19 packages, updated 472 packages and audited 482 packages in 14.398s

18 packages are looking for funding
  run `npm fund` for details

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
xxx@xxx:~/.../Electron/yurjo-news$ npm audit fix
npm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run  npm install  to fix them.
npm ERR!     Missing: @electron-forge/maker-zip@6.0.0-beta.51

npm ERR! A complete log of this run can be found in:
npm ERR!     /.../.npm/_logs/2020-05-28T14_37_40_195Z-debug.log
xxx@xxx:~/.../Electron/yurjo-news$ DEBUG=electron-installer-snap:snapcraft
xxx@xxx:~/.../Electron/yurjo-news$ npm audit fixnpm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run  npm install  to fix them.
npm ERR!     Missing: @electron-forge/maker-zip@6.0.0-beta.51

npm ERR! A complete log of this run can be found in:
npm ERR!     /.../.npm/_logs/2020-05-28T14_37_46_666Z-debug.log
xxx@xxx:~/.../Electron/yurjo-news$ npm install
npm WARN yurjo-news@1.0.0 No repository field.

added 1 package from 1 contributor, removed 1 package and audited 483 packages in 2.963s

18 packages are looking for funding
  run `npm fund` for details

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
xxx@xxx:~/.../Electron/yurjo-news$ DEBUG=electron-installer-snap:snapcraft
xxx@xxx:~/.../Electron/yurjo-news$ npm run make
> yurjo-news@1.0.0 make /.../Electron/yurjo-news
> electron-forge make

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: deb, snap, zip
✔ Making for target: deb - On platform: linux - For arch: x64
⠙ Making for target: snap - On platform: linux - For arch: x64The browser-sandbox feature will trigger a manual review in the Snap store.
✖ Making for target: snap - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Command failed with a non-zero return code (2):
/usr/bin/snapcraft snap --target-arch=amd64 --output=/.../Electron/yurjo-news/out/make/snap/x64/yurjo-news_1.0.0_amd64.snap
Error: Command failed with a non-zero return code (2):
/usr/bin/snapcraft snap --target-arch=amd64 --output=/.../Electron/yurjo-news/out/make/snap/x64/yurjo-news_1.0.0_amd64.snap
    at ChildProcess.<anonymous> (/.../Electron/yurjo-news/node_modules/@malept/cross-spawn-promise/src/index.ts:155:16)
    at ChildProcess.emit (events.js:310:20)
    at ChildProcess.EventEmitter.emit (domain.js:482:12)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yurjo-news@1.0.0 make: `electron-forge make`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the yurjo-news@1.0.0 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /.../.npm/_logs/2020-05-28T14_40_02_308Z-debug.log

@malept
Copy link
Member

malept commented May 28, 2020

If you're going to split DEBUG=electron-installer-snap:snapcraft into its own line, you need to run this instead:

export DEBUG=electron-installer-snap:snapcraft
npm run make

@yanike
Copy link
Author

yanike commented May 28, 2020

I still get an error.

⠸ Making for target: snap - On platform: linux - For arch: x64Setting target machine to 'amd64'
Issues while validating snapcraft.yaml: The 'apps/yurjo-news' property does not match the required schema: Additional properties are not allowed ('base' was unexpected)
✖ Making for target: snap - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Command failed with a non-zero return code (2):
/usr/bin/snapcraft snap --target-arch=amd64 --output=/.../Electron/yurjo-news/out/make/snap/x64/yurjo-news_1.0.0_amd64.snap
Error: Command failed with a non-zero return code (2):
/usr/bin/snapcraft snap --target-arch=amd64 --output=/.../Electron/yurjo-news/out/make/snap/x64/yurjo-news_1.0.0_amd64.snap
    at ChildProcess.<anonymous> (/.../Electron/yurjo-news/node_modules/@malept/cross-spawn-promise/src/index.ts:155:16)
    at ChildProcess.emit (events.js:310:20)
    at ChildProcess.EventEmitter.emit (domain.js:482:12)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yurjo-news@1.0.0 make: `electron-forge make`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the yurjo-news@1.0.0 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /.../.npm/_logs/2020-05-28T21_00_29_397Z-debug.log

@malept malept added question and removed bug labels May 28, 2020
@malept
Copy link
Member

malept commented May 28, 2020

This is the error:

Issues while validating snapcraft.yaml: The 'apps/yurjo-news' property does not match the required schema: Additional properties are not allowed ('base' was unexpected)

You don't need to specify base, electron-installer-snap should automatically choose it for you.

@malept malept closed this as completed May 28, 2020
@yanike
Copy link
Author

yanike commented May 28, 2020

Please don't close this until we have a working solution. I got this error and it's stuck trying to build the snap.

xxx@xxx:~/.../Electron/yurjo-news$ export DEBUG=electron-installer-snap:snapcraft
xxx@xxx:~/.../Electron/yurjo-news$ npm run make
> yurjo-news@1.0.0 make /.../Electron/yurjo-news
> electron-forge make

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: deb, snap, zip
✔ Making for target: deb - On platform: linux - For arch: x64
⠙ Making for target: snap - On platform: linux - For arch: x64The browser-sandbox feature will trigger a manual review in the Snap store.
  electron-installer-snap:snapcraft Running '/usr/bin/snapcraft snap --target-arch=amd64 --output=/.../Electron/yurjo-news/out/make/snap/x64/yurjo-news_1.0.0_amd64.snap' in /tmp/electron-snap-39075W2YPFLvtVzl5 +0ms
                                                              Setting target machine to 'amd64'
⠋ Making for target: snap - On platform: linux - For arch: x64Launching a VM.
⠦ Making for target: snap - On platform: linux - For arch: x64Skipping pull yurjo-news (already ran)
Skipping build yurjo-news (already ran)
⠹ Making for target: snap - On platform: linux - For arch: x64Skipping stage yurjo-news (already ran)
⠦ Making for target: snap - On platform: linux - For arch: x64Skipping prime yurjo-news (already ran)
⠋ Making for target: snap - On platform: linux - For arch: x64The requested action has already been taken. Consider
specifying parts, or clean the steps you want to run again.
⠹ Making for target: snap - On platform: linux - For arch: x64
Failed to create snap '/.../Electron/yurjo-news/out/make/snap/x64/yurjo-news_1.0.0_amd64.snap', mksquashfs failed:
Could not create destination file: No such file or directory

We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
⠸ Making for target: snap - On platform: linux - For arch: x64

@malept
Copy link
Member

malept commented May 28, 2020

Please don't close this until we have a working solution.

Open issues in the issue tracker are for bugs and feature requests. This issue is effectively a support ticket.

Consider building the snap in an Ubuntu 18.04 VM or container (for example, the Docker container malept/electron-forge-container:node-10). Snapcraft seems to be launching its own VM and strange things are happening, which are outside the scope of Electron Forge.

@yanike
Copy link
Author

yanike commented May 29, 2020

Please don't close this until we have a working solution.

Open issues in the issue tracker are for bugs and feature requests. This issue is effectively a support ticket.

Consider building the snap in an Ubuntu 18.04 VM or container (for example, the Docker container malept/electron-forge-container:node-10). Snapcraft seems to be launching its own VM and strange things are happening, which are outside the scope of Electron Forge.

So are you basically saying that Electron Forge can't be used right now to develop Snap apps on Ubuntu 20.04 LTS? This should be stated on your website. Especially when all I did was follow your guide from scratch.

@malept
Copy link
Member

malept commented May 29, 2020

I haven't tested this, but it probably works if you run Snapcraft 4.0 and you set base to core20.

@yanike
Copy link
Author

yanike commented May 29, 2020 via email

@cstayyab
Copy link

cstayyab commented Jan 1, 2021

I haven't tested this, but it probably works if you run Snapcraft 4.0 and you set base to core20.

Tested with base core20 and it isn't still working

@abulka
Copy link

abulka commented Jun 20, 2021

I'm also unable to build snaps on either 18.04 or 20.04. Should this issue be re-opened?

20.04

$ npm run make

> myapp@1.0.0 make
> electron-forge make

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: snap
⠙ Making for target: snap - On platform: linux - For arch: x64The browser-sandbox feature will trigger a manual review in the Snap store.
⠇ Making for target: snap - On platform: linux - For arch: x64Ignoring '--target-arch' flag.  This flag requires --destructive-mode and is unsupported with Multipass and LXD build providers.
⠏ Making for target: snap - On platform: linux - For arch: x64Build environment project directory changed from '/home/andy/Devel/electron-tests/myapp/out/make/snapcraft', cleaning first.
/snap/multipass/4861/bin/launch-multipass: 3: export: /usr/sbin: bad variable name
⠋ Making for target: snap - On platform: linux - For arch: x64/snap/multipass/4861/bin/launch-multipass: 3: export: /usr/sbin: bad variable name
⠙ Making for target: snap - On platform: linux - For arch: x64An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
✖ Making for target: snap - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Command failed with a non-zero return code (2):
/snap/bin/snapcraft snap --target-arch=amd64 --output=/home/andy/Devel/electron-tests/myapp/out/make/snap/x64/myapp_1.0.0_amd64.snap
Error: Command failed with a non-zero return code (2):
/snap/bin/snapcraft snap --target-arch=amd64 --output=/home/andy/Devel/electron-tests/myapp/out/make/snap/x64/myapp_1.0.0_amd64.snap
    at ChildProcess.<anonymous> (/home/andy/Devel/electron-tests/myapp/node_modules/@malept/cross-spawn-promise/src/index.ts:172:16)
    at ChildProcess.emit (events.js:314:20)
    at ChildProcess.EventEmitter.emit (domain.js:483:12)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

18.04

> myapp@1.0.0 make
> electron-forge make

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: snap
⠋ Making for target: snap - On platform: linux - For arch: x64The browser-sandbox feature will trigger a manual review in the Snap store.
⠧ Making for target: snap - On platform: linux - For arch: x64Ignoring '--target-arch' flag.  This flag requires --destructive-mode and is unsupported with Multipass and LXD build providers.
Build environment is in unknown state, cleaning first.
⠇ Making for target: snap - On platform: linux - For arch: x64/snap/multipass/4861/bin/launch-multipass: 3: export: /usr/sbin: bad variable name
/snap/multipass/4861/bin/launch-multipass: 3: export: /usr/sbin: bad variable name
⠏ Making for target: snap - On platform: linux - For arch: x64An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
✖ Making for target: snap - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Command failed with a non-zero return code (2):
/snap/bin/snapcraft snap --target-arch=amd64 --output=/home/andy/Devel/electron-tests/myapp/out/make/snap/x64/myapp_1.0.0_amd64.snap
Error: Command failed with a non-zero return code (2):
/snap/bin/snapcraft snap --target-arch=amd64 --output=/home/andy/Devel/electron-tests/myapp/out/make/snap/x64/myapp_1.0.0_amd64.snap
    at ChildProcess.<anonymous> (/home/andy/Devel/electron-tests/myapp/node_modules/@malept/cross-spawn-promise/src/index.ts:172:16)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.EventEmitter.emit (domain.js:483:12)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

On 18.04 I can build snaps for another project OK, so multipass is configured OK.

My package.json forge maker config is

        {
          "name": "@electron-forge/maker-snap",
          "config": {
            "icon": "bacteria.png",
            "summary": "Pretty Awesome"
          }
        }

I'm suspicious of the error in both cases (both OS's above) of

x64/snap/multipass/4861/bin/launch-multipass: 3: export: /usr/sbin: bad variable name
/snap/multipass/4861/bin/launch-multipass: 3: export: /usr/sbin: bad variable name

Invoking with DEBUG=electron-installer-snap:snapcraft npm run make shows no significant extra info.

My system info

E.g. on my Ubuntu 20.04 VM running in Vmware with VT-x configured in Vmware processor settings.

$ snapcraft --version
snapcraft, version 4.8.2

andy@ubuntu:~/Devel/electron-tests/myapp$ which snapcraft
/snap/bin/snapcraft

andy@ubuntu:~/Devel/electron-tests/myapp$ multipass --version
multipass  1.6.2
multipassd 1.6.2

andy@ubuntu:~/Devel/electron-tests/myapp$ multipass list
Name                    State             IPv4             Image
primary                 Running           10.240.47.137    Ubuntu 20.04 LTS
snapcraft-myapp         Delayed Shutdown  10.240.47.86     Ubuntu Snapcraft builder for Core 18

andy@ubuntu:~/Devel/electron-tests/myapp$ uname -v
#62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021

# And on my 18.04 system...

$ uname -v
#83~18.04.1-Ubuntu SMP Tue May 11 16:01:00 UTC 2021

Possibly also related is electron-userland/electron-installer-snap#83

@linonetwo
Copy link

Same here, while https://www.npmjs.com/package/@electron-forge/maker-snap says nothing


     * ✖ Making for target: snap - On platform: linux - For arch: x64

        An unhandled error has occurred inside Forge:
        An error occured while making for target: snap
        Command failed with a non-zero return code (2):
        /snap/bin/snapcraft snap --target-arch=amd64 --output=/home/runner/work/TidGi-Desktop/TidGi-Desktop/out/make/snap/x64/tidgi_0.7.6-prerelease3.4_amd64.snap
        Error: Command failed with a non-zero return code (2):
        /snap/bin/snapcraft snap --target-arch=amd64 --output=/home/runner/work/TidGi-Desktop/TidGi-Desktop/out/make/snap/x64/tidgi_0.7.6-prerelease3.4_amd64.snap

@kburns2kb
Copy link

Hi there! Unfortunately I am having the same problem

kayla@kayla-VirtualBox:~/Documents/newtest$ npm run make

InoWorx@1.0.0 make
electron-forge make

✔ Checking your system
Preparing to package application
✔ Running packaging hooks
✔ Running generateAssets hook
✔ Running prePackage hook
✔ Packaging application
Preparing to package application
✔ Running packaging hooks
✔ Running generateAssets hook
✔ Loading configuration
✔ Resolving make targets
› Making for the following targets: zip, deb, rpm, snap
✔ Running package command
✔ Preparing to package application
✔ Running packaging hooks
✔ Running generateAssets hook
✔ Running prePackage hook
✔ Packaging application
✔ Packaging for x64 on linux [17s]
✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
✔ Making a zip distributable for linux/x64 [27s]
✔ Making a deb distributable for linux/x64 [4m5s]
✔ Making a rpm distributable for linux/x64 [4m2s]
✖ Making a snap distributable for linux/x64
› Command failed with a non-zero return code (2):
/snap/bin/snapcraft snap --output=/home/kayla/Documents/newtest/out/…
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
Error: Command failed with a non-zero return code (2):
/snap/bin/snapcraft snap --output=/home/kayla/Documents/newtest/out/make/snap/x64/inoworx_1.0.0_amd64.snap
at ChildProcess. (/home/kayla/Documents/newtest/node_modules/electron-installer-snap/node_modules/@malept/cross-spawn-promise/dist/src/index.js:99:24)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants