Error during solidity smart contract deployment : Uncaught Error: Callback was already called - ethereum

Uncaught Error: Callback was already called.
at /home/blockchain/master/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36
at WriteStream. (node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17)
at WriteStream.destroy (node_modules/level-ws/level-ws.js:140:8)
at finish (internal/streams/writable.js:670:14)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at runNextTicks (internal/process/task_queues.js:62:3)
at processImmediate (internal/timers.js:434:9)

Found out this to be a problem with node v14.x and ganache-cli v6.12.2 (ganache-core: 2.13.2).
Installing node v13.9.0 solved the issue for me.

in my case, reinstalling ganache-cli fixed it for me.

Install the latest version 7.0.3 of ganache instead ganache-cli
npm install --save-dev ganache
in code just use
const ganache = require('ganache');
const web3 = new Web3(ganache.provider());

Related

error { code: -32000, message: 'invalid sender' } while deploying a solidity contract to rinkeby test network

Getting following error while deploying a solidity contract to rinkeby test network:
error { code: -32000, message: 'invalid sender' }
In my case, the error was due to the updated version of #truffle/hdwallet-provider
I had to downgrade it to version 1.2.3 to get it working.
npm uninstall #truffle/hdwallet-provider
npm install #truffle/hdwallet-provider#1.2.3

Truffle init failing

I'm trying to run truffle in a linux virtual machine with a windows 10 host. When I run truffle init this is the error that I get...
DownloadingError: write EPROTO 140718189083520:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:827:
at _errnoException (util.js:1022:11)
at WriteWrap.afterWrite (net.js:880:14)
I'm not really sure what's causing the error or how to solve it. Any advice would be appreciated. Thanks in advance!
This seems to be an issue with proxies.
I suggest you update your node environment to at least v10.16.0.
If that doesn't work try the answers to this other post.
npm gets stuck on fetchMetadata -> network

Unable to compile the smart contract using truffle compile command

I have created a project using truffle command. For that I am using below details in Myfile.sol and Migration.sol file:
pragma solidity 0.4.19
In truffle-config.js:
development:{
host:"127.0.0.1",
port: 8585,
network_id: "*",
},
compilers:{
solc:{
version: "0.4.19",
}
}
Issue: truffle compile Could not find suitable configuration file Truffle v5.0.11 (core: 5.0.11) Node v11.6.0
Tried using truffle migrate but getting the same response.

Error migrating truffle rinkeby [Cannot read property 'bind' of undefined]

I'm trying to deploy/migrate contract to rinkeby network, while using command:
truffle deploy --reset --network=rinkeby
It loads the keys and afterwards throws error:
C:\Users\marti\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-provider\wrapper.js:26
var originalSendAsync = provider.sendAsync.bind(provider);
TypeError: Cannot read property 'bind' of undefined
I'm able to run truffle develop without any issues
I'm also using:
truffle-hdwallet-provider
zappelin-solidity
Okay so the issue was comming from the truffle-hdwallet-provider version.
changing the ver from : 1.0.0-web3one.2
to : 0.0.6
solved the issue

angular-route error Arguments to path.json must be strings

I am having a hard time figuring out what this error means.
I have the following bower.json:
...
"dependencies":{
"angular-route":"~1.2.18",
"angular":"~1.2.18"
}
Upon installing my bower packages through bower install I get the following error:
bower angular-route#~1.2.20 error Arguments to path.join must be strings
Stack trace:
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at GitHubResolver._checkout (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/lib/core/resolvers/GitHubResolver.js:54:21)
at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/lib/core/resolvers/GitResolver.js:69:21
at _fulfilled (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:760:13)
at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:574:44
at flush (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:108:17)
Console trace:
Trace
at StandardRenderer.error (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/lib/renderers/StandardRenderer.js:72:17)
at Logger.<anonymous> (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/bin/bower:111:22)
at Logger.EventEmitter.emit (events.js:95:17)
at Logger.emit (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/lib/commands/index.js:40:20
at _rejected (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:797:24)
at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:823:30
at Promise.when (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:1035:31)
at Promise.promise.promiseDispatch (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:741:41)
at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:557:44
System info:
Bower version: 1.3.7
Node version: 0.10.26
OS: Linux 3.13.0-29-generic x64
Now, I have to mention that I have done the same thing for about a week, and everything was working correctly, with exactly the same setup.
I have noticed that https://github.com/angular/angular.js has released a new version 1.2.20 recently, but even installing that I get the same error.
Some context: I am using nodejs, express and angular in my application. I can provide more info if needed (e.g., package.json, main server file).
Any help would be highly appreciated.
See the answer here: Bower - error when installing package "Arguments to path.join must be strings"
Fix: bower cache clean and update to Bower 1.3.8.