Getting a typeError when running `truffle test` after update
See original GitHub issueComing back from vacations, I just updated my truffle install from v5.1.4 to v5.1.7.
When running truffle tests (that used to work) I’m now getting:
"before all" hook: prepare suite:
TypeError: Cannot read property 'typeClass' of undefined
at abiSizeAndAllocate (node_modules/truffle/build/webpack:/packages/codec/dist/lib/abi-data/allocate/index.js:91:1)
at abiSizeAndAllocate (node_modules/truffle/build/webpack:/packages/codec/dist/lib/abi-data/allocate/index.js:199:65)
at allocateMembers (node_modules/truffle/build/webpack:/packages/codec/dist/lib/abi-data/allocate/index.js:60:63)
at allocateDataArguments (node_modules/truffle/build/webpack:/packages/codec/dist/lib/abi-data/allocate/index.js:370:1)
at allocateCalldataAndReturndata (node_modules/truffle/build/webpack:/packages/codec/dist/lib/abi-data/allocate/index.js:301:60)
at getCalldataAllocationsForContract (node_modules/truffle/build/webpack:/packages/codec/dist/lib/abi-data/allocate/index.js:525:1)
at Object.getCalldataAllocations (node_modules/truffle/build/webpack:/packages/codec/dist/lib/abi-data/allocate/index.js:563:1)
at new WireDecoder (node_modules/truffle/build/webpack:/packages/decoder/dist/decoders.js:189:1)
at Object.<anonymous> (node_modules/truffle/build/webpack:/packages/decoder/dist/index.js:213:1)
at step (node_modules/truffle/build/webpack:/packages/decoder/dist/index.js:164:1)
at Object.next (node_modules/truffle/build/webpack:/packages/decoder/dist/index.js:145:45)
at /home/amxx/Work/iExec/code/PoCo-dev/node_modules/truffle/build/webpack:/packages/decoder/dist/index.js:139:1
at new Promise (<anonymous>)
at __awaiter (node_modules/truffle/build/webpack:/packages/decoder/dist/index.js:135:1)
at Object.forProject (node_modules/truffle/build/webpack:/packages/decoder/dist/index.js:211:1)
at TestRunner.initialize (node_modules/truffle/build/webpack:/packages/core/lib/testing/testrunner.js:80:1)
at process._tickCallback (internal/process/next_tick.js:68:7)
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (12 by maintainers)
Top Results From Across the Web
Some Truffle tests not running after truffle init (Mac OSX ...
I have installed Testrpc and Truffle globally with NPM. I ran testrpc in a terminal window and ran truffle test. I get 2...
Read more >Truffle test fails with TypeError - solidity - Stack Overflow
I initiated an empty truffle project, placed the contract and get that compiled successfully. however truffle test gives below error.
Read more >ConsenSys/truffle - Gitter
It was working before, but after adding one more function in my smart contract and it stopped working. Gas limit is max.
Read more >Write JavaScript tests - Truffle Suite
Before each contract() function is run, your contracts are redeployed to the ... { from: accountOne }); // Get balances of first and...
Read more >Migrating from Truffle | Ethereum development environment ...
Using these you can run your existing tests with Hardhat. If you want to learn the details of writing Truffle tests to run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using 5.1.4 was ok for now, but it’s looking like it’s not going to support my transition to ^0.6.0.
@gnidan The code that triggers that is not public, but I could send you an archive with it
Well, I mentioned it to them on their Gitter, but I didn’t open an issue because I’d be missing one key thing: A reproduction example! (I couldn’t use Amxx’s because his was sent to us privately.) So, it would be better if you could open the issue. But if you have a reproduction example, I suppose I could do it.
As for telling the two errors apart… yeah, they don’t really belong in the same thread; sometimes unrelated errors just end up grouped like that. 😕 They don’t actually resemble each other, just the new error message (from the ID clash) never got posted here because some of this discussion was conducted with Amxx in email.
The error that resulted from the ID clash – copying it in from Amxx’s email – looked like this:
So, if you were getting the first of these errors, rather than the second, it’s more likely a bad ABI.
Anyway, I would encourage you to submit the issue yourself (or @Amxx, I would still encourage you to do so, with both issues!) but if you can send us a reproduction example I might have time to inspect it and submit the issue.