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

panic: runtime error: index out of range #3020

Closed
soubhikchatterjee opened this issue Jun 20, 2018 · 11 comments
Closed

panic: runtime error: index out of range #3020

soubhikchatterjee opened this issue Jun 20, 2018 · 11 comments

Comments

@soubhikchatterjee
Copy link

electron-builder version=20.15.1

  • Version: 20.15.1
  • Target: linux

Every time I am trying to build the installer for linux i get "panic: runtime error: index out of range".

I am currently on Ubuntu 17.10

Error trace:
` build --linux

• electron-builder version=20.15.1
• loaded configuration file=package.json ("build" field)
• electron-rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies

To ensure your native dependencies are always matched electron version, simply add script "postinstall": "electron-builder install-app-deps" to your package.json`
• writing effective config file=dist/electron-builder-effective-config.yaml
• rebuilding native production dependencies platform=linux arch=x64
• packaging platform=linux arch=x64 electron=2.0.2 appOutDir=dist/linux-unpacked
• building target=snap arch=x64 file=dist/eisen-syncer_0.0.0_amd64.snap
• building target=AppImage arch=x64 file=dist/eisen-syncer-0.0.0-x86_64.AppImage
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/develar/app-builder/pkg/icons.ConvertIcnsToPng(0xc4200a8340, 0x33, 0x7ffd66c810d1, 0x32, 0xc4200c55f8, 0x2, 0x823a59, 0x4, 0xc4200a8340)
/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/icns-to-png.go:60 +0x4a3
github.com/develar/app-builder/pkg/icons.ConvertIcon(0xc4200c8780, 0x3, 0x4, 0xc4201452e0, 0x2, 0x2, 0x7ffd66c8106b, 0x3, 0x7ffd66c810d1, 0x32, ...)
/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/icon-converter.go:158 +0x76e
github.com/develar/app-builder/pkg/icons.ConfigureCommand.func1(0xc42016c090, 0x40e283, 0x7bd800)
/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/icon-converter.go:27 +0x99
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(*actionMixin).applyActions(0xc420104798, 0xc42016c090, 0x0, 0x0)
/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/actions.go:28 +0x6d
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(*Application).applyActions(0xc420106690, 0xc42016c090, 0x0, 0x0)
/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:557 +0xde
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(*Application).execute(0xc420106690, 0xc42016c090, 0xc42009d480, 0x1, 0x1, 0x0, 0x0, 0x704962, 0x7b2640)
/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:390 +0x8f
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(*Application).Parse(0xc420106690, 0xc4200b2010, 0xf, 0xf, 0xc42009a058, 0x0, 0x2, 0x2)
/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:222 +0x1f2
main.main()
/Users/develar/go/src/github.com/develar/app-builder/main.go:58 +0x15d
Error: Cannot cleanup:

Error #1 --------------------------------------------------------------------------------
Error: /var/www/html/projects/eisen-syncer/node_modules/app-builder-bin/linux/x64/app-builder exited with code 2
at ChildProcess.childProcess.once.code (/var/www/html/projects/eisen-syncer/node_modules/builder-util/src/util.ts:252:14)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
From previous event:
at LinuxPackager.resolveIcon (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:567:69)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:43:35
at Generator.next ()
From previous event:
at LinuxTargetHelper.computeDesktopIcons (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:25:36)
at Lazy.LinuxTargetHelper.iconPromise (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:13:54)
at Lazy.get value [as value] (/var/www/html/projects/eisen-syncer/node_modules/lazy-val/src/main.ts:18:23)
at LinuxTargetHelper.get icons [as icons] (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:21:29)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/snap.ts:170:23
From previous event:
at SnapTarget.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/snap.ts:143:44)
at Function.buildAsyncTargets (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:144:36)
at LinuxPackager.packageInDistributableFormat (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:123:24)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:118:10
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
at LinuxPackager.pack (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:115:95)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:373:24
at Generator.next ()
at xfs.stat (/var/www/html/projects/eisen-syncer/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:153:5)
From previous event:
at Packager.doBuild (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:341:39)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:317:52
at Generator.next ()
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:99:16
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
at Packager._build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:294:133)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:290:23
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
at Packager.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:248:14)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/index.ts:51:40
at Generator.next ()
From previous event:
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/out/index.js:220:17)
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/builder.ts:234:10)
at then (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/cli/cli.ts:46:19)
at

Error #2 --------------------------------------------------------------------------------
Error: /var/www/html/projects/eisen-syncer/node_modules/app-builder-bin/linux/x64/app-builder exited with code 2
at ChildProcess.childProcess.once.code (/var/www/html/projects/eisen-syncer/node_modules/builder-util/src/util.ts:252:14)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
From previous event:
at LinuxPackager.resolveIcon (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:567:69)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:43:35
at Generator.next ()
From previous event:
at LinuxTargetHelper.computeDesktopIcons (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:25:36)
at Lazy.LinuxTargetHelper.iconPromise (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:13:54)
at Lazy.get value [as value] (/var/www/html/projects/eisen-syncer/node_modules/lazy-val/src/main.ts:18:23)
at LinuxTargetHelper.get icons [as icons] (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:21:29)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/snap.ts:170:23
From previous event:
at SnapTarget.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/snap.ts:143:44)
at Function.buildAsyncTargets (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:144:36)
at LinuxPackager.packageInDistributableFormat (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:123:24)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:118:10
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
at LinuxPackager.pack (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:115:95)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:373:24
at Generator.next ()
at xfs.stat (/var/www/html/projects/eisen-syncer/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:153:5)
From previous event:
at Packager.doBuild (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:341:39)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:317:52
at Generator.next ()
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:99:16
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
at Packager._build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:294:133)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:290:23
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
at Packager.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:248:14)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/index.ts:51:40
at Generator.next ()
From previous event:
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/out/index.js:220:17)
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/builder.ts:234:10)
at then (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/cli/cli.ts:46:19)
at
at ChildProcess.childProcess.once.code (/var/www/html/projects/eisen-syncer/node_modules/builder-util/src/util.ts:252:14)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
at LinuxPackager.resolveIcon (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:567:69)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:43:35
at Generator.next ()
at LinuxTargetHelper.computeDesktopIcons (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:25:36)
at Lazy.LinuxTargetHelper.iconPromise (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:13:54)
at Lazy.get value [as value] (/var/www/html/projects/eisen-syncer/node_modules/lazy-val/src/main.ts:18:23)
at LinuxTargetHelper.get icons [as icons] (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:21:29)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/snap.ts:170:23
at SnapTarget.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/snap.ts:143:44)
at Function.buildAsyncTargets (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:144:36)
at LinuxPackager.packageInDistributableFormat (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:123:24)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:118:10
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
at LinuxPackager.pack (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:115:95)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:373:24
at Generator.next ()
at xfs.stat (/var/www/html/projects/eisen-syncer/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:153:5)
at Packager.doBuild (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:341:39)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:317:52
at Generator.next ()
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:99:16
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
at Packager._build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:294:133)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:290:23
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
at Packager.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:248:14)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/index.ts:51:40
at Generator.next ()
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/out/index.js:220:17)
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/builder.ts:234:10)
at then (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/cli/cli.ts:46:19)
at
at ChildProcess.childProcess.once.code (/var/www/html/projects/eisen-syncer/node_modules/builder-util/src/util.ts:252:14)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
at LinuxPackager.resolveIcon (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:567:69)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:43:35
at Generator.next ()
at LinuxTargetHelper.computeDesktopIcons (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:25:36)
at Lazy.LinuxTargetHelper.iconPromise (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:13:54)
at Lazy.get value [as value] (/var/www/html/projects/eisen-syncer/node_modules/lazy-val/src/main.ts:18:23)
at LinuxTargetHelper.get icons [as icons] (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:21:29)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/snap.ts:170:23
at SnapTarget.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/targets/snap.ts:143:44)
at Function.buildAsyncTargets (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:144:36)
at LinuxPackager.packageInDistributableFormat (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:123:24)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:118:10
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
at LinuxPackager.pack (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/platformPackager.ts:115:95)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:373:24
at Generator.next ()
at xfs.stat (/var/www/html/projects/eisen-syncer/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:153:5)
at Packager.doBuild (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:341:39)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:317:52
at Generator.next ()
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:99:16
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
at Packager._build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:294:133)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:290:23
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
at Packager.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:248:14)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/index.ts:51:40
at Generator.next ()
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/out/index.js:220:17)
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/builder.ts:234:10)
at then (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/cli/cli.ts:46:19)
at
at throwError (/var/www/html/projects/eisen-syncer/node_modules/builder-util/src/asyncTaskManager.ts:90:11)
at checkErrors (/var/www/html/projects/eisen-syncer/node_modules/builder-util/src/asyncTaskManager.ts:53:9)
at /var/www/html/projects/eisen-syncer/node_modules/builder-util/src/asyncTaskManager.ts:67:7
From previous event:
at AsyncTaskManager.awaitTasks (/var/www/html/projects/eisen-syncer/node_modules/builder-util/src/asyncTaskManager.ts:44:19)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:385:23
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
at Packager.doBuild (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:341:39)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:317:52
at Generator.next ()
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:99:16
at /var/www/html/projects/eisen-syncer/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
at Packager._build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:294:133)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:290:23
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
at Packager.build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/packager.ts:248:14)
at /var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/src/index.ts:51:40
at Generator.next ()
From previous event:
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder-lib/out/index.js:220:17)
at build (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/builder.ts:234:10)
at then (/var/www/html/projects/eisen-syncer/node_modules/electron-builder/src/cli/cli.ts:46:19)
at
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dist-linux: build --linux
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dist-linux 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! /home/soubhik/.npm/_logs/2018-06-20T11_06_30_438Z-debug.log`

@develar
Copy link
Member

develar commented Jun 26, 2018

Is it possible to provide project?

@Coygo
Copy link

Coygo commented Sep 3, 2018

I got a similar issue. Is there some secret setting or format for icons?

anic: runtime error: index out of range
goroutine 1 [running]:
github.com/develar/app-builder/vendor/github.com/biessek/golang-ico.(*decoder).decode(0xc4200b1100, 0x1758240, 0xc4200eeb40, 0x168a720, 0x16d4d00)
	/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/biessek/golang-ico/reader.go:131 +0xd1d
github.com/develar/app-builder/vendor/github.com/biessek/golang-ico.Decode(0x1758240, 0xc4200eeb40, 0xc4200eeb40, 0x1758240, 0xc4200eeb40, 0xa)
	/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/biessek/golang-ico/reader.go:24 +0x58
image.Decode(0x1758240, 0xc4200eeb40, 0x13b9c98, 0xc4200eeb40, 0x4, 0xc4201c7000, 0x4, 0x1000)
	/usr/local/Cellar/go/1.10.3/libexec/src/image/format.go:84 +0xe0
github.com/develar/app-builder/pkg/icons.DecodeImageAndClose(0x1758240, 0xc4200eeb40, 0x1759460, 0xc4200d06d8, 0x1000, 0x1000, 0x1099ead, 0xc4202719a8)
	/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/image-util.go:89 +0x39
github.com/develar/app-builder/pkg/icons.LoadImage(0xc4201140f0, 0x45, 0x0, 0x0, 0x0, 0x0)
	/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/image-util.go:61 +0x58a
github.com/develar/app-builder/pkg/icons.loadImage(0xc4201140f0, 0x45, 0x200, 0xc420271b01, 0xc42027a870, 0xc420271b08, 0x1008e2d)
	/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/icon-converter.go:271 +0x39
github.com/develar/app-builder/pkg/icons.configureInputInfoFromSingleFile(0xc4201140f0, 0x45, 0x0, 0xc4200b10c0, 0xc4201c4998, 0x2)
	/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/icon-converter.go:253 +0x47
github.com/develar/app-builder/pkg/icons.ConvertIcon(0xc4200b1080, 0x4, 0x4, 0xc42027c6a0, 0x2, 0x2, 0x7ffeefbfc4c8, 0x4, 0x7ffeefbfc531, 0x42, ...)
	/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/icon-converter.go:165 +0x5a8
github.com/develar/app-builder/pkg/icons.ConfigureCommand.func1(0xc42023dc20, 0x1010703, 0x1608960)
	/Users/develar/go/src/github.com/develar/app-builder/pkg/icons/icon-converter.go:27 +0x99
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(*actionMixin).applyActions(0xc42010c9d8, 0xc42023dc20, 0x0, 0x0)
	/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/actions.go:28 +0x6d
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(*Application).applyActions(0xc42010e690, 0xc42023dc20, 0x0, 0x0)
	/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:557 +0xde
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(*Application).execute(0xc42010e690, 0xc42023dc20, 0xc420274630, 0x1, 0x1, 0x0, 0x0, 0x137bc22, 0x15f1d60)
	/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:390 +0x8f
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(*Application).Parse(0xc42010e690, 0xc4200d4010, 0x11, 0x11, 0xc420090058, 0x0, 0x2, 0x2)
	/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:222 +0x1f2
main.main()

@foysalit
Copy link

Same here. build works with linux but breaks on mac with the issue reported above. I simply have 1 .png file for icon and looks like it breaks when trying to generate various sizes of icon files from that one file.

@do-web
Copy link

do-web commented Oct 25, 2018

Same here on osx:

INFO Building app with electron-builder:
• electron-builder version=20.28.4
• writing effective config file=dist_electron/builder-effective-config.yaml
• no native production dependencies
• packaging platform=darwin arch=x64 electron=2.0.12 appOutDir=dist_electron/mac
panic: runtime error: index out of range

@do-web
Copy link

do-web commented Jan 11, 2019

Move the build config from your package.json to the vue config json. It is a problem from the vue-cli-plugin-electron-builder.

https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/configuration.html#configuring-electron-builder

@stale
Copy link

stale bot commented Jul 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the backlog label Jul 1, 2019
@stale stale bot closed this as completed Jul 8, 2019
@ibalaji777
Copy link

i deleted folder(/build) and vue.config.js it started running but icon is default icon and then i manualy setted

@montythibault-v2
Copy link

This error was caused in my case from duplicate icons in my buildResources directory. I renamed my icons folder to _icons to bypass the built-in electron-builder logic.

@ndtreviv
Copy link

For me, I was referencing icons that were not where they said they would be.

My icons were in build/assets/, for example, build/assets/icon.ico but the config in my package.json was referencing them just being in build/:

    "win": {
      "target": ["nsis", "msi"],
      "icon": "build/icons/icon.ico",
      "sign": "./electron/winsign.js",
      "publisherName": "MyCompany Ltd"
    },

When I corrected it, it worked.

@BlurryRoots
Copy link

Had the same issue as @ndtreviv, but for target AppImage on linux.
What worked for me, was using a PNG with size 256x256 (which seems to be the mininum size requirement for AppImage icons) instead of a ico or icns file. Here's a snippet of the package.json part for electron builder:

"linux": {
  "target": [
    "dir", "AppImage"
  ],
  "category": "entertainment",
  "icon": "build/icon256x256.png"
}

@Krishnaraj-shankar
Copy link

I changed the image.icns to png format, it worked for me

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

No branches or pull requests

10 participants