You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
I'm attempting to use @0x/sol-coverage and I'm running into issues with tests not completing. These tests listen for events. I have added added a websocketSubProvider to provider used in truffle-config.js
Here is the terminal output:
Contract: Example (End to End tests)
✓ Test 1) (46ms)
1) Test 2
TypeError: this.removeListener is not a function
at Object.receipt (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/lib/handlers.js:134:1)
at Function.start (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/lib/override.js:56:1)
at <anonymous>
TypeError: this.removeListener is not a function
at Object.receipt (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/lib/handlers.js:134:1)
at Function.start (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/lib/override.js:56:1)
at <anonymous>
/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:707
err.uncaught = true;
^
TypeError: Cannot create property 'uncaught' on string 'abort({}). Build with -s ASSERTIONS=1 for more info.'
at Runner.uncaught (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:707:16)
at process.uncaught (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:821:10)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process.emit (/usr/local/lib/node_modules/truffle/build/webpack:/~/source-map-support/source-map-support.js:461:1)
at processEmit [as emit] (/usr/local/lib/node_modules/truffle/build/webpack:/~/signal-exit/index.js:155:1)
at process._fatalException (bootstrap_node.js:375:26)`
truffle-config.js:
const ProviderEngine = require("web3-provider-engine");
const RpcSubProvider = require("web3-provider-engine/subproviders/rpc.js");
const WebsocketSubprovider = require("web3-provider-engine/subproviders/websocket.js");
const { TruffleArtifactAdapter } = require('@0x/sol-trace');
const projectRoot = '.';
const solcVersion = '0.5.9';
const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);
const { CoverageSubprovider } = require("@0x/sol-coverage");
const defaultFromAddress = "0x5409ed021d9299bf6814279a6a1411a7e866a631"; // Some ethereum address with test funds
const coverageSubprovider = new CoverageSubprovider(artifactAdapter, defaultFromAddress);
const provider = new ProviderEngine();
provider.addProvider(new RpcSubProvider({rpcUrl: 'http://localhost:7545'}));
provider.addProvider(coverageSubprovider);
provider.addProvider(new WebsocketSubprovider({rpcUrl: 'ws://localhost:7545/ws'}));
provider.start(err => {
if (err !== undefined) {
console.log(err);
process.exit(1);
}
});
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
development: {
provider: function() {
return provider;
},
network_id: "*", // Match any network id
// websockets: true
}
},
compilers: {
solc: {
version: "^0.5.9",
}
}
};
The text was updated successfully, but these errors were encountered:
fabioberger
changed the title
[sol-cover] TypeError: this.removeListener is not a function
sol-cover: TypeError: this.removeListener is not a function
Jun 26, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm attempting to use @0x/sol-coverage and I'm running into issues with tests not completing. These tests listen for events. I have added added a websocketSubProvider to provider used in truffle-config.js
Here is the terminal output:
truffle-config.js:
The text was updated successfully, but these errors were encountered: