AugurProject / augur

Augur v2 - Prediction Market Protocol and Client
MIT License
457 stars 144 forks source link

`make docker-all` fails building geth container with JSON error #8914

Closed enolan closed 4 years ago

enolan commented 4 years ago

Describe the bug I get Error: SyntaxError: /home/enolan/mystuff/code/augur/packages/augur-artifacts/src/environments/matic.json: Unexpected token } in JSON at position 4294 when trying to run make docker-all. This happens on the v2.1.8 tag and the release branch. On dev I get a different error.

Looking at the JSON file, there's a stray comma after "trackMarketInvalidBids": true. The file was broken in 48f4a622310b7a9191c6221ce0191535ad213a37.

To Reproduce Steps to reproduce the behavior:

  1. Clone the repo and checkout the appropriate branch/tag
  2. yarn && make docker-all

Expected behavior A set of docker images should build that allow me to run a local node.

Desktop (please complete the following information):

pgebheim commented 4 years ago

@robert-e-davidson3 -- You fixed this config correct?

enolan commented 4 years ago

On the v2.1.9 tag I get a different error: Error: TypeError: Cannot read property 'ZeroXTrade' of undefined. The JSON file seems correct now, jq processes it successfully at least. Full log below:

[enolan@chonk:~/mystuff/code/augur]$ make docker-all
yarn
yarn install v1.22.0
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "sha3@2.0.1" is incompatible with requested version "sha3@^1.2.2"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@4.17.19"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@4.17.19"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@4.17.19"
warning Resolution field "@0x/mesh-browser-lite@v10.0.0-unstable-7" is incompatible with requested version "@0x/mesh-browser-lite@^9.4.0"
warning Resolution field "bignumber.js@9.0.0" is incompatible with requested version "bignumber.js@~8.0.2"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@4.17.14"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@^4.17.19"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@^4.17.19"
warning Resolution field "ethers@4.0.47" is incompatible with requested version "ethers@4.0.0-beta.3"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@=3.10.1"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@^4.17.19"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@^4.17.19"
warning Resolution field "lodash@4.17.15" is incompatible with requested version "lodash@^4.17.19"
warning Resolution field "ethers@4.0.47" is incompatible with requested version "ethers@4.0.0-beta.3"
warning Resolution field "leveldown@5.4.1" is incompatible with requested version "leveldown@~5.1.1"
warning Resolution field "leveldown@5.4.1" is incompatible with requested version "leveldown@~5.1.1"
success Already up-to-date.
Done in 0.99s.
yarn build
yarn run v1.22.0
$ tsc -b
Done in 0.28s.
yarn docker:all
yarn run v1.22.0
$ yarn workspace @augurproject/tools --silent flash docker-all
$ ts-node ./src/flash/cli docker-all
Deploy contracts: false
Use fake time: false
Detach: false
Start geth node: true
Waiting for Geth to start up
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/default.json
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/demo.json
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/dev.json
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/mainnet.json
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/matic.json
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/reporting.json
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/staging.json
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/test.json
deleting cache for module: /home/enolan/mystuff/code/augur/packages/augur-artifacts/build/environments/v2.json
Building
Error: TypeError: Cannot read property 'ZeroXTrade' of undefined
Stopping geth
Error response from daemon: Cannot kill container: geth: No such container: geth
Stopping dockers
Done in 13.84s.

[enolan@chonk:~/mystuff/code/augur]$ WARNING: The ETHEREUM_CHAIN_ID variable is not set. Defaulting to a blank string.
WARNING: The CUSTOM_CONTRACT_ADDRESSES variable is not set. Defaulting to a blank string.
WARNING: The ZEROX_CONTRACT_ADDRESS variable is not set. Defaulting to a blank string.
WARNING: The ETHEREUM_RPC_HTTP variable is not set. Defaulting to a blank string.
Removing network augur-tools_default
WARNING: Network augur-tools_default not found.
robert-e-davidson3 commented 4 years ago

This is happening because we aren't building the pre-populated geth dockers anymore. Add the --dev flag. This will bring up an empty geth node then deploy to it. It takes longer but works.

robert-e-davidson3 commented 4 years ago

This works on v2 branch now.