Reproduce:
git clone [email protected]:skmgoldin/tcr.git
git checkout cd38e2666660c460083953d2f4c93c81aea4923b
npm i
npx truffle compile
That _works_. Now open the truffle.js and un-comment everything. Nuke the build directory and npx truffle compile again. It will hang forever.
Truffle 4.1.11, Ubuntu 16.
@skmgoldin Yes. If you have multiple providers declared in truffle.js you now must wrap them in a function closure. This:
provider: new HDWalletProvider(mnemonic, 'https://mainnet.infura.io'),
has to be like this:
provider: function() {
return new HDWalletProvider(mnemonic, "https://mainnet.infura.io/");
},
We recently upgraded the provider-engine in HDWallet because the old one was generating npm audit warnings and something is different about the way it polls. Any time the config is loaded into truffle (even for compile) it will open all of the listed connections unless they're wrapped, and our efforts to close handlers on exit are not working when several providers are open for some reason.
That worked! I was even able to use a more concise syntax:
mainnet: {
provider: () => new HDWalletProvider(mnemonic, 'https://mainnet.infura.io'),
network_id: '1',
gas: 4500000,
gasPrice: 10000000000,
},
Thanks @cgewecke !
Sweet! Looking at #1023 right now.
Thanks. Still having the same failure there.
Most helpful comment
@skmgoldin Yes. If you have multiple providers declared in
truffle.jsyou now must wrap them in a function closure. This:has to be like this:
We recently upgraded the provider-engine in HDWallet because the old one was generating npm audit warnings and something is different about the way it polls. Any time the config is loaded into truffle (even for compile) it will open all of the listed connections unless they're wrapped, and our efforts to close handlers on exit are not working when several providers are open for some reason.