When event argument matchers fail, they spam junk to the console
I've run into this issue many times with the argument matchers where for some reason it just prints tons and tons of output before the actual error. Makes them unusable.
I'm using fish shell on Mac OS 10.15.4
The spam can last several seconds due to the amount of output.
Stack trace from end of video:
RuntimeError: abort(AssertionError: Expected "TestParameters" event to have 1 argument(s), but has 4). Build with -s ASSERTIONS=1 for more info.
at process.abort (/Users/moody/IdeaProjects/uniswap/v2-periphery/node_modules/solc/soljson.js:1:14382)
at process.emit (events.js:310:20)
at process.emit (/Users/moody/IdeaProjects/uniswap/v2-periphery/node_modules/source-map-support/source-map-support.js:485:21)
at process.emit (/Users/moody/IdeaProjects/uniswap/v2-periphery/node_modules/ganache-core/node_modules/source-map-support/source-map-support.js:465:21)
at processPromiseRejections (internal/process/promises.js:209:33)
at processTicksAndRejections (internal/process/task_queues.js:98:32)
It looks like this was happening because I didn't await expect and the promise resolved after the test function exited.
Reopening because I see this even when I do await
See it in version 2.4.1
Another stack trace:
RuntimeError: abort(TypeError: Cannot set property 'state' of undefined). Build with -s ASSERTIONS=1 for more info.
at process.abort (/Users/moody/IdeaProjects/uniswap/v2-periphery/node_modules/solc/soljson.js:1:14382)
at process.emit (events.js:310:20)
at process.emit (/Users/moody/IdeaProjects/uniswap/v2-periphery/node_modules/source-map-support/source-map-support.js:485:21)
at process.emit (/Users/moody/IdeaProjects/uniswap/v2-periphery/node_modules/ganache-core/node_modules/source-map-support/source-map-support.js:465:21)
at processPromiseRejections (internal/process/promises.js:209:33)
at processTicksAndRejections (internal/process/task_queues.js:98:32)
This looks like solcjs failing to download the specified version, not a matcher failing. Can you confirm?
I don’t think so. Try downloading this PR and uncommenting the assertion on line 201
https://github.com/Uniswap/uniswap-v2-periphery/pull/26/files
I had a similar issue - when i got error in contract compilation and didn't catch it, there was a process.abort listener triggered in solcjs which printed all of its content to console. If error was catched, it was fine. We definitely should look into it.
I see this all the time using a series of event argument matchers when one of the matchers fails, and it's one of the most annoying errors because I have to kill the tab if I want to run the test again immediately. My coworkers also see this error when writing tests. Here is another stack trace.
TypeError: Cannot read property 'currentRetry' of undefined
TypeError: Cannot read property 'currentRetry' of undefined
/Users/moody/IdeaProjects/c0v4r/contracts/node_modules/solc/soljson.js:1
null;var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="funct