Transaction was not mined within750 seconds

Hello. I’m trying to start starter-template application and connect it to my private ethereuem blockchain. I run ‘npm run migrate’ but during “Migration GEN” phase I receive the timeout message. Any idea on where should be the problem? There is a log?
Thanks

Bye

Daniele Scattaglia

Admin note: moved to R&D as this seems to be a DevOps issue. Tagging @Shiv for visibility.

Hi Daniele!

Did you follow the steps described in Readme for private network?

  • If yes,
    can you please share the logs/error message you got?

    You can get logs of any of the docker service started in first stem by npm run logs:<service-name>

    e.g. for ganache npm run logs:ganache

  • If no,
    can you please provide details of what you have done so far.

Hi
thanks for your reply. I’ve followed the readme’s section " Deploy and use on test network:" without using docker. I’ve tried to use ganache (installed on a windows machine) and using it as blockchain the timeout is gone. So, it seems that the problem is on ethereum’s configuration. Now, with ganache, the error is on the second phase:

:heavy_check_mark: Wrote results to data/migration.json.
:information_source: Network: private
:information_source: Account: 0xB6617a40982475001d70F134204faF38F499db96
:information_source: Balance: 97.267807048ETH
:information_source: Gas price: 3GWei
:information_source: Found an existing previous migration file (data/migration.json)
:information_source: 0xf46243e0103dba4ea1a0bac01e304f40258aa9be262d8f18ea3c77526f8ed858 | 0.01813 ETH | Created new organization.
⠸ Registering DAO in DAORegistry✖ Migration failed with error: Error: Returned error: VM Exception while processing transaction: revert
:heavy_multiplication_x: Migration failed with error: Error: Returned error: VM Exception while processing transaction: revert

The error seems in this line (file: DAOstack-Hackers-Kit/starter-template# vi node_modules/@daostack/migration/migrate-dao.js):

tx = await daoRegistry.methods.register(avatar.options.address, DAOname).send({ nonce: ++nonce })

My environment:

  • Ubuntu 18.04 LTS
  • npm 6.11.3
  • node 10.17.0

json for Ethereum creation

{
    "nonce": "0x0000000000000042",
    "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "difficulty": "0x1", 
    "alloc": {
	    "31e9d1e6d844bd3a536800ef8d8be6a9975db509": {
		"balance": "10000000000000000000"
	    }
    },
    "coinbase": "0x0000000000000000000000000000000000000000", 
    "timestamp": "0x0",   
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "extraData": "0x",
    "gasLimit": "0xffffffff", 
    "config": {
       "chainId": 4224,
       "homesteadBlock": 0,
       "eip155Block": 0,
       "eip158Block": 0
    }
}

geth for starting Ethereum.

geth --networkid 4224 --mine --datadir “~/ETH” --nodiscover --rpc --rpcaddr “127.0.0.1” --rpcport “8545” --port “30303” --rpccorsdomain “*” --nat “any” --rpcapi eth,web3,personal,net,mine --unlock 0 --password ~/ETH/password.sec --allow-insecure-unlock --ipcpath “~/ETH/Ethereum/geth.ipc” --minerthreads 1

Thanks

Daniele

This is because only ‘0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1’ can register to the DAOregistry.

I would suggest you to start ganache with following command in starter-template npm run ganache

This uses @daostack/migrations and start the deterministic ganache. It will be useful for two reasons

  • It will take care of some initial setup like GEN tokens on test account.
  • You will be able to register to DAOregistry

NOTE: As you can see Found an existing previous migration file (data/migration.json).... This is not correct since you do not have any previously migrated contracts on this fresh ganache image. So you might run into some more problems later since you are not running on docker and the dev environment is different.

Hence, I would suggest you to use docker to keep the dev environment consistent. If docker is causing the timeout problem you can increase the time out locally at this line
I have noticed a timeout issue while I’m running certain other apps on my machine alongside.

Using the private key of the address 0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1 the migration ends correctly. I’ve switched to docker and I’d to modify packages.json to start containers from:

"logs:app": "docker container logs starter-template_app_1 --follow",
"logs:ganache": "docker container logs starter-template_ganache_1 --follow",
"logs:graph": "docker container logs starter-template_graph-node_1 --follow",
"logs:ipfs": "docker container logs starter-starter_template_ipfs_1 --follow",
"logs:postgres": "docker container logs starter-template_postgres_1 --follow",

to

"logs:app": "docker container logs startertemplate_app_1 --follow",
"logs:ganache": "docker container logs startertemplate_ganache_1 --follow",
"logs:graph": "docker container logs startertemplate_graph-node_1 --follow",
"logs:ipfs": "docker container logs starterstarter_template_ipfs_1 --follow",
"logs:postgres": "docker container logs startertemplate_postgres_1 --follow",

the environment starts:

Oct 30 12:58:37.433 INFO Starting JSON-RPC admin server at: http://localhost:8020, component: JsonRpcServer
Oct 30 12:58:37.433 INFO Started all subgraphs, component: SubgraphRegistrar
Oct 30 12:58:37.434 INFO Starting GraphQL HTTP server at: http://localhost:8000, component: GraphQLServer
Oct 30 12:58:37.434 INFO Starting GraphQL WebSocket server at: ws://localhost:8001, component: SubscriptionServer
Oct 30 12:58:37.445 INFO Downloading latest blocks from Ethereum. This may take a few minutes…, component: BlockIngestor
Oct 30 12:58:37.983 INFO Block 0x04d2…1144 contains no transactions, component: BlockIngestor
Oct 30 13:00:05.450 WARN Possible contention in DB connection pool, wait_ms: 10, component: Store

but ‘npm run deploy-graph’ ends with an error

Error: Deployment failed! Graph node "http://127.0.0.1:8020/" is invalid: URL is not defined
   at deploy (/root/DAOstack-Hackers-Kit/starter-template/subgraph/ops/graph-deploy.js:75:11)
   at <anonymous>
  at process._tickCallback (internal/process/next_tick.js:189:7)

while I’m able to telnet to http://127.0.0.1:8020/

telnet localhost 8020
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
GET / HTTP/1.1
host:dasadas

HTTP/1.1 405 Method Not Allowed
content-type: text/plain; charset=utf-8
content-length: 61
date: Wed, 30 Oct 2019 13:21:13 GMT

Used HTTP Method is not allowed. POST or OPTIONS is required

Any ideas?

Thanks
Bye

Daniele

UPDATE: I was using node 8. Using node 10 the error is now

Compile subgraph
✖ Failed to compile subgraph: Failed to compile data source mapping: Import file 'src/types/GenericScheme/GenericScheme.ts' not found.
at deploy (/root/DAOstack-Hackers-Kit/starter-template/subgraph/ops/graph-deploy.js:75:11)
at process._tickCallback (internal/process/next_tick.js:68:7)

Hello
copying scheme from another directory (starter-template/subgraph/src/types/Controller/) let the npm run process to finish. Now I can see the web page, but when i try to stake or vote i receive this error in browser:

Unhandled Rejection (Error): Cannot find address of GEN token

I can find GEN address in data/migration.json and debugging @daostack/migration/migration.json the entry is checked.

        "GEN": "0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab",
        "DAORegistry": "0x04CbD650c829299FDedCE903eada37FbDbA3b50f",
        "ControllerCreator": "0xb111Ded3F2e4012C0B85D930Fda298693D0DA0B2",
        "DaoCreator": "0xDd37b2eB92F97dd09cEd1f1d20A73aA340b2311A",
        "UController": "0x393A6a6850e0788e496d73c50a436606e6CcA874",
        "GenesisProtocol": "0x71e7EC880873af0FE33Ad988F862bE200FdD85cC",
        "SchemeRegistrar": "0xc22Ffa318051d8aF4E5f2E2732d7049486fcE093",
        "UpgradeScheme": "0x8be8DFCDC90F50562b5022DE1f8D83fe93b0b055",
        "GlobalConstraintRegistrar": "0xe6dA6E31540239b4a09eC574f147004D50f1b140",
        "ContributionReward": "0xB0015714B541A99265f529c7c0d34DA47deCA5b2",
        "AbsoluteVote": "0xa6f8431C9eEe4Ac2859207aF4004F7a948924c30",
        "QuorumVote": "0xEdCD6442143188Deb586e182B7900dFb8707Bc27",
        "TokenCapGC": "0x81920CAF1F99Bb0f7D72Fdfba840cff21d63CcC5",
        "VoteInOrganizationScheme": "0xd99748782d7643b00C36a4Bb296C4A099dF98Ff3",
        "OrganizationRegister": "0x10fB2Ab116E2Eb3a8B5a1Ca912E05f63c3D969E4",
        "GenericScheme": "0xDe2f00CCfEefAdD1Ecc87BE765cf46AC901A6AC8"

I can’t find the entry for GEN in npm run migrate (see output)

ℹ 0xecc03a80338e13a3ff22f23a7bc9dd04a70e492b8979814667f346825a1136f7 | 0.00165 ETH | 0xBB91b6F5F31eF187De1DA88196F56c03188876dF => DAORegistry
ℹ 0xbe7b7c6278f5462aa555d7ca166fe212b31395faa2546da7b9632f37766cf91b | 0.01273 ETH | 0xc43E8F5B4E32F88b97dCCe12e0308592eAf754Eb => ControllerCreator
ℹ 0xeaefbc84d22bd216d2e410c6e158a46880ec2a48285618f4a3e34c61ac205673 | 0.01463 ETH | 0x1dd310165fb9552b2C4511Ac150f0A35fA9aC0C5 => DaoCreator
ℹ 0xf4935c7913d45b924b101fd0be22afcb59623d14450e99757c2da65a509f6601 | 0.01486 ETH | 0xFA2D4e4Ef69E2c1aAB5A77Ce2bA40FE8cDf38E4F => UController
ℹ 0x22629477f983652061515ec00670db0d08f751ed72c242e6bf7ba09d2be88940 | 0.01380 ETH | 0x3E0A893199f97AF60005943dB82bD98BFCE3E29f => GenesisProtocol
ℹ 0x1783e6c6d20ca2584dcd24a2332b591310462514decf1e6f2f33dc75f57d1772 | 0.00545 ETH | 0x58Fc8901fd93480aBf1B1Db9aCE962F5Bc660D52 => SchemeRegistrar
ℹ 0xb080edc4c6986553d2fe8681ba626b797f4b3a98821f676b9d71872cf883ac27 | 0.00544 ETH | 0x35dFaE44BB3407b79A33bdD36cAE85842Eb055f8 => UpgradeScheme
ℹ 0xda0377a57d27144fba48fd9014cfadb6dcdc4f7028cc5ce2b10708d1a9a1a59c | 0.00564 ETH | 0x1d7e37BD53Ab128478330c254BCbAd83eA2e6f53 => GlobalConstraintRegistrar
ℹ 0xef4715829b312f716691d6e682e8e0cb383ad865a9f4ea8ad6227305cc6b1234 | 0.00925 ETH | 0xA87675D623605b9E7Fd42cED391986bEE51E7C48 => ContributionReward
ℹ 0xd67952a8ef2cf062b7d1570b461435b77afdc185fc61bdb219fea34d2d748935 | 0.00353 ETH | 0x3bb309D27807202c44B2f00C2EE04Ea5046B5B5d => AbsoluteVote
ℹ 0x6c736b399ca26e5b5626e59485cc1443afceb0f9e8d5ba528ea89358363e51e8 | 0.00356 ETH | 0x5cb09572daB6e8eEceB3C554aF229D23F55241ed => QuorumVote
ℹ 0x69b627bc1c00addf47245faaccf97b52d5fbdbce8eb6ff17827b50f90a7a654d | 0.00085 ETH | 0x8014E07473F23fd8b20BdC035557Fc5924cFd1af => TokenCapGC
ℹ 0xf49441d7ff7f158f4db8ae44312457e73c7f03694c3ecbe893c7363f819fd38d | 0.00536 ETH | 0x0E28793083765fEfE23A6b5F5f72b1cFa9e6E190 => VoteInOrganizationScheme
ℹ 0x93c976375f2d05a2d8d101ef4f215411f3de19e78103b2e872173c1835fe8d0f | 0.00196 ETH | 0x37141d984a8277Dcf93d69541DDeC116524e4174 => OrganizationRegister
ℹ 0x9f40d6877dfa97af0b87f315a9ff93c0aef7dff9e6a4602402388d132e229529 | 0.00242 ETH | 0x29c258369a6a3c8Ce2867bB950c32bfA2557CaF5 => Redeemer
ℹ 0x41465cc55163f708768c8648e136f28dd1d7f308f1994e0ec99ed60ffa7684d9 | 0.00605 ETH | 0xFD646653BaE290081CE7db2Fab4d1e37D893b398 => UGenericScheme

Something goes wrong with the migration?
Thanks

Daniele

I updated the version of core layers and now it works. Appologies for the inconvenience.

Reason for error: By default subgraph fetches only first 100 entity and hence GEN address was not being fetched and set. Latest version of client fetches first 1000 entities and fixes that issue.

Re Entry of GEN in migration output

There is nothing wrong with the migration. The docker-image has previously deployed contracts already. When you run migration script it deploys the new version of arc contracts, but GEN contract is not deployed, since it is same … because even on the mainnet when we update any of the arc contract version we are still keeping the same GEN token version which was used during the time of token sale.

Hello.
Still have some problems, now no proposals are displayed in browser (this.state.proposals in App.js is empty). Probably something related to my environment? Could you please send me your environment specification?
If I run app, development server shows:

./node_modules/web3/node_modules/web3-eth-accounts/src/scrypt.js
Critical dependency: the request of a dependency is an expression

./src/App.js
  Line 7:   'Input' is defined but never used                  no-unused-vars
  Line 9:  'first' is defined but never used                  no-unused-vars
  Line 42:  'contractInfo' is assigned a value but never used  no-unused-vars

Thanks.

Oh no problem there! I just updated the UI to show proposals from your the fresh DAO just created in starterTemplate.

So either you can play with App.js code and change it to some other DAO or you can create the first proposal.

if you go to http://localhost:8000/ you can query the subgraph and see if the proposal exists

Hello. I’ve tried to create the proposal. MetaMask ask me to confirm the transaction, but when i confirm i receive the error.

MetaMask - RPC Error: Error: [ethjs-rpc] rpc error with payload {"id":9557807526689,"jsonrpc":"2.0","params":["0xf902138204d48504a817c800830ed12294753de14163a81656a1c7112a3a521bb2924ff00480b901a4896488b9000000000000000000000000845084276f991a8beb9bde65e1f84e5ebf76f9ff00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000000000000000000000000000000000000000000002e516d5275444c4378455170317731356e38434c5037696b5370543369686d68517059617451637262685a4b684b350000000000000000000000000000000000008602c01a9c55afa0af9cfbf37ef67e55f23276f988562152cc645962af3571ecbc8ca23cc76fcb72a02ca2066dbac88bdda7cad157d5589e2770d0b1cd88f45d47b7b0df33608769c1"],"method":"eth_sendRawTransaction"} [object Object]

Metamask Version 7.3.1 on chrome Version 78.0.3904.87 (Official Build) (64-bit). May I try with other wallet?
Thanks

Hi. I’ve managed to let it works using the browser (and Metamask) on Windows. Still have problems on Linux.