Skip to content

Deployment Error Web3ProviderEngine does not support synchronous requests #69

@codingmalkio

Description

@codingmalkio

Hi guys forgive me by asking but I tried to deploy/migrate the smart contract on ropsten network but its throwing an error.

node:20033) UnhandledPromiseRejectionWarning: Error: Web3ProviderEngine does not support synchronous requests. at ProviderError.ExtendableError (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:9328:17) at new ProviderError (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:314009:24) at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:314133:17 at HDWalletProvider.send (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:314171:22) at Object.send (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:175476:31) at RequestManager.send (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:331128:32) at Eth.get [as accounts] (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:43421:62) at web3.eth.getAccounts (/Users/krispymallows/Dropbox/Server/Workspaces/ico/migrations/3_deploy_ico_contract.js:33:82) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) (node:20033) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:20033) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I tracked it down to this line right here on:
/migrations/3_deploy_ico_contract.js: line 28

const icoInstance = web3.eth.contract(JincorTokenICO.abi).at(JincorTokenICO.address);
icoInstance.setEthPriceProvider(EthPriceProvider.address, { from: web3.eth.accounts[0] });

here's my Truffle.js

var mnemonic = "acoustic renew ..."; 


module.exports = {
   solc: {
		optimizer: {
			enabled: true,
			runs: 200
		}
	},
  networks: {
    development: {
      host: "127.0.0.1",
      port: 8545,
      network_id: "*" // Match any network id
    },
    ropsten: {
      provider: function() {
        return new HDWalletProvider(mnemonic, "https://ropsten.infura.io/.....", 0)
      }, 
      gas:4698712,
      network_id: 3, 
      from:'0x7fb84cae8dd852c8471ab.....',
      gasPrice:100000000000, 
   },
    
  },
};

Here's how I start the oracle bridge
ethereum-bridge -H https://ropsten.infura.io/.... --broadcast -a 0

I am running out of ideas, can you help me and point out where I might have went wrong?

Truffle v4.0.1 (core: 4.0.1)
Solidity v0.4.18 (solc-js)
node v8.11.2

UPDATE:
its this line afterall that's been causing the error Error Web3ProviderEngine does not support synchronous requests

const icoInstance = web3.eth.contract(JincorTokenICO.abi).at(JincorTokenICO.address);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions