Solidity-coverage: `truffle run coverage` fails with Truffle v5.1.45

Created on 18 Sep 2020  路  3Comments  路  Source: sc-forks/solidity-coverage

truffle run coverage was running fine with with Truffle v5.1.42, but fails with Truffle v5.1.45. It fails at line 101 await truffle.contracts.compile(config); in file plugins/truffle.plugin.js. May have something to do with change #3252, see also v5.1.45 change log.

[user] [dir] % truffle run coverage

> Using Truffle library from local node_modules.

> server:            http://127.0.0.1:8555
> truffle:           v5.1.45
> ganache-core:      v2.11.2
> solidity-coverage: v0.7.10

Network Info
============
> id:      *
> port:    8555
> network: soliditycoverage


Instrumenting for coverage...
=============================

[list of files]

Coverage skipped for:
=====================

> Migrations.sol

Compiling your contracts...
===========================
> solidity-coverage cleaning up, shutting down ganache server
TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
    at [repo dir]/node_modules/truffle/build/webpack:/packages/workflow-compile/utils.js:34:1
    at new Promise (<anonymous>)
    at [repo dir]/node_modules/truffle/build/webpack:/packages/workflow-compile/utils.js:27:1
    at [repo dir]/node_modules/truffle/build/webpack:/packages/workflow-compile/legacy/index.js:101:1
    at Array.map (<anonymous>)
    at Object.compileSources ([repo dir]/node_modules/truffle/build/webpack:/packages/workflow-compile/legacy/index.js:91:1)
    at Object.compile ([repo dir]/node_modules/truffle/build/webpack:/packages/workflow-compile/legacy/index.js:54:1)
    at plugin ([repo dir]/node_modules/solidity-coverage/plugins/truffle.plugin.js:101:29)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Truffle v5.1.45 (core: 5.1.45)
Node v12.18.4
0.7.0 bug

All 3 comments

@matthiasgeihs Thanks for reporting! Will investigate....

[EDIT]
Have asked for advice in truffle 3371

Looks like this got fixed with Truffle 5.1.46.

Closing, please just ping if you continue to see problems...

I can confirm that 5.1.46 fixed the issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings