insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Installation on ARM64 - Missing Dependency (linux-arm64)

Open jncsotk30 opened this issue 3 years ago • 3 comments

Expected Behavior

I attempted to install insomnia from the AUR on arch linux, but the installation fails due to an unavailable http resource (linux-arm64). I also tried bootstrapping manually from the cloned repo and it yielded the same behavior.

Actual Behavior

Hello,

I'm attempting to install insomnia from the AUR on my linux setup using yay(package manager). I was using nodejs-v19.x, but the bootstrap script warned it was too new and haulted. I downgraded from 19.x to 16.19.0(gallium) using nvm and tried again. The bootstrap script passed the environment checks, but haulted again due to what appears to be a missing dependency. It wasn't able to pull down linux-arm64 from a web resource.

Error: response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc-tools/v1.12.3/linux-arm64.tar.gz

I'm running arch linux 6.1.0 and attempting to install insomnia marked insomnia-core-2022.7.5 according to the logs.

Reproduction Steps

Installation from AUR using yay

  1. Open terminal
  2. Type yay -Sy insomnia
  3. Wait for installation to complete. It should fail looking for linux-arm64 dependency

Installation from cloned repo

  1. cd <cloned-repo-dir>
  2. npm run bootstrap
  3. Installation should fail due to missing dependency

Is there an existing issue for this?

Additional Information

N/A

Insomnia Version

2022.7.5

What operating system are you using?

Other Linux

Operating System Version

6.1.0

Installation method

yay package manager / cloned repo

Last Known Working Insomnia version

N/A - Fresh installation

jncsotk30 avatar Feb 14 '23 14:02 jncsotk30

Log file details...

...
674 timing build:link:node_modules/mocha Completed in 44ms
675 timing build:link:node_modules/prettier Completed in 44ms
676 timing build:link:node_modules/nopt Completed in 44ms
677 timing build:link:node_modules/semver Completed in 44ms
678 timing build:link:node_modules/resolve Completed in 44ms
679 timing build:link:node_modules/rimraf Completed in 44ms
680 timing build:link:node_modules/update-browserslist-db Completed in 44ms
681 timing build:link:node_modules/ts-node Completed in 44ms
682 timing build:link:node_modules/uglify-js Completed in 44ms
683 timing build:link:node_modules/which Completed in 44ms
684 timing build:link:node_modules/typescript Completed in 44ms
685 timing build:link:node_modules/uuid Completed in 44ms
686 timing build:link:node_modules/mocha/node_modules/which Completed in 43ms
687 timing build:link Completed in 46ms
688 info run [email protected] install node_modules/grpc-tools node-pre-gyp install
689 info run [email protected] install { code: 1, signal: null }
690 timing reify:rollback:createSparse Completed in 560ms
691 timing reify:rollback:retireShallow Completed in 0ms
692 timing command:install Completed in 11227ms
693 verbose stack Error: command failed
693 verbose stack     at ChildProcess.<anonymous> (/home/<my-username>/.cache/yay/insomnia/src/insomnia-core-2022.7.5/.nvm/versions/node/v16.17.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
693 verbose stack     at ChildProcess.emit (node:events:513:28)
693 verbose stack     at maybeClose (node:internal/child_process:1093:16)
693 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
694 verbose pkgid [email protected]
695 verbose cwd /home/<my-username>/.npm/_cacache/tmp/git-clone3bSRDW
696 verbose Linux 6.1.0-asahi-2-2-edge-ARCH
697 verbose node v16.17.0
698 verbose npm  v8.15.0
699 error code 1
700 error path /home/<my-username>/.npm/_cacache/tmp/git-clone3bSRDW/node_modules/grpc-tools
701 error command failed
702 error command sh /tmp/install-f0a1bab9.sh
703 error response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc-tools/v1.12.3/linux-arm64.tar.gz
704 error node-pre-gyp info it worked if it ends with ok
704 error node-pre-gyp info using [email protected]
704 error node-pre-gyp info using [email protected] | linux | arm64
704 error node-pre-gyp info check checked for "/home/<my-username>/.npm/_cacache/tmp/git-clone3bSRDW/node_modules/grpc-tools/bin/grpc_tools.node" (not found)
704 error node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc-tools/v1.12.3/linux-arm64.tar.gz
704 error node-pre-gyp ERR! install response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc-tools/v1.12.3/linux-arm64.tar.gz 
704 error node-pre-gyp ERR! install error 
704 error node-pre-gyp ERR! stack Error: response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc-tools/v1.12.3/linux-arm64.tar.gz
704 error node-pre-gyp ERR! stack     at /home/<my-username>/.npm/_cacache/tmp/git-clone3bSRDW/node_modules/@mapbox/node-pre-gyp/lib/install.js:67:15
704 error node-pre-gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:96:5)
704 error node-pre-gyp ERR! System Linux 6.1.0-asahi-2-2-edge-ARCH
704 error node-pre-gyp ERR! command "/home/<my-username>/.cache/yay/insomnia/src/insomnia-core-2022.7.5/.nvm/versions/node/v16.17.0/bin/node" "/home/<my-username>/.npm/_cacache/tmp/git-clone3bSRDW/node_modules/.bin/node-pre-gyp" "install"
704 error node-pre-gyp ERR! cwd /home/<my-username>/.npm/_cacache/tmp/git-clone3bSRDW/node_modules/grpc-tools
704 error node-pre-gyp ERR! node -v v16.17.0
704 error node-pre-gyp ERR! node-pre-gyp -v v1.0.10
704 error node-pre-gyp ERR! not ok
705 verbose exit 1
706 timing npm Completed in 11260ms
707 verbose unfinished npm timer reify 1676383236452
708 verbose unfinished npm timer reify:build 1676383246734
709 verbose unfinished npm timer build 1676383246737
710 verbose unfinished npm timer build:deps 1676383246737
711 verbose unfinished npm timer build:run:install 1676383246906
712 verbose unfinished npm timer build:run:install:node_modules/grpc-tools 1676383246906
713 verbose code 1
714 error A complete log of this run can be found in:
714 error     /home/<my-username>/.npm/_logs/2023-02-14T14_00_36_419Z-debug-0.log

jncsotk30 avatar Feb 14 '23 14:02 jncsotk30

I have run into the same issue, it seems grpc-tools started shipping linux-arm64 binaries since v1.12.4 and the Kong's fork of grpc-reflection-js uses v1.12.3, bumping the version there and bumping version of the fork in insomnia should fix this issue.

jkbz64 avatar Mar 08 '23 20:03 jkbz64

I have run into the same issue, it seems grpc-tools started shipping linux-arm64 binaries since v1.12.4 and the Kong's fork of grpc-reflection-js uses v1.12.3, bumping the version there and bumping version of the fork in insomnia should fix this issue.

Hi @jkbz64, I have no experience with AUR and arch, but bought a nice Pinetab2 running arch on arm64 and need to use Insomnia. Could you please explain how to bump the grpc-tools binary version in order to build the package? Any help would be greatly appreciated.

Regards, Nicolas

naxmon avatar Jun 13 '23 14:06 naxmon

I don't have arm64 but if someone here who does can confirm that PR #6158 works I can get it into the next release. Thanks!

jackkav avatar Jul 16 '23 08:07 jackkav

I don't have arm64 but if someone here who does can confirm that PR #6158 works I can get it into the next release. Thanks!

Can confirm this has worked for me, compiling process went smoothly and it runs successfully (in dev mode).

jkbz64 avatar Jul 16 '23 08:07 jkbz64

While trying to package it with npm run app-package (not sure if it's intended way?) I'm getting ../insomnia/packages/insomnia/node_modules/app-builder-bin/linux/arm64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE Exit code: 1.

jkbz64 avatar Jul 16 '23 09:07 jkbz64

You may need to tinker with the electron-builder.js file, perhaps @filfreire can shed some light.

jackkav avatar Jul 16 '23 18:07 jackkav

Hey folks, we don't have Linux ARM64 support for now, but perhaps we can assist in getting builds working.

  • In the past one option that has helped compiling Insomnia for some distros has been to edit packages/insomnia/electron-builder.config.js and adding buildDependenciesFromSource: true
  • try to bump grpc-reflection-js version on every package.json that has the similar to what @jkbz64 mentioned https://github.com/Kong/insomnia/issues/5777#issuecomment-1460774490

filfreire avatar Jul 17 '23 16:07 filfreire

Hi @filfreire and @jackkav, I was able finally to install Insomnia in my Pinetab2 (AARCH64) using "yay -S insomnia" and editing the packages.json in the downloaded source folder (.cache/yay/insomnia/packages) using the change in #6158. Thanks for your valuable help!

Regards from Colombia

naxmon avatar Jul 18 '23 19:07 naxmon

Should be able to avoid that last step once we have a full release out 🤞

jackkav avatar Jul 18 '23 22:07 jackkav

Hey all,

What's the anticipated timing on an arm64 release? Would love to get this running on Ubuntu on an arm64 chip.

Thanks for all of the work!!

tc-mccarthy avatar Aug 05 '23 00:08 tc-mccarthy

@tc-mccarthy It should already work if you use the beta version.

jackkav avatar Aug 06 '23 15:08 jackkav

@jackkav thanks! I am trying to use the beta's deb file but ubuntu is throwing an error that the architecture doesn't match. (https://github.com/Kong/insomnia/releases/tag/core%402023.5.0-beta.10). I also tried pulling down the tarball and running the insomnia executable within it but it complains it can’t find /lib64/x86_64.so — I think I’m probably just doing something wrong but I’m pretty new to arm64 architecture so any guidance would be appreciated.

tc-mccarthy avatar Aug 10 '23 03:08 tc-mccarthy

@jackkav quick follow up. I pulled the git repo, switched to [email protected] and have tried npm run app-build && npm run app-package.

It yields

Could not open '/lib/ld-linux.so.2': No such file or directory

tc-mccarthy avatar Aug 11 '23 02:08 tc-mccarthy

could be related to your glibc version, make sure you're on a recent version of Ubuntu, this isn't really an insomnia issue, its electron or electron-builder.

jackkav avatar Aug 11 '23 08:08 jackkav

@jackkav just wanted to reach out and thank you for your help on this. It ended up being an issue with electron-builder, just like you said. Evidently there is a known issue where electron-builder fetches the x86 version of the FPM package, which it uses for compiling debs. I was able to install ruby-dev and then the fpm gem natively into my system and then exported USE_SYSTEM_FPM=true, which instructs electron-builder to use the gem instead of the node_module, which allowed everything to compile as needed. HOURS of research and trial and error. but I have it running on arm64 now!

tc-mccarthy avatar Aug 12 '23 04:08 tc-mccarthy