ArchGPT / insomnium

Insomnium is a fast local API testing tool that is privacy-focused and 100% local. For testing GraphQL, REST, WebSockets and gRPC. This is a fork of Kong/insomnia
MIT License
3.33k stars 125 forks source link

Missing Dependancy #92

Open razzam21 opened 8 months ago

razzam21 commented 8 months ago

Expected Behavior

Application to load

Actual Behavior

Application hangs

Reproduction Steps

  1. Install deb package (0.1.3, 0.2.2, 0.2.3-a)
  2. After installation tried to start application no error or warning.
  3. Tried to start using the cli
  4. Received this error message:
  5. A JavaScript error occurred in the main process Uncaught Exception: Error: /lib/x86_64-linux-gnu/libc.so.6: versionGLIBC_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?

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

utdream commented 8 months ago

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

CodingMomentum commented 7 months ago

@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 ```shell [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. (/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. (/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:

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?

utdream commented 7 months ago

@CodingMomentum Awesome. Have family obligations over the next few days due to a US holiday but will check it out shortly. Thank you!

Chi-Yu commented 5 months ago

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.