web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Error: No privateKey given to the TransactionSigner.

Open dillonsvincent opened this issue 7 years ago • 14 comments

Description

Web3 react build throwing Error: No privateKey given to the TransactionSigner. Development on localhost is working fine.

File: web3-eth.umd.js

if (privateKey) {
_context.next = 2;
break;
}
throw new Error('No privateKey given to the TransactionSigner.');

Expected behavior

Actual behavior

Steps to reproduce the behavior

Reproduce

I created an example dapp to show the error happening, just open the console https://console.atra.io/app/1bebd277-7945-4cab-9178-d10255884f95

Gists

Versions

  • web3.js:
  • nodejs:
  • browser:
  • ethereum node:

dillonsvincent avatar Apr 03 '19 05:04 dillonsvincent

It's either an issue with the web3 build that gets deployed with npm run build or it's an issue with web3 giving access to the private key when I'm running on a domain.

dillonsvincent avatar Apr 03 '19 05:04 dillonsvincent

Link to the issues I opened with metamask https://github.com/MetaMask/metamask-extension/issues/6390

dillonsvincent avatar Apr 03 '19 05:04 dillonsvincent

Thanks for opening this issue! But this got already fixed and will be released this week.

nivida avatar Apr 03 '19 06:04 nivida

I pulled down the repo, built it, ran bootstrap and made system link to my project, then deployed it, still getting this error, was the fix merged into 1.0 yet?

dillonsvincent avatar Apr 03 '19 07:04 dillonsvincent

@nivida you don't happen to know if you're doing a release today? :)

dillonsvincent avatar Apr 03 '19 16:04 dillonsvincent

@nivida Any news on this?

IMO, any release that utterly break dapps should never be push to latest. At least pull this back so other developers don't have to spend full day trying to fix a known bug.

smiled0g avatar Apr 04 '19 09:04 smiled0g

Thanks, I was like WTF is this error.

Edit: I still have this error with 1.0.0-beta.52 😞

https://gametest.cryptoserval.io/

EddieOne avatar Apr 19 '19 21:04 EddieOne

@nivida will you make a release with this patch in it?

EddieOne avatar Apr 22 '19 20:04 EddieOne

It's already fixed in v1.0.0-beta.52

dillonsvincent avatar Apr 22 '19 20:04 dillonsvincent

I logged into the server and looked in the node_modules folder. It shows, v1.0.0-beta.52, so I'm not sure.

EddieOne avatar Apr 22 '19 22:04 EddieOne

@EddieOne Could you open a new issue with all the steps to reproduce it?

nivida avatar Apr 23 '19 09:04 nivida

I'm not sure, let me ask. Same definition as above. Locally everything works fine. Deploy it and get this No privateKey given to the TransactionSigner error.

Update: Just a build issue. Thanks for the help.

EddieOne avatar Apr 24 '19 03:04 EddieOne

@EddieOne could you provide some details on the build issue you faced? Having the same issue right now. How was this fixed?

raymogg avatar May 27 '19 23:05 raymogg

In my case, I forgot to rebuild webpack before deploying.

EddieOne avatar May 28 '19 00:05 EddieOne