Problem running AppImage

I’m trying to run an (electron-based?) .AppImage using appimage-run, specifically Publii ( https://cdn.getpublii.com/Publii-0.37.3.AppImage ):

Publii-0.37.3.AppImage installed in $HOME/.cache/appimage-run/895e7901ce59ba1227fed2ca34e127da994e2973b24018876431efc08b971101
A JavaScript error occurred in the main process
Uncaught Exception:
Error: libsecret-1.so.0: cannot open shared object file: No such file or directory
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1016:18)
    at Object.func [as .node] (electron/js2c/asar.js:149:18)
    at Module.load (internal/modules/cjs/loader.js:816:32)
    at Module._load (internal/modules/cjs/loader.js:728:14)
    at Function.Module._load (electron/js2c/asar.js:748:26)
    at Module.require (internal/modules/cjs/loader.js:853:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> ($HOME/.cache/appimage-run/895e7901ce59ba1227fed2ca34e127da994e2973b24018876431efc08b971101/resources/app.asar/node_modules/keytar/lib/keytar.js:1:14)
    at Module._compile (internal/modules/cjs/loader.js:968:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:986:10)
    at Module.load (internal/modules/cjs/loader.js:816:32)
    at Module._load (internal/modules/cjs/loader.js:728:14)
    at Function.Module._load (electron/js2c/asar.js:748:26)
    at Module.require (internal/modules/cjs/loader.js:853:19)
    at require (internal/modules/cjs/helpers.js:74:18)

Any ideas? AppImage isn’t a requirement, I just thought it would be easier than .deb or .rpm.

1 Like

Same issue with Todoist app …

Todoist-1.0.3.AppImage installed in /home/jalil/.cache/appimage-run/6c75ff4560df7be86deba53bc60e07059c5e5a5341bb881894855dfbd3ae30d5
A JavaScript error occurred in the main process
Uncaught Exception:
Error: libsecret-1.so.0: cannot open shared object file: No such file or directory
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1812)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1203:18)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5:2039)
    at Module.load (internal/modules/cjs/loader.js:992:32)
    at Module._load (internal/modules/cjs/loader.js:885:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
    at Module.require (internal/modules/cjs/loader.js:1032:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/jalil/.cache/appimage-run/6c75ff4560df7be86deba53bc60e07059c5e5a5341bb881894855dfbd3ae30d5/resources/app.asar/node_modules/keytar/lib/keytar.js:1:14)
    at Module._compile (internal/modules/cjs/loader.js:1152:30)

Anyone has the solution ?

I had the same problem you are describing. The way I did it was to install libsecret and then help the application find it by setting the LD_LIBRARY_PATH environment variable.

Get a shell with apimage-run and libsecretinstalled

> nix-shell -p appimage-run libsecret

Find path to the libsecret package

> ls /nix/store | grep libsecret

This is what’s returned on my machine. libsecret-1.so.0 can be found in /nix/store/3103zqklq2n6sr8my10c3w3ls38hlmrs-libsecret-0.20.4/lib in my case

3103zqklq2n6sr8my10c3w3ls38hlmrs-libsecret-0.20.4
8iv47k1fnsp0dzxrgn7drq34pcza17q6-libsecret-0.20.4.tar.xz.drv
axb9pjkfyxlym2j9gf9jmjfab1ndwm2l-libsecret-0.20.5.tar.xz.drv
nv4c6gwhgi0bl1q81didrcs5lnbrhr9l-libsecret-0.20.5
pv8192rzqd80rafh41pqibrcbbgkprmv-libsecret-0.20.4.drv
zkd477vgi43vdq3kanbajjxsqwzvcz6v-libsecret-0.20.5-dev
zviyv5022h5rg2xih5wvk7hkjbvgnaja-libsecret-0.20.5.drv

Now we help the application find it:

env LD_LIBRARY_PATH="/nix/store/3103zqklq2n6sr8my10c3w3ls38hlmrs-libsecret-0.20.4/lib" appimage-run <thing.AppImage>

Of course this can be made into a nix package.

EDIT:

Here is a shellscript I use to run my AppImage (again, it would be batter to make it a nix package)

#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash appimage-run libsecret

p="/nix/store/$(ls /nix/store | grep libsecret | grep -v ".drv$" | head -n 1)/lib"

echo "using LD_LIBRARY_PATH: $p"

env LD_LIBRARY_PATH="$p" appimage-run <thing.AppImage>
1 Like