Forum for support and discussion of the Chromium Embedded Framework (CEF)
Visit the
CEF Project Site
to download CEF and report issues.
Hi,
I think I've found a problem but not 100% sure. I'm trying to connect Chrome-Remote-Interface to my application but it's failing. Looking at the source for the interface, I can see this.
-
Code:
Select all
-
// Chrome-remote-interface/lib/devtools.js
// use the proper protocol fetcher
if (!browser.match(/^(Headless)?Chrome\//) &&
!browser.match(/^Microsoft Edge /) &&
!browser.match(/^node.js\//)) {
callback(new Error('Unknown implementation'));
return;
}
I think it's fetching information from "http://127.0.0.1:9222/json/version". Which has nothing filled in for my Browser field and therefore failing the match above.
{
"Browser": "",
"Protocol-Version": "1.2",
"User-Agent": "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36",
"V8-Version": "6.2.414.36",
"WebKit-Version": "537.36 (@a81f9fcaaff35205d07ef634bd8fc79e088c68ac)",
"webSocketDebuggerUrl": "ws://127.0.0.1:9222/devtools/browser/2aa2bfd7-b187-4bfc-8771-0526a937fd5a"
}
The error from my node then is:
Cannot connect to browser:
Error: Unknown implementation
at C:\dev\misc\puppeteerExample\node_modules\chrome-remote-interface\lib\devtools.js:29:22
at C:\dev\misc\puppeteerExample\node_modules\chrome-remote-interface\lib\devtools.js:96:13
at IncomingMessage.<anonymous> (C:\dev\misc\puppeteerExample\node_modules\chrome-remote-interface\lib\external-request.js:14:17)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
My question is, should this browser field in the json returned contain the word "Chrome" seeing as it effectively is that? Or is it possible for me to populate that field?
Thanks,
Stephen
{
"Browser": "Chrome/62.0.3202.89",
"Protocol-Version": "1.2",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36",
"V8-Version": "6.2.414.40",
"WebKit-Version": "537.36 (@4bc124ea2934343d106df5b937e78ce311311658)",
"webSocketDebuggerUrl": "ws://127.0.0.1:9222/devtools/browser/e6f20833-9b01-4096-828e-9951c4d330ed"
}
{
"Browser": "OPR/49.0.2725.34",
"Protocol-Version": "1.2",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36 OPR/49.0.2725.34",
"V8-Version": "6.2.414.32",
"WebKit-Version": "537.36 (@2c31ab2149989a4e28cc79ae77978536a83535e3)",
"webSocketDebuggerUrl": "ws://127.0.0.1:9444/devtools/browser/1cf61e04-b545-4649-8153-10e474b62e14"
}
That's Chrome and Opera respectively. I guess that interface doesn't support Opera even though it would work.
I think we can match the "Chrome" value used by Chrome/Chromium. Please add a bug in the CEF issue tracker and link back to this forum thread.
You might also want to file a bug with the Chrome-Remote-Interface project for Opera support (maybe they should just remove the browser check completely since it seems unlikely that "http://127.0.0.1:9222/json/version" will exist and not be DevTools remote debugging protocol).