Skip to content

Commit

Permalink
Comment the mysterious yarn build || true
Browse files Browse the repository at this point in the history
When we run it a single time, we get:

```
#0 62.31 Error HH501: Couldn't download compiler version 0.8.17+commit.8df45f5f. Please check your internet connection and try again.
#0 62.31 HardhatError: HH501: Couldn't download compiler version 0.8.17+commit.8df45f5f. Please check your internet connection and try again.
#0 62.31     at /tbtc-v2/solidity/node_modules/hardhat/src/internal/solidity/compiler/downloader.ts:175:15
#0 62.31     at async CompilerDownloader.downloadCompiler (/tbtc-v2/solidity/node_modules/hardhat/src/internal/solidity/compiler/downloader.ts:150:5)
#0 62.31     at async SimpleTaskDefinition.action (/tbtc-v2/solidity/node_modules/hardhat/src/builtin-tasks/compile.ts:585:9)
#0 62.31     at async Environment._runTaskDefinition (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
#0 62.31     at async Environment.run (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
#0 62.31     at async SimpleTaskDefinition.action (/tbtc-v2/solidity/node_modules/hardhat/src/builtin-tasks/compile.ts:678:36)
#0 62.31     at async Environment._runTaskDefinition (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
#0 62.31     at async Environment.run (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
#0 62.31     at async Environment._runTaskDefinition (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
#0 62.31     at async OverriddenTaskDefinition._action (/tbtc-v2/solidity/node_modules/@openzeppelin/hardhat-upgrades/src/index.ts:77:33)
#0 62.31
#0 62.31     Caused by: HeadersTimeoutError: Headers Timeout Error
#0 62.31         at Timeout.onParserTimeout [as _onTimeout] (/tbtc-v2/solidity/node_modules/undici/lib/client.js:894:28)
#0 62.31         at listOnTimeout (node:internal/timers:561:11)
#0 62.31         at processTimers (node:internal/timers:502:7)
#0 62.48 error Command failed with exit code 1.
```

But it always works on the second time. There is probably a way to fix this "better", but for now just running it twice (ignoring the error with `|| true`) works.
  • Loading branch information
beaurancourt committed Jul 12, 2023
1 parent facc694 commit c42e76a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile.geth
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ RUN yarn prepack
COPY ./keep-network/tbtc-v2 /tbtc-v2
WORKDIR /tbtc-v2
WORKDIR /tbtc-v2/solidity
# Need to run `yarn build || true` expecting a failure so that the *next* one
# succeeds. Without it, we get Error HH501: Couldn't download compiler version
# 0.8.17+commit.8df45f5f.
RUN yarn install --network-timeout 1000000 && \
yarn build || true
RUN yarn link @threshold-network/solidity-contracts
Expand Down

0 comments on commit c42e76a

Please sign in to comment.