1

Whenever I try and do truffle test I get the error

Cannot read property 'gasUsed' of null

But truffle migrate --reset works fine

More confusingly, to rule out something in one of my tests that is causing the problem, I have deleted everything from the tests folder. So- to my understanding- if there is nothing in the tests folder, truffle test should do the exact same thing as truffle migrate?! Is there some separate configuration the tests are referring to that could be causing this?

1 Answer 1

1

I have discovered what is causing the problem- the problem occurs when I specify a networkId on ganache of 69420. If I do not specify an ID, or even a network ID that is different by 1, it works.

It is NOT that truffle test cannot find the network- first, there is a different error message for that, and second, I have set truffle-config to search for networkID of "*".

Did someone hard code this network ID into truffle as being reserved or something!?

I feel like it could also be an easter egg..

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.