Closed David-Kneel closed 3 years ago
@David-Kneel I ran this locally and everything worked.
You might try adding the flag below to your network config and see if that helps stabilize things...
module.exports = {
// ... rest of truffle-config
networks: {
"<network-name>": {
// ... rest of config for <network-name>
disableConfirmationListener: true
}
}
}
From this truffle release: https://github.com/trufflesuite/truffle/releases/tag/v5.1.55
@David-Kneel I ran this locally and everything worked.
You might try adding the flag below to your network config and see if that helps stabilize things...
module.exports = { // ... rest of truffle-config networks: { "<network-name>": { // ... rest of config for <network-name> disableConfirmationListener: true } } }
From this truffle release: https://github.com/trufflesuite/truffle/releases/tag/v5.1.55
I switched to truffle 5.1.55, then I uncommented the following in truffle-config.js:
development: {
disableConfirmationListener: true,
host: '127.0.0.1', // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: '*' // Any network (default: none)
}
And still the problem persists locally in my Debian distro within WSL2 and also in CI/CD, Ubuntu LTS 20 distro. By the way, the font that imitating old typing machine you pasted is amaaaaaazing!
I'm on OSX.
Could you try creating a network called coverage that just looks like:
coverage: {
disableConfirmationListener: true
}
... and then running
truffle run coverage --network coverage
... to make sure it picks up the flag?
I'm on OSX.
Could you try creating a network called coverage that just looks like:
coverage: { disableConfirmationListener: true }
... and then running
truffle run coverage --network coverage
... to make sure it picks up the flag?
Sure. This is what happens:
npx truffle run coverage --network coverage
> Using Truffle library from local node_modules.
⚠️ No 'port' was declared in your truffle network. Using solidity-coverage's: 8555.
> server: http://127.0.0.1:8555
> truffle: v5.1.55
> ganache-core: v2.13.0
> solidity-coverage: v0.7.16
Network Info
============
> id: *
> port: 8555
> network: coverage
Instrumenting for coverage...
=============================
> abdk-libraries-solidity/ABDKMath64x64.sol
> abdk-libraries-solidity/ABDKMathQuad.sol
> YieldFarming.sol
> YieldFarmingToken.sol
Coverage skipped for:
=====================
> Migrations.sol
Compiling your contracts...
===========================
✔ Fetching solc version list from solc-bin. Attempt #1
> Compiling ./.coverage_contracts/Migrations.sol
> Compiling ./.coverage_contracts/YieldFarming.sol
> Compiling ./.coverage_contracts/YieldFarmingToken.sol
> Compiling ./.coverage_contracts/abdk-libraries-solidity/ABDKMath64x64.sol
> Compiling ./.coverage_contracts/abdk-libraries-solidity/ABDKMathQuad.sol
> Compiling @openzeppelin/contracts/access/Ownable.sol
> Compiling @openzeppelin/contracts/token/ERC20/ERC20.sol
> Compiling @openzeppelin/contracts/token/ERC20/IERC20.sol
> Compiling @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol
> Compiling @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
> Compiling @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
> Compiling @openzeppelin/contracts/token/ERC20/utils/TokenTimelock.sol
> Compiling @openzeppelin/contracts/utils/Address.sol
> Compiling @openzeppelin/contracts/utils/Context.sol
✔ Fetching solc version list from solc-bin. Attempt #1
> Artifacts written to /home/david/Workspaces/Tachyonic/faster-than-light/.coverage_artifacts/contracts
> Compiled successfully using:
- solc: 0.8.4+commit.c7e474f2.Emscripten.clang
------------------------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
------------------------------------|----------|----------|----------|----------|----------------|
contracts/ | 0 | 0 | 0 | 0 | |
YieldFarming.sol | 0 | 0 | 0 | 0 |... 57,58,59,63 |
YieldFarmingToken.sol | 0 | 100 | 0 | 0 | 15 |
contracts/abdk-libraries-solidity/ | 100 | 100 | 0 | 0 | |
ABDKMath64x64.sol | 100 | 100 | 0 | 0 |... 659,678,728 |
ABDKMathQuad.sol | 100 | 100 | 0 | 0 |... 6,1198,1211 |
------------------------------------|----------|----------|----------|----------|----------------|
All files | 0 | 0 | 0 | 0 | |
------------------------------------|----------|----------|----------|----------|----------------|
> Istanbul reports written to ./coverage/ and ./coverage.json
> solidity-coverage cleaning up, shutting down ganache server
ProviderError:
Could not connect to your Ethereum client.
Please check that your Ethereum client:
- is running
- is accepting RPC connections (i.e., "--rpc" option is used in geth)
- is accessible over the network
- is properly configured in your Truffle configuration file (truffle-config.js)
at /home/david/Workspaces/Tachyonic/faster-than-light/node_modules/truffle/build/webpack:/packages/provider/wrapper.js:73:1
at /home/david/Workspaces/Tachyonic/faster-than-light/node_modules/truffle/build/webpack:/packages/provider/wrapper.js:102:1
at XMLHttpRequest.request.onreadystatechange (/home/david/Workspaces/Tachyonic/faster-than-light/node_modules/truffle/build/webpack:/node_modules/web3/node_modules/web3-providers-http/src/index.js:111:1)
at XMLHttpRequestEventTarget.dispatchEvent (/home/david/Workspaces/Tachyonic/faster-than-light/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:1)
at XMLHttpRequest._setReadyState (/home/david/Workspaces/Tachyonic/faster-than-light/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:208:1)
at XMLHttpRequest._onHttpRequestError (/home/david/Workspaces/Tachyonic/faster-than-light/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:349:1)
at ClientRequest.<anonymous> (/home/david/Workspaces/Tachyonic/faster-than-light/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:252:47)
at ClientRequest.emit (events.js:314:20)
at Socket.socketErrorListener (_http_client.js:427:9)
at Socket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Truffle v5.1.55 (core: 5.1.55)
Node v12.22.1
I setup CI/CD to also include MacOS in the operating system matrix. Still the problem is present though. More information here.
Got it to work by defining a coverage network that runs on 8545
coverage: {
host: '127.0.0.1',
port: 8545,
network_id: '*'
}
and running truffle run coverage --network coverage
https://github.com/cgewecke/faster-than-light/actions/runs/865087452
(Editing the issue title)
When run
truffle run coverage
, the expectRevert command results in a failure.This situation is evidenced in the following GitHub actions run