AlexRee / chromedevtools

Automatically exported from code.google.com/p/chromedevtools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

"Failed to get protocol version from remote" when connecting to chromium #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
SDK/Debugger version: 0.3.2.201112130208
Eclipse version: 3.7.1, 64 bit (Build id: 20110916-0149)
Google Chrome/V8 Embedder + version: Chromium 18.0.971.0 (Developer Build 
114389 Windows)
OS + version: Windows Server 2008 R2, 64 bit

What steps will reproduce the problem?
1. Run Chromium with argument --remote-debugging-port=9222
2. Run Chromium JavaScript debug in Eclipse

What is the expected result?
The tab selection should appear.

What happens instead?
An Error pops up:
Failed to connect to the remote browser
Failed to get protocol version from remote

Please provide any additional information below. If possible, attach a
(reduced) test-case.

The stack trace in the error log says:
java.io.IOException: Failed to get protocol version from remote
    at org.chromium.sdk.internal.v8native.JavascriptVmImpl.newIOException(JavascriptVmImpl.java:93)
    at org.chromium.sdk.internal.shellprotocol.BrowserImpl$Session.<init>(BrowserImpl.java:110)
    at org.chromium.sdk.internal.shellprotocol.BrowserImpl$ConnectionSessionManager.newSessionObject(BrowserImpl.java:334)
    at org.chromium.sdk.internal.shellprotocol.BrowserImpl$ConnectionSessionManager.newSessionObject(BrowserImpl.java:1)
    at org.chromium.sdk.internal.shellprotocol.SessionManager.connect(SessionManager.java:79)
    at org.chromium.sdk.internal.shellprotocol.BrowserImpl.connectInternal(BrowserImpl.java:68)
    at org.chromium.sdk.internal.shellprotocol.BrowserImpl.createTabFetcher(BrowserImpl.java:61)
    at org.chromium.debug.core.model.JavascriptVmEmbedderFactory.connect(JavascriptVmEmbedderFactory.java:83)
    at org.chromium.debug.core.model.JavascriptVmEmbedderFactory.connectToChromeDevTools(JavascriptVmEmbedderFactory.java:50)
    at org.chromium.debug.ui.launcher.ChromiumLaunchType.createConnectionToRemote(ChromiumLaunchType.java:33)
    at org.chromium.debug.ui.launcher.LaunchTypeBase.launch(LaunchTypeBase.java:57)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.util.concurrent.TimeoutException: Failed to get version 
response in 3000 ms
    at org.chromium.sdk.internal.shellprotocol.tools.devtools.DevToolsServiceHandler.version(DevToolsServiceHandler.java:239)
    at org.chromium.sdk.internal.shellprotocol.BrowserImpl$Session.<init>(BrowserImpl.java:108)
    ... 14 more

Original issue reported on code.google.com by g.vanboc...@odr.de on 14 Dec 2011 at 10:21

GoogleCodeExporter commented 9 years ago
Note 2 competing protocols:
You start Chrome with this protocol
http://code.google.com/p/chromedevtools/wiki/WIP#Protocol_Name

and you start debugger with this protocol
http://code.google.com/p/chromedevtools/wiki/ChromeDevToolsProtocol#Protocol_Nam
e

Original comment by peter.ry...@gmail.com on 14 Dec 2011 at 12:26

GoogleCodeExporter commented 9 years ago
Let me cite http://code.google.com/p/chromedevtools/wiki/ChromeDevToolsProtocol

"ChromeDevTools protocol should be considered deprecated. Google 
Chrome/Chromium browser discontinued its support in 17.0.950.* version (between 
developer builds 111534 and 111559)."

Does that mean, i have to use an outdated Chrome/Chromium to debug with Eclipse?

The manual at http://code.google.com/p/chromedevtools/ mentions both protocols 
whereas the remote shell is outdated and the remote debugging will not work 
with the chromedevtools. So this manual is quite misleading.

Original comment by g.vanboc...@odr.de on 14 Dec 2011 at 1:09

GoogleCodeExporter commented 9 years ago
The documentation is not fully update. Thanks for noting this.

In short for WebKit Remote Debugging Protocol you should create another launch 
configuration:
WebKit Protocol.

We are expecting that users switch to WebKit protocol, because Chrome is 
auto-updated and soon all Chrome browsers will support WebKit Remote Debugging 
Protocol only.

Original comment by peter.ry...@gmail.com on 14 Dec 2011 at 6:09

GoogleCodeExporter commented 9 years ago
Thank you to clarify this. I didn't notice there is a WebKit run configuration.

Original comment by g.vanboc...@odr.de on 15 Dec 2011 at 7:35

GoogleCodeExporter commented 9 years ago
Can somebody tell me what the conclusion to all of this is please? I've tried 
starting chrome with --remote-debugging-port=9222 and remote-shell but neither 
work. When using the debugging version I get bot errors mentioned above, 
otherwise just the failed to connect error.

How do I get the latest version of the devtools to work with the latest Chrome 
version? Ty

Original comment by little.s...@gmail.com on 24 Feb 2012 at 4:15

GoogleCodeExporter commented 9 years ago
I was following this tutorial: http://www.youtube.com/watch?v=tzvZj3w_PVY 
which doesn't seem to work any more. I now managed to add a webkit protocol 
debug mode while using the debugging parameter to start chrome. When I try to 
debug the page doesn't get opened for some reason but if I open it manually I 
can run and debug it. 

Original comment by little.s...@gmail.com on 24 Feb 2012 at 4:29

GoogleCodeExporter commented 9 years ago
I had this problem. Please, let me know how to fix it.

Original comment by yu.pitom...@gmail.com on 30 May 2013 at 10:32

GoogleCodeExporter commented 9 years ago
yu.pitomets,
see comment #3

Original comment by peter.ry...@gmail.com on 30 May 2013 at 3:51

GoogleCodeExporter commented 9 years ago
In other words, you must be creating a wrong type of launch configuration. The 
correct one is called  "WebKit Protocol".

Original comment by peter.ry...@gmail.com on 30 May 2013 at 3:52