"TypeError: Cannot convert undefined or null to object" at Socket.IO testing
See original GitHub issueThe following error occurred in the case of Socket.IO testing with response timeout. Summary report could not be displayed.
/Users/hiroaki-hotta/.config/yarn/global/node_modules/artillery/lib/console-reporter.js:167
const coreRates = Object.keys(report.rates).filter(name => name.startsWith('core.'));
^
TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at ConsoleReporter.printReport (/Users/hiroaki-hotta/.config/yarn/global/node_modules/artillery/lib/console-reporter.js:167:30)
at ConsoleReporter.stats (/Users/hiroaki-hotta/.config/yarn/global/node_modules/artillery/lib/console-reporter.js:91:8)
at EventEmitter.emit (/Users/hiroaki-hotta/.config/yarn/global/node_modules/eventemitter3/index.js:202:33)
at EventEmitter.<anonymous> (/Users/hiroaki-hotta/.config/yarn/global/node_modules/artillery/lib/runner-sp.js:62:19)
at EventEmitter.emit (/Users/hiroaki-hotta/.config/yarn/global/node_modules/eventemitter3/index.js:202:33)
at SSMS.<anonymous> (/Users/hiroaki-hotta/.config/yarn/global/node_modules/artillery/core/lib/runner.js:332:8)
at SSMS.emit (events.js:314:20)
at SSMS._maybeEmitMostRecentPeriod (/Users/hiroaki-hotta/.config/yarn/global/node_modules/artillery/core/lib/ssms.js:480:12)
at SSMS.aggregate (/Users/hiroaki-hotta/.config/yarn/global/node_modules/artillery/core/lib/ssms.js:474:10)
OS: macOS Catalina 10.15.7 Version: artillery/2.0.0-dev2 darwin-x64 node-v12.21.0 (globally installed)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Cannot convert undefined or null to object - Stack Overflow
Generic answer. This error is caused when you call a function that expects an Object as its argument, but pass undefined or null...
Read more >Cannot convert undefined or null to object" at Socket.IO testing
The following error occurred in the case of Socket.IO testing with response timeout. Summary report could not be displayed.
Read more >npm err! cannot convert undefined or null to object - You.com
All it is saying is that it expects an object of some type but it has null as the object may be set...
Read more >cypress-io/cypress - Gitter
We invoked the function expoerted by $file_location/cypress/plugins/index.js but it threw an error. TypeError: Cannot convert undefined or null to object.
Read more >[Solved]-TypeError: Cannot convert undefined or null to object
You are trying to use Object method on an Array that throws an error Cannot convert undefined or null to object . You...
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
I’m using the
2.0.0-dev2
version. I’m using the WebSockets implementation, not the Socket.IO.This doesn’t break:
But add
"maxVusers": 1
to phases, it breaks.Thanks again @h6ak! This has been fixed now (on
master
branch).Note that current Socket.io engine uses v2 of the Socket.io protocol so it will not work properly with newer servers unless
allowEIO3
option is set on the server: https://socket.io/blog/socket-io-3-1-0/(Just created #992 to track the upgrade on Artillery’s side)