I'm running a home-rolled debugging app on CentOS 6, attached to a
build of Chromium "17.0.927.0 (Developer Build 108270 Linux) custom"
(BUILDTYPE=Release, I don't have enough ram to compile for Debug)
Command line switches are:
--proxy-server=
our.proxyserver.com:1234
--remote-debugging-port=<an available port>
--disable-popup-blocking
--user-data-dir=<a new directory in temp>
--disable-translate
--no-default-browser-check
--no-message-box
--no-process-singleton-dialog
--noerrdialogs
--no-first-run
--disable-geolocation
about:blank
I send some initialization messages:
{"method": "Console.enable", "id": 23}
{"method": "Console.clearMessages", "id": 24}
{"method": "Network.clearBrowserCache", "id": 25}
{"method": "Network.clearBrowserCookies", "id": 26}
{"method": "Network.enable", "id": 27}
{"method": "Page.enable", "id": 28}
{"method": "Network.setUserAgentOverride", "id": 29, "params":
{"userAgent": "Mozilla/5.0 (Linux; U; Android 2.2.2; en-us; SPH-M920
Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile
Safari/533.1"}}
{"method": "Network.setExtraHTTPHeaders", "id": 30, "params":
{"headers": { "Accept-Encoding": "gzip" } } }
{"method": "Page.open", "id": 31, "params": {"url": "http://
www.google.com/"}}
(Note that I'm sending the UA string for a Samsumg Android phone, so
I'm receiving a mobile version of the page
www.google.com.)
At this point I receive the expected Network.requestWillBeSent,
Network.responseReceived, Network.dataReceived, and
Network.loadingFinished messages for various resources followed by a
Page.loadedEventFired.
If I modify my code to request the body of each resource immediately
after I receive the Network.loadingFinished for that resource, a few
funny things happen:
2011-11-04 10:11:55,824 DEBUG [Thread-11] ChromeSocketClient -
Sending: {"id": 34,"method": "Network.getResponseBody","params":
{"requestId": "8415.13"}}
1) I never get any response on 2 or more resources from
www.google.com,
including not receiving an error message of any kind. This varies,
sometimes I'll see 3 or 4 with no response. I get the expected bodies
for the other elements, and generally get the HTML for the base page.
2011-11-04 10:14:55,504 DEBUG [http-80-2] 2 outstanding content
requests:
2011-11-04 10:14:55,506 DEBUG [http-80-2] 34 -->
http://www.google.com/extern_js/f/CgJlbhICdXMrMEU4ACwrMFo4ACwrMA44ACwrMBc4ACwrMDw4ACwrMFE4ACwrMJgBOAAsKzAKOACaAgNtb2IsKzAWOAAsKzAZOAAsKzA1OAAsKzBBOAAsKzBNOAAsKzBOOAAsKzBTOACaAgZzZWFyY2gsKzBUOAAsKzBpOAAsKzBrOAAsKzB2OAAsKzB7OAAsKzCAATgALCswhAE4ACwrMIoBOAAsKzCMATgALCswkgE4ACwrMJYBOAAsKzCoATgALCswrAE4ACwrMLMBOAAsKzC-ATgALCswdzgALCswiwE4ACwrMBg4ACwrMCY4ACyAAlaQAlY/OtFzXg6qbKk.js
2011-11-04 10:14:55,506 DEBUG [http-80-2] 35 -->
http://www.google.com/mbd?mbtype=56&hl=en
I'll also occasionally not get a body for this one:
2011-11-04 11:04:26,836 DEBUG [http-80-2] Harlet - 34 -->
http://www.google.com/images/srpr/logo3w.png
And I'll occasionally see , late in the logfile,
Network.requestWillBeSent messages for the following that are never
followed up with any response, data or loaded messages:
2011-11-04 11:04:26,839 DEBUG [http-80-2] Harlet - never received
loadingFinished for rc:
http://clients1.google.com/generate_204
2011-11-04 11:04:26,839 DEBUG [http-80-2] Harlet - never received
loadingFinished for rc:
http://www.gstatic.com/m/images/gray_dot.png
2) I never* receive the Page.loadedEventFired message.
* - I have seen once or twice where I received the
Page.loadedEventFired message, and instead received no responses to
any of the Network.getResponseBody requests.
I also tried waiting until the Page.loadedEventFired is received and
then asking for the content of each item, first in batch and then
later one at a time. In both cases I never received any response to
any of the content requests.
I've tested on a few sites, really just prototyping at this point.
The
www.google.com mobile site is where I'm consistently seeing these
issues. I believe I had fewer issues on Windows with a Chrome dev
binary. I'm not set up to verify that right now but it may be my next
step.
Anyone have any thoughts on how to get to the root of this, or
anecdotes about remote debugging being unstable and/or non-
deterministic (on Chromium, CentOS, Linux or in general)?
It's almost as though the remote debugging thread(s) are dying in the
browser, is there a logging facility that I can turn on to see any
error messages or dumps from the browser side?
Thanks for any ideas you may have.
BR
Nathan