insomnia: 2022.7.0 snap wont start on ubuntu

Expected Behavior

For insomnia to start.

Actual Behavior

A JavaScript error occurred in the main process
Uncaught Exception:
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /run/user/1000/snap.insomnia/.org.chromium.Chromium.DdJT13)
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
    at Module._extensions..node (node:internal/modules/cjs/loader:1226:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2049)
    at Module.load (node:internal/modules/cjs/loader:1011:32)
    at Module._load (node:internal/modules/cjs/loader:846:12)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/snap/insomnia/184/resources/app.asar/node_modules/@getinsomnia/node-libcurl/dist/Easy.js:5:18)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)

Reproduction Steps

  1. install insomnia using the snap
  2. run insomnia

Is there an existing issue for this?

Additional Information

Ubuntu 22.04.1 LTS

snap info

  latest/stable:    2022.7.0 2022-12-15 (184) 117MB -

Insomnia Version

2022.7.0

What operating system are you using?

Ubuntu

Operating System Version

Ubuntu 22.04.1 LTS

Installation method

snap

Last Known Working Insomnia version

the one that was installed this morning

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 69
  • Comments: 44 (7 by maintainers)

Commits related to this issue

Most upvoted comments

For others hitting this, the temporary workaround for snap is to downgrade:

sudo snap revert insomnia

Or to uninstall & switch to the deb installer.

or you could

sudo snap remove insomnia
wget https://github.com/Kong/insomnia/releases/download/core%402022.6.0/Insomnia.Core-2022.6.0.snap
sudo snap install Insomnia.Core-2022.6.0.snap --dangerous

it’s not that dangerous 😃 It won’t update after that it will stay 2022.6, so maybe watch this bug and when it’s fixed you can remove that version and install the latest the proper way again.

Same issue here, and revert didn’t work for me.

erro: cannot revert "insomnia": no revision to revert to

Hey folks merging the PR closed the issue automatically. The fix will go out in a patch release tomorrow morning.

It still doesn’t start for me on Ubuntu 22.04.1 LTS. See full error message:

➜  snap install insomnia
insomnia 2022.7.1 from Insomnia (getinsomnia) installed
➜  snap run insomnia
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /run/user/1000/snap.insomnia/.org.chromium.Chromium.GxeByB)
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
    at Module._extensions..node (node:internal/modules/cjs/loader:1226:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2049)
    at Module.load (node:internal/modules/cjs/loader:1011:32)
    at Module._load (node:internal/modules/cjs/loader:846:12)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/snap/insomnia/185/resources/app.asar/node_modules/@getinsomnia/node-libcurl/dist/Easy.js:5:18)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)

(insomnia:30488): Gtk-WARNING **: 16:35:47.604: Theme parsing error: gtk.css:1422:23: 'font-feature-settings' is not a valid property name

(insomnia:30488): Gtk-WARNING **: 16:35:47.607: Theme parsing error: gtk.css:3308:25: 'font-feature-settings' is not a valid property name

(insomnia:30488): Gtk-WARNING **: 16:35:47.607: Theme parsing error: gtk.css:3770:23: 'font-feature-settings' is not a valid property name
WARNING: Kernel has no file descriptor comparison support: Operation not permitted

Idea of snap is that it is a self contained package. It doesn’t matter, which Linux OS version you have (Ubuntu/Kubuntu/?buntu/Manjaro/…). It doesn’t matter, which libraries your base system has installed, since the program should use the ones inside snap. (Or statically linked inside binary.)

So, the snap package is broken.

@filfreire - wouldn’t we want to hotpatch / expedite this? (agreed could be difficult timing due to holidays … but punching out 2022.7.1 seems kind of critical as it is breaking/impacting lots of users (anyone who uses snap anyway); OR, revoke/revert 2022.7.0 entirely for the time being?

Snap shouldn’t be relying on any local libraries … snap revert insomnia fixed for me as well for now.

Hey, I still can’t see the patched version on snapcraft.io. Was it released? 🤔

image

The 2202.7.3 snap has fixed the start up problem for me. I’m running Ubuntu 22.04.01.

I’m not sure why but snap shows the installed version of Insomnia as 2202.7.4, but when I actually run the app and check Help > About the listed version is 2202.7.3. 🤷 It’s not a big deal, I’m just happy it’s working. 😃

Updated to the latest version and the issue is still happening:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /tmp/.org.chromium.Chromium.6P1ZE5)
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
    at Module._extensions..node (node:internal/modules/cjs/loader:1226:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2049)
    at Module.load (node:internal/modules/cjs/loader:1011:32)
    at Module._load (node:internal/modules/cjs/loader:846:12)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/opt/Insomnia/resources/app.asar/node_modules/@getinsomnia/node-libcurl/dist/Easy.js:5:18)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)

Only solution is to use a previous version AppImage. Last two updates are broken on Linux.

Because of the described problems I uninstalled and reinstalled Insomnia and now all settings are gone, is that intended?

you can use snap saved and snap restore to restore removed snap configs.

ref: https://snapcraft.io/docs/snapshots#heading--automatic-snapshots

Hey folks, Update to https://github.com/Kong/insomnia/issues/5531#issuecomment-1355879270 - We might have a possible fix 🎸 🎉

Took inspiration from folks that use electron-builder and bumped into similar issues (see https://github.com/electron-userland/electron-builder/issues/5257#issuecomment-941660681). Managed to get it working by forcing the base of the snapcraft.yaml template to latest core22.

Steps:

  • Run npm run bootstrap
  • Change the base from core18 to core22 on packages/insomnia/node_modules/app-builder-lib/templates/snap/snapcraft.yaml
  • Run BUILD_TARGETS='snap' npm run app-package on a linux host machine (works on WSL)
  • Installed the resulting packages/insomnia/dist/Insomnia<...>.snap package (e.g. sudo snap install fixed-insomnia.snap --dangerous)

And it seems to work okay-ish: image

@Kong/team-insomnia fix will be applying these steps to the build pipeline in a proper/sane way which might be tricky. But not impossible.

thanks @filfreire ! what’s the process / timeline for https://snapcraft.io/insomnia to have the fix?

reason why this is not working is because snap core in ubuntu 22.04 and 22.10 don’t have the correct libstdc++.so.6 installed:

sudo strings /snap/core/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_DEBUG_MESSAGE_LENGTH

As you can see GLIBCXX_3.4.26 is not there.

The correct fix is the one described by @filfreire here and bump the core base.

Same issue on 5.15.81-1-MANJARO And it’s a bit strange because I have required version of lib on my machine.

Snap:

image

Errors on startup:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /run/user/1000/snap.insomnia/.org.chromium.Chromium.hEUrZp)
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
    at Module._extensions..node (node:internal/modules/cjs/loader:1226:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2049)
    at Module.load (node:internal/modules/cjs/loader:1011:32)
    at Module._load (node:internal/modules/cjs/loader:846:12)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/snap/insomnia/184/resources/app.asar/node_modules/@getinsomnia/node-libcurl/dist/Easy.js:5:18)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)

ENV:

image

+1 on Ubuntu 20.04.5 LTS

Downgrading worked!

.deb installation works fine.