Closed BlockchainsFans closed 4 years ago
Closing this as a duplicate of issue #3356
I had the sam issue with BSC testnet. I solved mine by replacing 'https' in the provider url with 'wss'
testnet: {
provider: () => new HDWalletProvider(mnemonic, `wss://data-seed-prebsc-1-s1.binance.org:8545`),
network_id: 97,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true
},
If it helps, I had the exact same error. I could deploy on any ethereum environment, but couldn't deploy on Polygon (neither mumbai or the mainet). When I tried with this https://rpc-mumbai.maticvigil.com/ instead of this https://rpc-mumbai.matic.today, it worked.
Hope it helped!
I had the sam issue with BSC testnet. I solved mine by replacing 'https' in the provider url with 'wss'
testnet: { provider: () => new HDWalletProvider(mnemonic, `wss://data-seed-prebsc-1-s1.binance.org:8545`), network_id: 97, confirmations: 10, timeoutBlocks: 200, skipDryRun: true },
works like a charm
If it helps, I had the exact same error. I could deploy on any ethereum environment, but couldn't deploy on Polygon (neither mumbai or the mainet). When I tried with this https://rpc-mumbai.maticvigil.com/ instead of this https://rpc-mumbai.matic.today, it worked.
Hope it helped!
I am having the same issue in matic testnet
. I tried this solution but now,
code: -32603,
message: 'Too Many Requests',
data: { originalError: {} },
stack: 'Error: Too Many Requests\n' +```
If it helps, I had the exact same error. I could deploy on any ethereum environment, but couldn't deploy on Polygon (neither mumbai or the mainet). When I tried with this https://rpc-mumbai.maticvigil.com/ instead of this https://rpc-mumbai.matic.today, it worked. Hope it helped!
I am having the same issue in
matic testnet
. I tried this solution but now,code: -32603, message: 'Too Many Requests', data: { originalError: {} }, stack: 'Error: Too Many Requests\n' +```
I get the same
Nothing is actually working for me. Most of time I get TIMEDOUT issue now.
I later found out that the major cause of this problem is unstable network. your ip changes in the middle of deploying the contract. the solution is to use a stable network or use a vpn which will stabilize your network. in my case I used proton vpn and everything worked perfectly
Thank you for your response. I used https://rpc-mumbai.maticvigil.com
URL and used proton vpn
but now the issue is
The other issue is as in screenshot . It is so frustrating now. I can't get rid of it. :(. I am using vpn though.
Please reopen this issue...
Try this Matic testnet url:
https://matic-mumbai.chainstacklabs.com/
Worked for me!
Try this Matic testnet url:
https://matic-mumbai.chainstacklabs.com/
Worked for me!
This URL did not work for me - same issue.
I had same issue but resolve it by using speedy node testnet url.
https://speedy-nodes-nyc.moralis.io/*****.......*****/bsc/testnet
I had the sam issue with BSC testnet. I solved mine by replacing 'https' in the provider url with 'wss'
testnet: { provider: () => new HDWalletProvider(mnemonic, `wss://data-seed-prebsc-1-s1.binance.org:8545`), network_id: 97, confirmations: 10, timeoutBlocks: 200, skipDryRun: true },
works like a charm
Amazing! It worked for me.
I had the sam issue with BSC testnet. I solved mine by replacing 'https' in the provider url with 'wss'
testnet: { provider: () => new HDWalletProvider(mnemonic, `wss://data-seed-prebsc-1-s1.binance.org:8545`), network_id: 97, confirmations: 10, timeoutBlocks: 200, skipDryRun: true },
It worked for me.Thx
I had the same issue with BSC testnet. I solved mine by replacing 'https' in the provider url with 'wss' worked a t a point but after few days it stopped working so i had to migrate using this:
truffle deploy --network testnet --reset --compile-none
testnet: { provider: () => new HDWalletProvider(mnemonic,
https://data-seed-prebsc-1-s1.binance.org:8545
), network_id: 97, confirmations: 10, timeoutBlocks: 200, skipDryRun: true },
worked for me
I've started seeing the exact same ETIMEDOUT
error when deploying my Smart Contract on Goerli Testnet
, and using Alchemy
as my node provider.
And I was able to fix it by simply replacing https
in my node provider URL with wss
For example:
https://eth-goerli.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}
// Url to an Ethereum Node
To >>>
wss://eth-goerli.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}
// Url to an Ethereum Node
goerli: {
provider: function () {
return new HDWalletProvider(
privateKeys.split(','), // Array of account private keys
`wss://eth-goerli.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`// Url to an Ethereum Node
)
},
gas: 5000000,
gasPrice: 25000000000,
network_id: 5,
skipDryRun: true,
confirmations: 10,
networkCheckTimeout: 1000000,
websocket: true,
timeoutBlocks: 90000
}
Try this Matic testnet url:
https://matic-mumbai.chainstacklabs.com/
Worked for me!
This URL did not work for me - same issue.
This network URL must be the same as you have in MetaMask (New RPC URL)
Any updates on this problem ? I still got this error sometimes when running my application on bsc testnet
Hey I have solved finally ✌️🎉
I didn't use truffle HD Wallet anymore as it gave me a lot of pain 😞. Finally, I used the core etherium web3.js for everything like provider instance creation, wallet selection, pay gass, everything. I used core etherium library https://github.com/ethereum/solc-js for the ABI (Application Binary Interface) & bytecode generation.
Use Etherium Solc-js as it is official library of etherium team & it has all the feature what truffle has 💪
I used Alchemy for my Polygon mumbai test-network Node communication. Wolla, that's it. Here is the code that will help you:
const web3 = new Web3(
new Web3.providers.HttpProvider(
"https://polygon-mumbai.g.alchemy.com/v2/<Alchemy-API-key>"
)
);
// Creating a signing account from a private key
const signer = web3.eth.accounts.privateKeyToAccount(
<Your Account Private key that will be used as the signer>
);
web3.eth.accounts.wallet.add(signer);
// deploying our contract
const result = await new web3.eth.Contract(
contracts["MyContract.sol"]["MyContract"].abi,
null,
{
transactionBlockTimeout: 200,
transactionConfirmationBlocks: 1000,
transactionPollingTimeout: 1000,
blockHeaderTimeout: 100,
}
)
.deploy({
data: contracts["MyContract.sol"]["MyContract"].evm.bytecode.object,
})
.send({
gas: "5000000",
from: <Account public address that will pay the gass>,
});
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({mpt #1
code: -32603,
message: 'ESOCKETTIMEDOUT',
data: { originalError: { code: 'ESOCKETTIMEDOUT', connect: false } },
stack: 'Error: ESOCKETTIMEDOUT\n' +
' at ClientRequest.
If anyone is facing the above error to run with Matic Network Solution: - Try to change the actual Provider URL, take out from the mentioned website https://rpc.maticvigil.com/apps/a712bb661daef11c93ef89af396c476dbed54a83
then run using truffle migrate --network matic
This Worked for me..
Hey dears! had this problem happening this morning: compiling the contract first with t truffle compile --all and then migrating with truffle migrate --compile-none allowed me to solve this issue.
Found the answer on this forum: https://forum.moralis.io/t/client-network-socket-disconnected-before-secure-tls-connection-was-established/9526
Run npx truffle migrate --network goerli
instead of truffle migrate --network goerli
This Worked for me.
Issue
What the issue is, in broad strokes.
Steps to Reproduce
Please provide the shortest amount of steps to reproduce your issue.
Expected Behavior
What you expected to happen.
Actual Results
What actually happened. Please give examples and support it with screenshots, copied output or error messages.
Environment
truffle version
):node --version
):npm --version
):