Truffle error: Error encountered, bailing. Network state unknown. Review successful transactions manually
Asked Answered
M

2

6

Every time I try to deploy truffle migrate --reset my Organization.sol contract, I get the following error:

Error encountered, bailing. Network state unknown. Review successful transactions manually.

I Googled the error and apparently this is due to contract size. My Organization.sol is not even that big; I’ve seen bigger contracts before.

Here is my contract: https://github.com/ulixir/eth-task-contracts/blob/master/contracts/Organization.sol

Any clues?

Mickens answered 1/11, 2017 at 0:56 Comment(2)
it works fine with StandardToken.sol and truffle version v4.0.0-beta.2.Plumber
One hint: When you set gas: 4700000 (limit on ropsten) in truffle.js for development. Can you reproduce it for local ganache-cli deployment? If that's the case it's definitely contract size. Your github link seems to be down so meanwhile...Illconsidered
H
2

Do you also see an error this error

Error: insufficient funds for gas * price + value

In that case, the ethereum account you are trying to use may not have enough ether to perform the migration.
Ether can be added to an account by calling miner.start() from the geth console or by allocating ether to the account using the genesis.json file. You can read more about it here.

If you decide to use the genesis file, take the following steps after allocating data to your ethereum account:

  1. remove the old geth db using geth --datadir "<your datadir>" removedb.
  2. Reinitialize your geth node using the modified genesis file geth <your other params here> init <yourGenesisFile>
  3. within the geth console of the new node, make sure you start the miner miner.start()

When done, try the migration again, it should work now.

If you decided to mine ether without modifying the genesis file, start the mining and give your ethereum account some time to mine enough ether. How long this takes depends on the difficulty level you set on your genesis file.

Herbertherbicide answered 26/1, 2018 at 20:47 Comment(0)
G
0

When you are using this command truffle migrate --reset it is trying to deploy Migration.sol contract also with your Organization.sol .You can see the migration script in migration folder. The error

Error encountered, bailing. Network state unknown. Review successful transactions manually.

means that it cannot determine which contracts are deployed.And telling you to check manually.To check which contracts are deployed you can use this command truffle network.

Georginageorgine answered 29/9, 2018 at 12:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.