ethereumjs / ethereumjs-abi

[DEPRECATED] Decoder and encoder for the Ethereum ABI
MIT License
299 stars 162 forks source link

Error can not install #67

Closed zeroXBami closed 1 month ago

zeroXBami commented 6 years ago

Hi,

I am trying to install ethereumjs-abi but always got this issues: npm ERR! code 1 npm ERR! Command failed: /usr/local/bin/git clone -q https://github.com/ethereumjs/ethereumjs-abi.git /Users/trnhgquan/.npm/_cacache/tmp/git-clone-e6ae2501 npm ERR! /Users/trnhgquan/.npm/_cacache/tmp/git-clone-e6ae2501/.git: Permission denied npm ERR!

npm ERR! A complete log of this run can be found in: npm ERR! /Users/trnhgquan/.npm/_logs/2018-08-31T16_15_05_558Z-debug.log

Does anyone here can help me to fix?

Thanks.

holgerd77 commented 6 years ago

You doesn't seem to have the proper rights to write in your given directory. This is nevertheless no abi library related issue, will close.

bloodybit commented 4 years ago

I faced the same problem and apparently there is a file that needs to be downloaded from git in "git ssh mode" not via https. Adding my github identity with ssh-add solved my issue. I don't think the pubkey is actually checked, it just needs to be non null.

Resoguy commented 3 years ago

I am getting this Permission denied error on cypress github action while installing dependencies with the npm ci command

This is where the error occurs /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git

This error makes the project untestable on github action. Any idea to how solve?

Here is the full log:

/usr/local/bin/npm ci
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git
npm ERR! 
npm ERR! Warning: Permanently added the RSA host key for IP address '140.82.113.3' to the list of known hosts.
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! 
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-03-26T17_17_00_879Z-debug.log
Error: The process '/usr/local/bin/npm' failed with exit code 1
Andrea-Dispe commented 3 years ago

I am getting this Permission denied error on cypress github action while installing dependencies with the npm ci command

This is where the error occurs /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git

This error makes the project untestable on github action. Any idea to how solve?

Here is the full log:

/usr/local/bin/npm ci
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git
npm ERR! 
npm ERR! Warning: Permanently added the RSA host key for IP address '140.82.113.3' to the list of known hosts.
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! 
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-03-26T17_17_00_879Z-debug.log
Error: The process '/usr/local/bin/npm' failed with exit code 1

I am getting the same error on Mac and Ubuntu. Have you solved this issue @Resoguy

bloodybit commented 3 years ago

I think you can solve it this way: https://github.com/ethereumjs/ethereumjs-abi/issues/67#issuecomment-681944008

Andrea-Dispe commented 3 years ago

I think you can solve it this way: #67 (comment)

Thank you but I was able to solve this by updating npm to the latest version.

RadioJulius commented 3 years ago

I've noticed this occasionally happen when adding a new package with yarn. It will revert from the working:

"resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"

to the non-working:

"resolved": "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0"

Manually switching back fixes this headache for me.

knzeng-e commented 3 years ago

I've noticed this occasionally happen when adding a new package with yarn. It will revert from the working:

"resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"

to the non-working:

"resolved": "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0"

Manually switching back fixes this headache for me.

+1 this comment resolved my issue. Thanks !

preconfxsd commented 3 years ago

I faced the same problem and apparently there is a file that needs to be downloaded from git in "git ssh mode" not via https. Adding my github identity with ssh-add solved my issue. I don't think the pubkey is actually checked, it just needs to be non null.

Can you tell me how did you add your identity? Should I add it into workflow yaml file?

creazy231 commented 3 years ago

Same problem using Vercel Deployment

valle-xyz commented 3 years ago

I face this issue now.

holgerd77 commented 3 years ago

@Valentin-Seehausen hi there, I did a test clone + npm i on https://github.com/effectai/force-frontend-new - assuming that that's the repository from where your issue originated - but I couldn't even find the dependency, npm ls ethereumjs-abi is giving me nothing.

Can you give a short context description where the ethereumjs-abi dependency is actually coming from in your context?

holgerd77 commented 3 years ago

And for everyone reading along here: while we have deprecated this package if there is something with reasonable effort we can do here from our side we can very well do a bugfix release here.

It's generally helpful if you provide more context on where are you getting your errors. What Node version are you using? Are you using the ethereumjs-abi dependency directly or is it installed via another dependency? Optimally provide some reproduceable code example (or eventually some CLI command lineup in this context).

Thanks!

Will reopen this issue for now until this is settled in some way.

djmbritt commented 3 years ago

We also encountered this issue last week, it was a deprecated dependency from WalletConnect. This was still the 1.0 version of WalletConnect. We dropped support for WalletConnect for now.

holgerd77 commented 3 years ago

Just to confirm: are there more people here where this problem is coming from the WalletConnect library?

valle-xyz commented 3 years ago

Yes, it originated from the WalletConnect library. I solved the issue by deleting my yarn.lock and reinstall. Sorry that I cannot help to reproduce it. Super service, thanks a lot!

Kamikozz commented 2 years ago

@holgerd77

image

└─┬ @amfi/connect-wallet@1.1.21
  └─┬ @walletconnect/web3-provider@1.7.1
    └─┬ web3-provider-engine@16.0.1
      └─┬ eth-sig-util@1.4.2
        └── ethereumjs-abi@0.6.8 (git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0)

I have just created new app on heroku, then made a setup via github repository to deploy, and then it showed me these logs

Spoiler warning ``` -----> Building on the Heroku-20 stack -----> Using buildpack: mars/create-react-app -----> React.js (create-react-app) multi app detected =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git =====> Detected Framework: Multipack =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git =====> Detected Framework: Node.js -----> Creating runtime environment NPM_CONFIG_LOGLEVEL=error NODE_VERBOSE=false NODE_ENV=production NODE_MODULES_CACHE=true -----> Installing binaries engines.node (package.json): unspecified engines.npm (package.json): unspecified (use default) Resolving node version 14.x... Downloading and installing node 14.18.3... Using default npm version: 6.14.15 -----> Restoring cache - node_modules -----> Installing dependencies Installing node modules npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git npm ERR! npm ERR! Host key verification failed. npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! and the repository exists. npm ERR! npm ERR! exited with error code: 128 npm ERR! A complete log of this run can be found in: npm ERR! /tmp/npmcache.3QAnL/_logs/2022-01-19T07_02_45_160Z-debug.log -----> Build failed We're sorry this build is failing! You can troubleshoot common issues here: https://devcenter.heroku.com/articles/troubleshooting-node-deploys Some possible problems: - Node version not specified in package.json https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version Love, Heroku ! Push rejected, failed to compile React.js (create-react-app) multi app. ! Push failed ```

No matter what it says, there is no problem with buildpack, it's just something that is here git ls-remote -h -t ssh://git@github.com/ethereumjs/ethereumjs-abi.git

Anyway, you can try this command locally and it will show you this error.

But, if I run my project locally, everything is working (this could be the GitHub policy about SSH, dunno)

// SOLVED: using yarn instead of npm will give you the pleasure

nbeuchat commented 2 years ago

In my case, the problem comes from the @web3-onboard/walletlink package.

ayudh37 commented 2 years ago

I had this issue as well, using when using @walletconnect/web3-provider and using npm as the package manager.

I deleted package-lock.json and node_modules and used yarn to install the modules. Verified that the resolve url for the dependency ethereumjs-abi begins with https:// instead of git+ssh:// in yarn.lock and everything works now

mdarche commented 2 years ago

For anybody struggling with this issue using pnpm, I fixed by adding an override to my root package.json:

"pnpm": {
    "overrides": {
      "ethereumjs-abi": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"
    }
  }

Reference: https://pnpm.io/package_json#pnpmoverrides

georgeperry1 commented 2 years ago

I was having this issue specifically when installing and deploying within an AWS Amplify build pipeline. Of the suggested fixes, moving from npm to yarn was the only thing that solved it for me.

akorede12 commented 2 years ago

Same problem using Vercel Deployment

Yes I'm having this issue now trying to deploy my project on vercel. how do you solve the issue when deploying to vercel?

Hazelwu2 commented 2 years ago

Same problem using Vercel Deployment

Yes I'm having this issue now trying to deploy my project on vercel. how do you solve the issue when deploying to vercel?

I'm using vercel cicd to deploy my project, has the same problem. remove package.lock & yarn.lock, and yarn install reinstall again, that's work for me!

rstellar commented 2 years ago

Having this issue using npm ci via Cyclic.sh

zubin-madon commented 2 years ago

"resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"

I am facing this issue while trying to build my app on Netlify. https://app.netlify.com/sites/effortless-cocada-30ceed/deploys/62c019e951f0c30008112b2d

In my packagelock.json I see the following:

"node_modules/ethereumjs-abi": {
      "version": "0.6.8",
      "resolved": "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0",
      "license": "MIT",
      "dependencies": {
        "bn.js": "^4.11.8",
        "ethereumjs-util": "^6.0.0"
      }
WanderKey commented 2 years ago

I faced this issue while using yarn to get the dependences, I disabled SSL Verification by running: git config --global http.sslVerify "false" and it worked! Erro (2)

illepic commented 2 years ago

For yarn users, add this to the root of package.json:

  "resolutions": {
    "ethereumjs-abi": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"
  }
selmi-karim commented 2 years ago

same issue on Digital ocean.

lucasuema commented 2 years ago

I've noticed this occasionally happen when adding a new package with yarn. It will revert from the working:

"resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"

to the non-working:

"resolved": "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0"

Manually switching back fixes this headache for me.

I ❤️ u

0xnogo commented 2 years ago

Had the issue using vercel.

Removed yarn.lock, package-lock.json and used yarn. Dependencies fetching is now working.

sztadii commented 2 years ago

For yarn users, add this to the root of package.json:

  "resolutions": {
    "ethereumjs-abi": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"
  }

If someone is using yarn workspaces I suggest adding it to the main package.json file. The children package.json files did not work for me.

sbinft-hiwatashi commented 2 years ago

same issue from wallet connect modules on my github actions.

sbinft-hiwatashi commented 2 years ago

I solved this issue for following. Remove "resolved": "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" from my yarn.lock and re-run yean install, then yarn.lock was updated to git+https url.

It's works for me, but I don't know if this is right way.

dcsan commented 2 years ago

did anyone figure out how to fix this when you're on a vercel env, where you can't easily add an .ssh key? my dependency is coming from wagmi.sh

which i have updated to the latest:

$ yarn why ethereumjs-abi
yarn why v1.22.19
[1/4] 🤔  Why do we have the module "ethereumjs-abi"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "ethereumjs-abi@0.6.8"
info Reasons this module exists
   - "wagmi#@coinbase#wallet-sdk#eth-json-rpc-filters#eth-json-rpc-middleware#eth-sig-util" depends on it
   - Hoisted from "wagmi#@coinbase#wallet-sdk#eth-json-rpc-filters#eth-json-rpc-middleware#eth-sig-util#ethereumjs-abi"
info Disk size without dependencies: "456KB"
info Disk size with unique dependencies: "780KB"
info Disk size with transitive dependencies: "13.48MB"
info Number of shared dependencies: 19
✨  Done in 0.22s.

FWIW the yarn.lock has these fields:

eth-sig-util@^1.4.2:
  version "1.4.2"
  resolved "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz"
  integrity sha512-iNZ576iTOGcfllftB73cPB5AN+XUQAT/T8xzsILsghXC1o8gJUqe3RHlcDqagu+biFpYQ61KQrZZJza8eRSYqw==
  dependencies:
    ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git"
    ethereumjs-util "^5.1.1"

"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git":
  version "0.6.8"
  resolved "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0"
  dependencies:
    bn.js "^4.11.8"
    ethereumjs-util "^6.0.0"

and this buggy fucking package has their git+ssh shit in there.

image

dcsan commented 2 years ago

ok so the solution of deleting the git+ssh entry and manually hacking the yarn.lock and reinstalling seems to work. but how fragile is this? what are the cases that will cause the yarn.lock to be completely rebuilt?

dcsan commented 2 years ago

also, what can we recommend upstream packages to do that depend on this? even tho this package is deprecated as of a year ago, it seems very recent other modules still depend on it.

my deps path:

this issue says in fact that coinbase/wallet is the RIGHT thing to use...

https://github.com/blocknative/web3-onboard/issues/885

holgerd77 commented 2 years ago

Hi there, we are very open to do a quick bugfix release on our side if this helps, even if this package is deprecated, I just haven't identified if we can do something on our side.

If you follow-up the dependency path and find the right place where to post the issue "on the other side" feel free to mention me, then we can coordinate on how to fix this and see if we can also do something from the EthereumJS side of things.

dcsan commented 2 years ago

thanks @holgerd77 someone tracked the deps tree here for wagmi. not sure how you could fix it at this end - can you replace the module/version and replace the git with https?

https://github.com/wagmi-dev/wagmi/discussions/1027

masterbd commented 2 years ago

What I've done to fix this on local and CI:

Replace in package-lock.json: "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git" or "ethereumjs-abi":"git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git" With: "ethereumjs-abi": "^0.6.8"

Replace in package-lock.json: "resolved": "git+https://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" or: "resolved": "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" With: "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"

Replace in package-lock.json

"ethereumjs-abi": {
      "version": "git+https://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0",
      "from": "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git"
      ....
}

With:

"ethereumjs-abi": {
      "version": "^0.6.8",
      "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz",
      ....
}
arshamg commented 2 years ago

Is there a non-fragile/definitive solution to this using npm?

eth0izzle commented 2 years ago

Yes @arshamg. Delete your package-lock.json and yarn.lock files then simply add the below to your package.json. This will work regardless of npm/yarn.

  "resolutions": {
    "ethereumjs-abi": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"
  },
arshamg commented 2 years ago

Thanks @eth0izzle

lazy1523 commented 2 years ago

Why this damn problem hasn't been solved and it's holding the crypto industry back

acolytec3 commented 2 years ago

Can someone on this thread who's encountered the issue provide an example repo where this issue occurs so I can reproduce locally? I've looked at the various dependencies in the stack that reference the old version of ethereumjs-abi that seems to be causing the issue and I'm not able to reproduce it. If I can indeed validate the issue (and which setup is causing it to break), I can try and work with whichever dependent module is causing things to break to update their deps. If I had to guess, I'd say it's most likely the eth-json-rpc-filters module since its most current version references older other libraries that in turn lead down to that git referenced version of ethereumjs-abi.

aahna-ashina commented 2 years ago

Solved by running yarn upgrade

lucasuema commented 2 years ago

Solved by running yarn upgrade

Thank you! 👹 - It solved it for me too.

LintonAchmad commented 2 years ago

Had the same issue, switching to yarn from npm did the trick.

1 - Install yarn : npm install -g yarn 2 - Delete package lock file from root of project. 3 - Run yarn in root of project.

algmir commented 1 year ago

I try it by aboved answers and can not solve it , it cost about me 1.5days. I use next , it worked, share the website to help others. npm i @truffle/hdwallet-provider@next https://stackoverflow.com/questions/71396470/cannot-install-npm-package-code-128-an-unknown-git-error-occurred

Soecka commented 1 year ago

For anybody struggling with this issue using pnpm, I fixed by adding an override to my root package.json:

"pnpm": {
    "overrides": {
      "ethereumjs-abi": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz"
    }
  }

Reference: https://pnpm.io/package_json#pnpmoverrides

I upgraded pnpm from 6.9 to 7.18 and then the bug was resolved

AllanBUSI commented 1 year ago

Même problème avec Vercel Deployment

Oui, j'ai ce problème en essayant de déployer mon projet sur vercel. comment résolvez-vous le problème lors du déploiement sur vercel ?

J'utilise Vercel Cicd pour déployer mon projet, j'ai le même problème. supprimer package.lock& yarn.lock, et yarn installréinstaller à nouveau, ça marche pour moi !

thanck you