I am trying to truffle migrate Metacoin to debug why Tuffle migrate is not working to testRPC/ganache-cli. It gets hung up on deploying for testRPC/ganache but if I do it from truffle develop and not specify ganache, then truffle's internal testRPC it migrates fine.

Current versions

Truffle v4.0.4 - a development framework for Ethereum

Ganache CLI v6.0.3 (ganache-core: 2.0.2)

I am running the following sequence:

mkdir metacoin

cd metacoin

truffle unbox metacoin

Open new tab

ganache-cli -u 0

Go back to the metacoin tab

truffle compile

truffle migrate --reset --network development --verbose-rpc

The output without --verbose-rpc looks like:

Using network 'development'.

Running migration: 1_initial_migration.js Deploying Migrations...

With --verbose-rpc

       > {
   >   "jsonrpc": "2.0",
   >   "id": 1,
   >   "method": "net_version",
   >   "params": []
   > }
 <   {
 <     "jsonrpc": "2.0",
 <     "result": "1",
 <     "id": 1
 <   }
Using network 'development'.

Running migration: 1_initial_migration.js
   > {
   >   "jsonrpc": "2.0",
   >   "id": 2,
   >   "method": "eth_accounts",
   >   "params": []
   > }
 <   {
 <     "jsonrpc": "2.0",
 <     "result": [
 <       "0x006faef83e11473a09e59d2d2150209f11e216f9"
 <     ],
 <     "id": 2
 <   }
   > {
   >   "jsonrpc": "2.0",
   >   "id": 3,
   >   "method": "net_version",
   >   "params": []
   > }
 <   {
 <     "jsonrpc": "2.0",
 <     "result": "1",
 <     "id": 3
 <   }
  Deploying Migrations...
   > {
   >   "jsonrpc": "2.0",
   >   "id": 4,
   >   "method": "net_version",
   >   "params": []
   > }
 <   {
 <     "jsonrpc": "2.0",
 <     "result": "1",
 <     "id": 4
 <   }
   > {
   >   "jsonrpc": "2.0",
   >   "id": 5,
   >   "method": "eth_sendTransaction",
   >   "params": [
   >     {
   >       "from": "0xdcb731f4cc8349df9ef206f3c0e46ae532239917",
   >       "gas": "0x6691b7",
   >       "gasPrice": "0x174876e800",
   >       "data": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102db8061005e6000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a723058206d0ad850ad766994ac09fceb3b7aa1ad7e80fd8536774114e97875055355ed660029"
   >     }
   >   ]
   > }

Response from ganache-cli (with -v)

eth_getBalance
   > {
   >   "id": 6578289014410835,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x58ba5d062e2c2b14dc8b8458872afef70a9b25eb",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getTransactionCount
   > {
   >   "id": 6578289014410836,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x58ba5d062e2c2b14dc8b8458872afef70a9b25eb",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
 <   {
 <     "id": 6578289014410835,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410836,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
eth_getBalance
   > {
   >   "id": 6578289014410844,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x15528fc3cff56b4667f988c699ec5983030ce841",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getBalance
   > {
   >   "id": 6578289014410838,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0xf45ae1668bf2a6f7175a0795384b2059789e84a5",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getTransactionCount
   > {
   >   "id": 6578289014410839,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0xf45ae1668bf2a6f7175a0795384b2059789e84a5",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
eth_getBalance
   > {
   >   "id": 6578289014410841,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0xe4753e4dff52c272ac3f8037bc1f218e768ac66d",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
 <   {
 <     "id": 6578289014410844,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410838,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410841,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410839,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
eth_getTransactionCount
   > {
   >   "id": 6578289014410848,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x11f2915576dc51dffb246959258e8fe5a1913161",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
eth_getBalance
   > {
   >   "id": 6578289014410850,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0xc69e35474199292ab39d047490963bd5b01fb73e",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getTransactionCount
   > {
   >   "id": 6578289014410845,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x15528fc3cff56b4667f988c699ec5983030ce841",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
 <   {
 <     "id": 6578289014410848,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410850,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410845,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
eth_getBalance
   > {
   >   "id": 6578289014410853,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x0327ff417aa111b61bed5f39e77946b38d6592b3",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getTransactionCount
   > {
   >   "id": 6578289014410854,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x0327ff417aa111b61bed5f39e77946b38d6592b3",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
 <   {
 <     "id": 6578289014410853,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410854,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
eth_getBalance
   > {
   >   "id": 6578289014410858,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x58ba5d062e2c2b14dc8b8458872afef70a9b25eb",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getTransactionCount
   > {
   >   "id": 6578289014410859,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x58ba5d062e2c2b14dc8b8458872afef70a9b25eb",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
 <   {
 <     "id": 6578289014410858,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410859,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
eth_getBalance
   > {
   >   "id": 6578289014410861,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0xf45ae1668bf2a6f7175a0795384b2059789e84a5",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getTransactionCount
   > {
   >   "id": 6578289014410865,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0xe4753e4dff52c272ac3f8037bc1f218e768ac66d",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
eth_getBalance
   > {
   >   "id": 6578289014410864,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0xe4753e4dff52c272ac3f8037bc1f218e768ac66d",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
 <   {
 <     "id": 6578289014410861,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410865,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410864,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
eth_getTransactionCount
   > {
   >   "id": 6578289014410871,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x11f2915576dc51dffb246959258e8fe5a1913161",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
eth_getBalance
   > {
   >   "id": 6578289014410867,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x15528fc3cff56b4667f988c699ec5983030ce841",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getTransactionCount
   > {
   >   "id": 6578289014410868,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x15528fc3cff56b4667f988c699ec5983030ce841",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
 <   {
 <     "id": 6578289014410871,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410867,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410868,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
eth_getTransactionCount
   > {
   >   "id": 6578289014410874,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0xc69e35474199292ab39d047490963bd5b01fb73e",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
eth_getBalance
   > {
   >   "id": 6578289014410876,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x0327ff417aa111b61bed5f39e77946b38d6592b3",
   >     "latest"
   >   ],
   >   "method": "eth_getBalance",
   >   "external": true
   > }
eth_getTransactionCount
   > {
   >   "id": 6578289014410877,
   >   "jsonrpc": "2.0",
   >   "params": [
   >     "0x0327ff417aa111b61bed5f39e77946b38d6592b3",
   >     "latest"
   >   ],
   >   "method": "eth_getTransactionCount",
   >   "external": true
   > }
 <   {
 <     "id": 6578289014410874,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410876,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }
 <   {
 <     "id": 6578289014410877,
 <     "jsonrpc": "2.0",
 <     "result": "0x0"
 <   }

I tried reinstalling both truffle and testRPC/ganache-cli, I also noticed that the truffle migration logs show that it is getting an eth_account that I haven't seen before and is not apart of Ganache-cli/testRPC.

I have no additional nodes running (geth, parity, private chain etc.) Just two weeks I was migrating large contracts to private chains and had no problem so this wasn't always here.

Any thoughts?

Best, Sam

  • Did you try launching with ganache-cli without any parameter? – Ismael Dec 23 '17 at 3:47

I actually found out the reason it wasn't migrating was that Parity has a few super well hidden processes that didnt show up when I did ps -a ; After finding that parity process and killing it, it worked like a charm.

  • I found a hidden instance of ganache, thanks for sharing. – eladleb Mar 7 at 13:49

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.