Hi all,
in the latest Canary version (62 for sure, maybe even 61) the generic discovery URL ws://localhost:9222/devtools/browser has stopped working and returns a 404.
I have not been able to determine the root cause or reason for this. Is anyone aware if this is a bug or a change that's here to stay?
I use that URL to connect via CDP to Canary to create a new Browser Context, create a Target in that Context and then connect via CDP to that new Target.
Example (Node.js with the chrome-remote-interface module)
const Chrome = require('chrome-remote-interface')
const browser = await Chrome({ target: 'ws://localhost:9222/devtools/browser' });
const { Target } = browser;
const { browserContextId } = await Target.createBrowserContext();
const { targetId } = await Target.createTarget({
url: 'about:blank',
browserContextId
});
this.browser = await Chrome({ target: targetId });
This now fails with "Error: unexpected server response (404)"
The
test in said module also fails now.
Is that now how to approach this anymore?
Thanks.