0

I can successfully build a snap package for my electron app using electron-installer-snap, however, my app depends on the keytar module which subsequently depends on libsecret-1-0 being installed.

I see no way to pass package dependencies to electron-installer-snap (from their API doc at least). Currently, I am using the following to create the snap

createSnapPackage({
  name: 'my-app',
  executableName: 'myApp',
  arch: 'x64',
  grade: 'devel',
  confinement: 'devmode',
  version: '0.1.0',
  src: '/path-to-src',
  dest: '/path-to-write-snap',
  features: {
    passwords: true
  }
});

Note: package creation and install work correctly, however, on launch,the app crashes with the following error:

A JavaScript error occurred in the main process Uncaught Exception: Error: Cannot open /snap/my-app/x1/my-app/resources/app.asar/keytar.node: Error: libsecret-1.so.0: cannot open shared object file: No such file or directory

Note: I am running Ubuntu 16.04 to create snaps. Appreciate any help / pointers!

ahash
  • 510
  • 7
  • 12

1 Answers1

0

Passing the following user options seems to do the trick:

{
  ...
  parts: {
    electronApp: {
      'stage-packages': ['libsecret-1-0'],
    }
  }
}
ahash
  • 510
  • 7
  • 12