I have a webdriverio test framework with maxInstance of the browser set to 10. When I run my script, I get the below error message
[local-test] (node:20572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit
How can I get this fixed? I read some information online that I can suppress this warning by either process.setMaxListeners(10); or emitter.setMaxListeners(10) adding to the wdio.conf.js file;
But none of the fixed the issue. Also I do not want to suppress the warning and want to see if there is a way to do a clean fix? Kindly let me know.
PS : Its webdriverio / Mocha driven test automation framework and there is no database involved. Also I googled similar answers and it did not help.