Unexpected end of ZLIB input stream

328 views
Skip to first unread message

Vasyl Vaskul

unread,
Aug 28, 2013, 10:23:47 AM8/28/13
to browserm...@googlegroups.com
I have the following exception while using browsermob: 

 INFO 08/28 14:20:29 n.l.b.p.BrowserMobP~ - Exception while proxying http://static.ak.fbcdn.net/rsrc.php/v2/yk/r/_6PVaUm7dAE.js
   [testng] java.lang.RuntimeException: java.io.EOFException: Unexpected end of ZLIB input stream
   [testng] at net.lightbody.bmp.proxy.http.BrowserMobHttpClient.execute(BrowserMobHttpClient.java:739)
   [testng] at net.lightbody.bmp.proxy.http.BrowserMobHttpClient.execute(BrowserMobHttpClient.java:392)
   [testng] at net.lightbody.bmp.proxy.http.BrowserMobHttpRequest.execute(BrowserMobHttpRequest.java:157)
   [testng] at net.lightbody.bmp.proxy.BrowserMobProxyHandler.proxyPlainTextRequest(BrowserMobProxyHandler.java:264)
   [testng] at net.lightbody.bmp.proxy.selenium.SeleniumProxyHandler.handle(SeleniumProxyHandler.java:185)
   [testng] at net.lightbody.bmp.proxy.jetty.http.HttpContext.handle(HttpContext.java:1509)
   [testng] at net.lightbody.bmp.proxy.jetty.http.HttpContext.handle(HttpContext.java:1461)
   [testng] at net.lightbody.bmp.proxy.jetty.http.HttpServer.service(HttpServer.java:892)
   [testng] at net.lightbody.bmp.proxy.jetty.http.HttpConnection.service(HttpConnection.java:815)
   [testng] at net.lightbody.bmp.proxy.jetty.http.HttpConnection.handleNext(HttpConnection.java:981)
   [testng] at net.lightbody.bmp.proxy.jetty.http.HttpConnection.handle(HttpConnection.java:832)
   [testng] at net.lightbody.bmp.proxy.jetty.http.SocketListener.handleConnection(SocketListener.java:245)
   [testng] at net.lightbody.bmp.proxy.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
   [testng] at net.lightbody.bmp.proxy.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
   [testng] Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
   [testng] at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
   [testng] at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
   [testng] at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:116)
   [testng] at java.io.FilterInputStream.read(FilterInputStream.java:107)
   [testng] at net.lightbody.bmp.proxy.util.IOUtils.copy(IOUtils.java:12)
   [testng] at net.lightbody.bmp.proxy.http.BrowserMobHttpClient.execute(BrowserMobHttpClient.java:737)
   [testng] ... 13 more

I am using testng run tests in parallel, selenium grid with browsermob, jdk 1.7

Thanks in advance. 

Patrick Lightbody

unread,
Sep 15, 2013, 5:30:50 PM9/15/13
to browserm...@googlegroups.com
Can you give me a bit more of a test case? I tried this test case and it passes fine:

public class MailingListIssuesTest extends DummyServerTest {
    @Test
    public void zlibIssue() throws IOException, InterruptedException {
        proxy.setCaptureContent(true);
        proxy.newHar("Test");

        HttpGet get = new HttpGet("http://static.ak.fbcdn.net/rsrc.php/v2/yk/r/_6PVaUm7dAE.js");
        HttpResponse response = client.execute(get);
        IOUtils.readFully(response.getEntity().getContent());

        Assert.assertEquals(200, response.getStatusLine().getStatusCode());

        Har har = proxy.getHar();
        Assert.assertEquals(200, har.getLog().getEntries().get(0).getResponse().getStatus());
    }
}

Note: this is a modification of MailingListIssuesTest.java in the project. I did NOT, however, check this test in as I prefer to avoid hitting public URLs that look like they can change regularly, such as this one.

Patrick

--
 
---
You received this message because you are subscribed to the Google Groups "BrowserMob Proxy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to browsermob-pro...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Vasyl Vaskul

unread,
Sep 18, 2013, 7:55:15 PM9/18/13
to browserm...@googlegroups.com
I am using Selenium Interpreter to play selenium tests using RemoteWebDriver with browsermob proxy.
Server running browsermob proxy and server launching browser with proxy are different servers.
Reply all
Reply to author
Forward
0 new messages