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

Mismatch in types between electron-installer-snap and electron-forge, Error code 2 #1607

Closed
tvvignesh opened this issue Apr 5, 2020 · 1 comment · Fixed by #1644
Closed
Labels

Comments

@tvvignesh
Copy link

Hi. In maker-snap according to electron-installer-snap configs documented here (https://github.com/electron-userland/electron-installer-snap/blob/master/docs/api.md) appConfig is an object but according to the types documented in electron-forge here (https://js.electronforge.io/maker/snap/interfaces/makersnapconfig) it is declared as a String.

Also, I am getting this error both with and without core18 in appConfig.

Screenshot from 2020-04-05 16-19-11

This is how I have set my snap forge config

{
	name: '@electron-forge/maker-snap',
	config: {
		name: 'myapp',
		version: '1.0.0',
		appConfig: {base: 'core18'},
		features: {
			audio: true,
			mpris: 'com.myapp.www',
			webgl: true
		},
		summary: 'My App Summary',
		description:
			'My App description',
		grade: 'stable'
	}
}

I am using "@electron-forge/maker-snap": "^6.0.0-beta.50", added to my dev dependencies which used to work before (I did an update and upgrade of the system yesterday, Not sure if that is the reason)

System info:
Linux vignesh-predator 5.3.0-45-generic #37-Ubuntu SMP Thu Mar 26 20:41:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Running Ubuntu 19.10

PS: I did refer these but didn't help much (#1531 and electron-userland/electron-installer-snap#24)

Thanks.

@yanike
Copy link

yanike commented Apr 27, 2020

I'm having the same issue on Ubuntu 20.04! .DEB builds fine, but SNAP has an issue.

{
          "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)

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

Successfully merging a pull request may close this issue.

2 participants