glossarist/glossarist-desktop

.AppImage artifacts: keytar’s native module causes crash (invalid ELF header)

Closed this issue · 4 comments

Full trace:

./Glossarist-1.6.22.AppImage

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot open /tmp/.mount_GlossaZsXNR3/resources/app.asar/keytar.node: Error: /tmp/.mount_GlossaZsXNR3/resources/app.asar.unpacked/keytar.node: invalid ELF header
    at Object.<anonymous> (/tmp/.mount_GlossaZsXNR3/resources/app.asar/webpack:/node_modules/keytar/build/Release/keytar.node:1:160)
    at Object.call (/tmp/.mount_GlossaZsXNR3/resources/app.asar/main.js:2:351365)
    at _webpack_require_ (/tmp/.mount_GlossaZsXNR3/resources/app.asar/webpack:/webpack/bootstrap:19:22)
    at Object.call (/tmp/.mount_GlossaZsXNR3/resources/app.asar/webpack:/node_modules/keytar/lib/keytar.js:1:14)
    at _webpack_require_ (/tmp/.mount_GlossaZsXNR3/resources/app.asar/webpack:/webpack/bootstrap:19:22)
    at Module.call (/tmp/.mount_GlossaZsXNR3/resources/app.asar/main.js:2:416592)
    at _webpack_require_ (/tmp/.mount_GlossaZsXNR3/resources/app.asar/webpack:/webpack/bootstrap:19:22)
    at Object.call (/tmp/.mount_GlossaZsXNR3/resources/app.asar/main.js:2:141135)
    at _webpack_require_ (/tmp/.mount_GlossaZsXNR3/resources/app.asar/webpack:/webpack/bootstrap:19:22)
    at /tmp/.mount_GlossaZsXNR3/resources/app.asar/webpack:/webpack/bootstrap:83:10

This on Ubuntu 18.04

For background, node-keytar requires using a native Node module (bundled as a binary image). We use node-keytar to store Git passwords using user’s native OS mechanisms.

This may be caused by the fact that the .AppImage was built on macOS, but app ran on Ubuntu. Need to see how to make sure images we build on GHA will work on whatever Linux distributions we support.

Fixed in Snap package in v1.6.26