glossarist / glossarist-desktop

Glossarist Desktop
https://www.glossarist.org
GNU General Public License v3.0
4 stars 6 forks source link

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

Closed strogonoff closed 3 years ago

strogonoff commented 3 years ago

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
strogonoff commented 3 years ago

This on Ubuntu 18.04

strogonoff commented 3 years ago

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.

strogonoff commented 3 years ago

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.

strogonoff commented 3 years ago

Fixed in Snap package in v1.6.26