Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GuihaiHU opened this issue Apr 28, 2018 · 29 comments
Labels
O-linux Operating System: Linux stale Bot: Stale Issue

Comments

@GuihaiHU
Copy link

GuihaiHU commented Apr 28, 2018

  • 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
@gschier
Copy link
Contributor

gschier commented Apr 28, 2018

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.

@gschier gschier changed the title [bug]libgtk-x11-2.0.so.0: cannot open shared object file: [bug] libgtk-x11-2.0.so.0: cannot open shared object file when installing plugins Apr 28, 2018
@gschier gschier added the O-linux Operating System: Linux label Apr 28, 2018
@stale
Copy link

stale bot commented Jun 27, 2018

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.

@stale stale bot added the stale Bot: Stale Issue label Jun 27, 2018
@stale stale bot closed this as completed Jul 4, 2018
@mbn18
Copy link

mbn18 commented Feb 19, 2019

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

@jluiz20
Copy link

jluiz20 commented Apr 12, 2019

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

@stanfieldr
Copy link

Same here on Ubuntu 19.04 using the snap

@rezaxdi
Copy link

rezaxdi commented Jul 19, 2019

same problem in kde neon based on ubuntu 18.04.2

@parkerqueen
Copy link

parkerqueen commented Aug 8, 2019

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

@barseghyanartur
Copy link

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.

@asyba
Copy link

asyba commented Feb 26, 2020

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

@huzhennan
Copy link

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

@asyba
Copy link

asyba commented Mar 2, 2020

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??

@barseghyanartur
Copy link

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

@asyba
Copy link

asyba commented Mar 6, 2020

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

I try that, but is not working.

image

@barseghyanartur
Copy link

@asyba:

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

@asyba
Copy link

asyba commented Mar 6, 2020

@asyba:

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

sudo snap install insomnia

@barseghyanartur
Copy link

@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
Copy link

asyba commented Mar 9, 2020

@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

@barseghyanartur
Copy link

barseghyanartur commented Mar 9, 2020

@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.

+ insomnia-plugin-aws-cognito-token@0.11.0
added 20 packages from 83 contributors and audited 49 packages in 5.418s
found 0 vulnerabilities

insomnia_plugins

@asyba
Copy link

asyba commented Mar 9, 2020

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

@asyba
Copy link

asyba commented Mar 9, 2020

@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?

@barseghyanartur
Copy link

I installed it with snap on both ununtu and fedora.

@asyba
Copy link

asyba commented Mar 9, 2020

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

@barseghyanartur
Copy link

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'
}

@Zakini
Copy link

Zakini commented May 19, 2020

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?

@starsep
Copy link

starsep commented Oct 2, 2020

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.

@isneep
Copy link

isneep commented Jan 6, 2021

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'

@Allysh0w
Copy link

any solution?

@vladbndko
Copy link

Solution:

cd /home/$USER/snap/insomnia/current/.config/Insomnia/plugins
npm init -y
npm install insomnia-plugin-name

@diegocsilva
Copy link

Solution:

cd /home/$USER/snap/insomnia/current/.config/Insomnia/plugins
npm init -y
npm install insomnia-plugin-name

solved for me !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-linux Operating System: Linux stale Bot: Stale Issue
Projects
None yet
Development

No branches or pull requests