In case you ever get this error

Error in plugin solidity-coverage: TypeError: provider.send is not a function when trying to run coverage for your solidity contracts. Do the following

2 Answers 2


Make sure your hardhat version is >= v"^2.11.0". if not change it in your package.json to "hardhat": "^2.11.0" or higher then run npm i

Then update your solidity-coverage version to the highest => 0.8.0 or higher depending on when you're seeing this. the error was fixed in the 0.8.0 versions.

hope this helps. -Cheers


I encountered the same problem and was able to solve it by downgrading hardhat from version 2.16.1 to 2.14.1 via npm i [email protected].

  • Good to see I wasn't the only one. lol Commented Jul 7, 2023 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.