CDP COmmands Not working

21 views
Skip to first unread message

phaneendra yandrapragada

unread,
May 27, 2024, 1:56:58 PMMay 27
to Chrome DevTools
I have opened a remote debugging port on the Chrome. With PostMan I have connected to the CDP websocket and sending some commads but most of the commands except Target domain are throwing with message like

Request :

{ "id":1, "method":"Network.enable", "params":{ "maxTotalBufferSize" :4096 } }

Resposne :

{"code":-32601,"message":"'Network.enable' wasn't found"}

I have tried commands of multiple domanis like Page,Network etc but all are throwing error like respective commands not found.I have tried adding sessionId also like but still not working nd throwing session id is invalid.

{ "id":1, "sessionId":<sessionid received from Target Attachment command> "method":"Network.enable", "params":{ "maxTotalBufferSize" :4096 }}

Why it is not working? Are there any settings I have missed?

Ghxst

unread,
Jun 21, 2024, 1:19:33 PM (8 days ago) Jun 21
to Chrome DevTools
I assume you're sending these to the "browser" WebSocket url?
The browser WebSocket looks like (for example): `ws://127.0.0.1:9222/devtools/browser/<identifier>`, you'll likely want to create a target first and then get the "page" WebSocket URL from `http://127.0.0.1:9222/json/list` which looks like `ws://127.0.0.1:9222/devtools/page/<identifier>`.
Reply all
Reply to author
Forward
0 new messages