browsermob-proxy icon indicating copy to clipboard operation
browsermob-proxy copied to clipboard

No Response error using BrowserMobProxy with Chrome

Open njajay opened this issue 7 years ago • 8 comments

We are seeing below error message in response for some request and har capture gets aborted at that point . Due to this we are not able to capture the complete har file. I dont see any issue with selenium test/page as when we look at the seleniumtest while test is running we can see page load is complete, only BrowserMobProxy failed to capture all requests.

Can you please let us know what would cause this error and how we can handle this.

Error seen for request before har capture stops: "response": { "status": 0, "statusText": "", "httpVersion": "unknown", "cookies": [], "headers": [], "content": { "size": 0, "mimeType": "", "comment": "" }, "redirectURL": "", "headersSize": -1, "bodySize": -1, "comment": "", "_error": "No response received" },

We are using 2.1.4 BrowserMobProxy with ChromeWebdriver on OEL7 . BrowserMobProxy is running in Embedded mode .

njajay avatar Nov 01 '17 10:11 njajay

this is what I see the browsermob code

/**
 * The error message that will be populated in the _error field of the {@link HarResponse} when no response is received
 * from the server for any reason other than a server response timeout.
 */
private static final String NO_RESPONSE_RECEIVED_ERROR_MESSAGE = "No response received";

mediga avatar Nov 21 '17 13:11 mediga

I'm seeing the same thing using bmp 2.1.4 when running selenium tests (webdriverio). This happens randomly though, sometimes all requests go through properly, but once in a while I get a response such as:

"response": {
"status": 0,
"statusText": "",
"httpVersion": "unknown",
"cookies": [],
"headers": [],
"content": {
"size": 0,
"mimeType": "",
"comment": ""
},
"redirectURL": "",
"headersSize": -1,
"bodySize": -1,
"comment": "",
"_error": "No response received"
}

which causes subsequent test failures. Is there any plan to release a binary of bmp 2.1.5?

eyalzek avatar Feb 15 '18 16:02 eyalzek

Java binary is already available for version 2.1.5

mediga avatar Feb 15 '18 17:02 mediga

I meant a standalone binary release (https://github.com/lightbody/browsermob-proxy/releases), to keep existing build scripts working by only bumping a version instead of having to build from source

eyalzek avatar Feb 15 '18 22:02 eyalzek

you are right, its not on the releases page. will let @jekh comment. the quickest way would be to build it yourselves

mediga avatar Feb 17 '18 23:02 mediga

After testing for a few days with bmp 2.1.5, I'm still seeing "No response received" once in a while...

eyalzek avatar Feb 22 '18 11:02 eyalzek

I have the same problem

stingbo avatar Dec 21 '20 10:12 stingbo

I have the same problem

When I used proxy.wait_for_traffic_to_stop(1, 1000) , the problem was solved

stingbo avatar Dec 22 '20 06:12 stingbo