insomnium
insomnium copied to clipboard
Missing Dependancy
Expected Behavior
Application to load
Actual Behavior
Application hangs
Reproduction Steps
- Install deb package (0.1.3, 0.2.2, 0.2.3-a)
- After installation tried to start application no error or warning.
- Tried to start using the cli
- Received this error message:
-
A JavaScript error occurred in the main process Uncaught Exception: Error: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.32' not found (required by /tmp/.org.chromium.Chromium.BX2WUO) at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1869) at Module._extensions..node (node:internal/modules/cjs/loader:1354:18) at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2096) at Module.load (node:internal/modules/cjs/loader:1124:32) at Module._load (node:internal/modules/cjs/loader:965:12) at f._load (node:electron/js2c/asar_bundle:2:13377) at Module.require (node:internal/modules/cjs/loader:1148:19) at require (node:internal/modules/cjs/helpers:110:18) at Object.(/opt/Insomnium/resources/app.asar/node_modules/@getinsomnia/node-libcurl/dist/Easy.js:5:18) at Module._compile (node:internal/modules/cjs/loader:1269:14) MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
`
Is there an existing issue for this?
- [X] I have searched the issue tracker for this problem.
Additional Information
The application doesn't close or crash it just sits in memory so it appears to be waiting for some input.
Insomnium Version
0.1.3, 0.2.2, 0.2.3-a
What operating system are you using?
Other Linux
Operating System Version
Debian 11
Installation method
dpkg
Last Known Working Insomnium version
n/a
got this error on Ubuntu 20.04 as well. Looks like the version that runs on Ubuntu 20 is glibc 2.31 and not 2.32. As this is a core lib, it's really best not to mess with it on the system level. Might be a way to specify a custom-compiled version to chromium though...
@utdream @razzam21:
The Bad News:
This is actually an upstream issue, and affects insomnia >= 2023.4.0, so before the merge. I decided to take a look today, to finally transition across as I'm still running Ubuntu 20.04LTS, and this looks to be related to the @get-insomnia/node-libcurl
package bumping their glibc dependency past that which is installed by default in a recent release, as per the stack trace below:
Stack Trace
[app] App threw an error during load
[app] Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/scottco/Documents.local/git-repos/insomnium/node_modules/@getinsomnia/node-libcurl/lib/binding/node_libcurl.node)
[app] at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1869)
[app] at Module._extensions..node (node:internal/modules/cjs/loader:1354:18)
[app] at Object.func [as .node] (node:electron/js2c/asar_bundle:2:1869)
[app] at Module.load (node:internal/modules/cjs/loader:1124:32)
[app] at Module._load (node:internal/modules/cjs/loader:965:12)
[app] at f._load (node:electron/js2c/asar_bundle:2:13377)
[app] at Module.require (node:internal/modules/cjs/loader:1148:19)
[app] at require (node:internal/modules/cjs/helpers:110:18)
[app] at Object.<anonymous> (/home/scottco/Documents.local/git-repos/insomnium/node_modules/@getinsomnia/node-libcurl/dist/Easy.js:5:18)
[app] at Module._compile (node:internal/modules/cjs/loader:1269:14)
[app] A JavaScript error occurred in the main process
[app] Uncaught Exception:
[app] Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/scottco/Documents.local/git-repos/insomnium/node_modules/@getinsomnia/node-libcurl/lib/binding/node_libcurl.node)
[app] at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1869)
[app] at Module._extensions..node (node:internal/modules/cjs/loader:1354:18)
[app] at Object.func [as .node] (node:electron/js2c/asar_bundle:2:1869)
[app] at Module.load (node:internal/modules/cjs/loader:1124:32)
[app] at Module._load (node:internal/modules/cjs/loader:965:12)
[app] at f._load (node:electron/js2c/asar_bundle:2:13377)
[app] at Module.require (node:internal/modules/cjs/loader:1148:19)
[app] at require (node:internal/modules/cjs/helpers:110:18)
[app] at Object.<anonymous> (/home/scottco/Documents.local/git-repos/insomnium/node_modules/@getinsomnia/node-libcurl/dist/Easy.js:5:18)
[app] at Module._compile (node:internal/modules/cjs/loader:1269:14)
@archywillhe - You can replicate this in dev, if you have an ubuntu 20.04 machine lying around. Just running npm run dev
will throw this error, despite all linting, type-checking and unit testing passing. It seems the tests that were inherited from upstream don't actually open the program and do integration tests at all.
The Good News
It's an easy fix. You can simply force the node modules to build from source, as documented here, to include the correct libraries.
For those following along, the procedure is as follows:
This assumes a clean, fresh install of Ubuntu 20.04 and little to no knowledge of node.js, so should be easy to follow along, and will get you from scratch to packages you can install as an upgrade to the current packages:
- Open a terminal window, and install the dependencies
sudo apt update && sudo apt install -y git curl build-essential rpm autoconf make g++ gcc libcurl4-openssl-dev libssl-dev libyaml-dev libreadline-dev python3 python3-pip
(may need to come back to this) - Clone insomnium into your Downloads directory (this can be anywhere):
cd ~/Downloads && git clone https://github.com/ArchGPT/insomnium.git && cd insomnium
- Install node.js. If you already have node installed, and are using a package manager, the require version is 18.18.2, and You can skip to the next bit.
If you don't have a package manager installed, you can follow the steps below. I use asdf, as I use many other languages, but you can use whatever is comfortable for you if you don't want to use asdf:`asdf` install steps
To install asdf, and the correct nodejs version, run the following as a **non-root** user, and inside of the insomnium directory you've just created:
If all went well, `node -v` should output `18.18.2`.git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1 echo "legacy_version_file = yes" >> $HOME/.asdfrc echo '. "$HOME/.asdf/asdf.sh"' >> $HOME/.bashrc echo '. "$HOME/.asdf/completions/asdf.bash"' >> $HOME/.bashrc source $HOME/.bashrc asdf plugin add nodejs asdf install node -v
- Tell npm to build all modules from source:
echo "build_from_source=true" >> .npmrc
- Bump the version, so that apt/dpkg know that it's a different package:
npm --workspaces version "0.2.3-hotfix"
- Install the modules:
npm ci
- Build the releases:
npm run app-package --max_old_space_size=6144
. This will take a while, so be patient with this bit. This will create all of the releases, so you can use the snap or AppImage binaries if you like, But I choose to usedeb
packages by default. - Install the package:
sudo apt install ./packages/insomnia/dist/Insomnium.Core-0.2.3-hotfix.deb
- Check that all installed properly:
insomnium
. - Click on
Help > About
in the title bar, and you should see that the version is now Insomnium 0.2.3-hotfix, and will function as normal, including the desktop icon in the launcher. - Profit.
This should fix the issue of it not loading on Ubuntu =< 21.10. It's worth noting, that I'm not a node.js dev, so I'm unaware of the implications of building all packages from source in the main repository, but am happy to submit a PR for this, if you think it would help @archywillhe. Perhaps some integration tests would be worthwile, as well?
@CodingMomentum Awesome. Have family obligations over the next few days due to a US holiday but will check it out shortly. Thank you!
This seems to work at first, but once I try to actually execute a request, it throws Unknown option given. First argument must be the option internal id or the option name. You can use the Curl.option constants.
at me.