4

I'm trying to record realtime data that is streamed through a WebSocket using Puppeteer. I've followed the instructions on How to use puppeteer to dump WebSocket data, but haven't had any luck so far. The Network.webSocketFrameReceived callback is never triggered. I tried doing the same for Network.webSocketFrameSent and other websocket events, and none of them are triggered.

I've run puppeteer with DEBUG=puppeteer:* and dont' see the websocket events, although HTTP/Fetch events are logged. Does CDP have a limitation with binary websockets?

Using the latest stable version of Pupeeteer (1.20.0)

Checksum
  • 3,220
  • 3
  • 23
  • 24
  • Turned out to be a weird quirk of the app I was trying to automate. The WebSocket connection itself was being handled inside a WebWorker, and hence the issue. Works fine when the WebWorker is disabled. – Checksum Oct 05 '19 at 07:10
  • Sorry to bring up a 2 year old question, but please explain how to call Network.webSocketFrameReceived ? Should I specify all three parameters when calling this function? Or just two RequestId and MonotonicTime ? – Optimus1 Apr 08 '22 at 17:34

0 Answers0