Performance issue and websocket error
See original GitHub issueI just upgraded to version 1.0.0 and immediately noticed that my test suite takes much longer to run, now about 18 seconds when it finished in about 10 seconds before. My guess is there is something slow going on during startup because the first test result takes much longer to show up as done.
Even worse, every other time or so that I run my tests I get the following error during startup:
C:\path_to_project\node_modules\playwright-chromium\lib\server\chromium.js:211
session.queue.push(parsedMessage);
^
TypeError: Cannot read property 'push' of undefined
at WebSocket.<anonymous> (C:\path_to_project\node_modules\playwright-chromium\lib\server\chromium.js:211:27)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (C:\path_to_project\node_modules\ws\lib\websocket.js:789:20)
at Receiver.emit (events.js:315:20)
at Receiver.dataMessage (C:\path_to_project\node_modules\ws\lib\receiver.js:422:14)
at Receiver.getData (C:\path_to_project\node_modules\ws\lib\receiver.js:352:17)
at Receiver.startLoop (C:\path_to_project\node_modules\ws\lib\receiver.js:138:22)
at Receiver._write (C:\path_to_project\node_modules\ws\lib\receiver.js:74:10)
at writeOrBuffer (_stream_writable.js:352:12)
at Receiver.Writable.write (_stream_writable.js:303:10)
This is not an error that I have seen before and when I revert to version 0.2.5 these issues go away.
Issue Analytics
- State:
- Created 3 years ago
- Comments:27 (14 by maintainers)
Top Results From Across the Web
Performance problem sending WebSocket frames - Swift Forums
To do this it sends and receives binary web socket frames. I'm on a 1 Gb network with a switch between the client...
Read more >html - WebSockets performance - Stack Overflow
(socket.io) and canvas. I reckon that the calculation of the direction change has to be done client- AND serverside and then synchronized -...
Read more >How do I troubleshoot WebSocket issues in Agents (All ...
The purpose of this article is to provide information on troubleshooting WebSocket issues with Agents in AM. This information applies to ...
Read more >HTTP vs Websockets: A performance comparison
In many web applications, websockets are used to push messages to a ... This post compares the performance of request/responses between HTTP ...
Read more >Intermittent errors with WebSockets - Cloudflare Community
The backend app servers run websockets for RabbitMQ connections. Some of our users are seeing intermittent errors/problems when going thr…
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 Free
Top 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
@mmarkelov I can verify that the next version of jest-playwright-preset (currently 1.3.0-rc1) together with next version of playwright-chromium (1.2.0-next.1594082323189) solves the performance issue that @DavidZidar reported above (#158) as long as you use
launchType: 'LAUNCH'
. Also, the crash issue appears to be gone. When I run my tests (8 test suites / 58 tests) withlaunchType: 'PERSISTENT'
the behaviour is erratic. Only one of 5+ testruns finished successfully. The others were either hanging after the last testrun or crashing with the message A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown.. When I triedlaunchType: 'PERSISTENT'
with v1.2.1 I didn’t have any of these problems. Running withlaunchType: 'SERVER'
works fine but is very slow. BTW, I’m a colleague of @DavidZidar.Just tried upgrading to
playwright-chromium@next
and I can confirm the crashing issues I’ve had are gone! Great success.It is still running much slower than before though, but that’s not as bad as outright crashing.