0

I am trying to deploy a Smart contract using truffle / web3js. The script has been deploying smart contracts for months and I am suddenly facing this error:

error: uncaughtException: Unknown error when sending transaction.
2021-03-22T03:19:36.912282+00:00 app[web.2]: Error(Ethkey(InvalidSignature), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })
2021-03-22T03:19:36.912283+00:00 app[web.2]: Error: Unknown error when sending transaction.
2021-03-22T03:19:36.912283+00:00 app[web.2]: Error(Ethkey(InvalidSignature), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })
2021-03-22T03:19:36.912283+00:00 app[web.2]: at Object._fireError (/cache/node_modules/web3-utils/lib/index.js:50:17)
2021-03-22T03:19:36.912284+00:00 app[web.2]: at sendTxCallback (/cache/node_modules/web3-core-method/lib/index.js:540:30)
2021-03-22T03:19:36.912284+00:00 app[web.2]: at /cache/node_modules/web3-core-requestmanager/lib/index.js:300:20
2021-03-22T03:19:36.912285+00:00 app[web.2]: at /cache/node_modules/@trufflesuite/web3-provider-engine/index.js:238:9
2021-03-22T03:19:36.912285+00:00 app[web.2]: at /cache/node_modules/async/internal/once.js:12:16
2021-03-22T03:19:36.912286+00:00 app[web.2]: at replenish (/cache/node_modules/async/internal/eachOfLimit.js:61:25)
2021-03-22T03:19:36.912286+00:00 app[web.2]: at /cache/node_modules/async/internal/eachOfLimit.js:71:9
2021-03-22T03:19:36.912286+00:00 app[web.2]: at eachLimit (/cache/node_modules/async/eachLimit.js:43:36)
2021-03-22T03:19:36.912287+00:00 app[web.2]: at /cache/node_modules/async/internal/doLimit.js:9:16
2021-03-22T03:19:36.912287+00:00 app[web.2]: at end (/cache/node_modules/@trufflesuite/web3-provider-engine/index.js:217:5)
2021-03-22T03:19:36.912288+00:00 app[web.2]: at /cache/node_modules/async/internal/once.js:12:16
2021-03-22T03:19:36.912288+00:00 app[web.2]: at next (/cache/node_modules/async/waterfall.js:21:29)
2021-03-22T03:19:36.912288+00:00 app[web.2]: at /cache/node_modules/async/internal/onlyOnce.js:12:16
2021-03-22T03:19:36.912289+00:00 app[web.2]: at /cache/node_modules/async/internal/once.js:12:16
2021-03-22T03:19:36.912289+00:00 app[web.2]: at next (/cache/node_modules/async/waterfall.js:21:29)
2021-03-22T03:19:36.912299+00:00 app[web.2]: at /cache/node_modules/async/internal/onlyOnce.js:12:16

The funny part is that I am facing this issue only when deploying from my heroku server. When deploying from local (using docker) there is no issue.

I have checked that al the env are properly stored in heroku.

I have cleared the node_modules cache on heroku and confirmed that the web3js version is 1.3.4.

Cannot seem to figure out what the error is and why.

3
  • Do u sign the transactions ? Or are ur local (docker) accounts unlocked :/ – Majd TL Mar 29 at 9:55
  • I am using the truffleHDWalletProvider to unlock the accounts. – AmateurDev Mar 30 at 0:26
  • 1
    Show the code. What are the dependencies versions used? Also latest @truffle/hdwallet-provider@1.2.3 is buggy try downgrading, see github.com/trufflesuite/truffle/issues/3946. – Ismael Mar 30 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.