Insomnia: [bug] libgtk-x11-2.0.so.0: cannot open shared object file when installing plugins

Created on 28 Apr 2018  Â·  27Comments  Â·  Source: Kong/insomnia

  • Insomnia Version: v5.16.1
  • Operating System: ubuntu18.04

Details

When installing a plugin, Insomnia complains that /snap/insomnia/12/insomnia: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

Howere, there is libgtk-x11-2.0.so.0 in my computer.

locate libgtk-x11-2.0.so.0
/snap/chromium/274/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
/snap/chromium/274/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30
/snap/electronic-wechat/7/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
/snap/electronic-wechat/7/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30
/snap/gnome-3-26-1604/59/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
/snap/gnome-3-26-1604/59/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30
/snap/insomnia/12/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
/snap/insomnia/12/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30
/snap/slack/6/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
/snap/slack/6/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30
/snap/tusk/15/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
/snap/tusk/15/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30
/snap/zeal-casept/26/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
/snap/zeal-casept/26/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30
/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.32
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.32
olinux stale

Most helpful comment

Manual installation worked for me. Note, that I have installed Insomnia on Fedora using snap.

  1. Go to your plugins directory:
cd /home/user/snap/insomnia/current/.config/Insomnia/plugins
  1. Install the plugin manually (in this case it's insomnia-plugin-default-headers plugin):
npm install insomnia-plugin-default-headers
  1. Reload insomnia plugins: Tools -> Reload plugins

@gschier:

I suggest to put this into Plugins documentation. I can make a PR if desired.

All 27 comments

I just played around with this a bit and it seems like this happens in both the Snap and AppImage packages. I assume it has something to do with the plugin install script launching a new process. It seems to be breaking out of the app container and not being able to find the dependencies anymore.

For now, if you're using Ubuntu, the deb package should work. You can also install plugins into the plugins folder manually using npm or yarn.

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.

Have the same issue on Fedora 29 when clicking on Install plugin.
Insomnia 6.3.2 installed using snap

Insomnia npm error: Command failed: /snap/insomnia/24/insomnia --no-deprecation /snap/insomnia/24/resources/bin/yarn-standalone.js info Insomnia --json
/snap/insomnia/24/insomnia: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory

gtk3 is installed and dependency is at /usr/lib64/libgtk-3.so.0

I am having the same issue using Ubuntu 18.04.2 LTS and Insomnia 6.3.2 installed using snap

Same here on Ubuntu 19.04 using the snap

same problem in kde neon based on ubuntu 18.04.2

I'm having the same issue in Pop!_Os with libgtk-3.so.0

Manual installation worked for me. Note, that I have installed Insomnia on Fedora using snap.

  1. Go to your plugins directory:
cd /home/user/snap/insomnia/current/.config/Insomnia/plugins
  1. Install the plugin manually (in this case it's insomnia-plugin-default-headers plugin):
npm install insomnia-plugin-default-headers
  1. Reload insomnia plugins: Tools -> Reload plugins

@gschier:

I suggest to put this into Plugins documentation. I can make a PR if desired.

Manual installation worked for me. Note, that I have installed Insomnia on Fedora using snap.

  1. Go to your plugins directory:
cd /home/user/snap/insomnia/current/.config/Insomnia/plugins
  1. Install the plugin manually (in this case it's insomnia-plugin-default-headers plugin):
npm install insomnia-plugin-default-headers
  1. Reload insomnia plugins: Tools -> Reload plugins

@gschier:

I suggest to put this into Plugins documentation. I can make a PR if desired.

I tried this but can't install manually.
image

Manual installation worked for me. Note, that I have installed Insomnia on Fedora using snap.

  1. Go to your plugins directory:
cd /home/user/snap/insomnia/current/.config/Insomnia/plugins
  1. Install the plugin manually (in this case it's insomnia-plugin-default-headers plugin):
npm install insomnia-plugin-default-headers
  1. Reload insomnia plugins: Tools -> Reload plugins

@gschier:
I suggest to put this into Plugins documentation. I can make a PR if desired.

I tried this but can't install manually.
image

I use
yarn add insomnia-plugin-default-headers
instand of npm install insomnia-plugin-default-headers,
it will download to the directory, it ok

Manual installation worked for me. Note, that I have installed Insomnia on Fedora using snap.

  1. Go to your plugins directory:
cd /home/user/snap/insomnia/current/.config/Insomnia/plugins
  1. Install the plugin manually (in this case it's insomnia-plugin-default-headers plugin):
npm install insomnia-plugin-default-headers
  1. Reload insomnia plugins: Tools -> Reload plugins

@gschier:
I suggest to put this into Plugins documentation. I can make a PR if desired.

I tried this but can't install manually.
image

I use
yarn add insomnia-plugin-default-headers
instand of npm install insomnia-plugin-default-headers,
it will download to the directory, it ok

image

image

What is YARN? a testing command??

@asyba: Perhaps, don't use sudo for installing nmp plugins?

@asyba: Perhaps, don't use sudo for installing nmp plugins?

I try that, but is not working.

image

@asyba:

OK, how did you install insomnia in the first place?

@asyba:

OK, how did you install insomnia in the first place?

sudo snap install insomnia

@asyba:

I think your issue is not related to Insomnia. Something is wrong with your nodejs installation. Search on npm update check failed, fix and then retry.

@asyba:

I think your issue is not related to Insomnia. Something is wrong with your nodejs installation. Search on npm update check failed, fix and then retry.

Ok, I fix that,
but again the same error. I check Insomnia folder and there is no package.json file, so How we can install plugins if there is no pacakge.json file??

image

@asyba:

It works for me.

[user.local@localhost]$ cd /home/user.local/snap/insomnia/current/.config/Insomnia/plugins
[user.local@localhost plugins]$ npm install insomnia-plugin-aws-cognito-token
npm WARN saveError ENOENT: no such file or directory, open '/home/user.local/snap/insomnia/62/.config/Insomnia/plugins/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/user.local/snap/insomnia/62/.config/Insomnia/plugins/package.json'
npm WARN plugins No description
npm WARN plugins No repository field.
npm WARN plugins No README data
npm WARN plugins No license field.

+ [email protected]
added 20 packages from 83 contributors and audited 49 packages in 5.418s
found 0 vulnerabilities

insomnia_plugins

npm install insomnia-plugin-aws-cognito-token

mm I skip the audit, but nothing happens in the Insomnia app it doesn't show there.

image

@barseghyanartur it will work if I install the app from .deb file or from apt-get ?
Or the plugin error is the same on those scenarios?

I installed it with snap on both ununtu and fedora.

I installed it with snap on both ununtu and fedora.

I fix it with "npm init" , what version of npm and node do you have?
I have npm 6.13.4
node v12.16.1

Node.js: v13.5.0
npm: {
npm: '6.13.4',
ares: '1.15.0',
brotli: '1.0.7',
cldr: '36.0',
icu: '65.1',
llhttp: '2.0.1',
modules: '79',
napi: '5',
nghttp2: '1.40.0',
node: '13.5.0',
openssl: '1.1.1d',
tz: '2019c',
unicode: '12.1',
uv: '1.34.0',
v8: '7.9.317.25-node.23',
zlib: '1.2.11'
}

I'm getting this on Ubuntu 20.04 with Insomnia installed via snap (v7.1.1). Manually installing in the plugin dir works for me at least.

Any progress on a fix for this?

Insomnia v2020.4.1 installed via snap v2.46.1+20.04
I am getting:

Error: Yarn error /snap/insomnia/105/insomnia: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

    at file:///snap/insomnia/105/resources/app.asar/bundle.js:99635:16
    at ChildProcess.exithandler (child_process.js:311:5)
    at ChildProcess.emit (events.js:223:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:223:5)
    at Pipe.<anonymous> (net.js:664:12)

while trying to install plugin.

This shared library seems to be installed:
/snap/gnome-3-28-1804/128/usr/lib/x86_64-linux-gnu/libX11.so.6
/snap/gnome-3-28-1804/128/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0

Manually installing plugin as suggested above works.

For the ones who wish to use bash; You can add an executable script with the following contents:

#!/bin/bash

plugins=( \
    "insomnia-plugin-XXXX" \
    "insomnia-plugin-YYYY"
)

echo -e 'Install Insomnia plugins'

pluginsDir="$HOME/snap/insomnia/current/.config/Insomnia/plugins"

which yarn || sudo apt install yarn

for plugin in "${plugins[@]}"; do
    (cd $pluginsDir && yarn add $plugin)
done

echo -e 'done'

any solution?

Was this page helpful?
0 / 5 - 0 ratings