MachinePublishers / jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java
Other
809 stars 143 forks source link

java.lang.NullPointerException: Inflater has been closed #284

Closed static-max closed 7 years ago

static-max commented 7 years ago

jbrowserdriver: 0.17.8 JDK: 1.8.0_112-b15 OS: Windows 10

Sometimes I get this exception, directly after starting the headless webdriver and opening the first page:

[2017-07-03T07:52:43.964][Instance 22][Port 62555] java.lang.NullPointerException: Inflater has been closed
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.util.zip.Inflater.ensureOpen(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.util.zip.Inflater.inflate(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.util.zip.InflaterInputStream.read(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.util.zip.GZIPInputStream.read(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at org.apache.http.client.entity.LazyDecompressingInputStream.read(LazyDecompressingInputStream.java:73)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at com.machinepublishers.jbrowserdriver.Util.toBytes(Util.java:98)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at com.machinepublishers.jbrowserdriver.ResponseHandler.handleResponse(ResponseHandler.java:52)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at com.machinepublishers.jbrowserdriver.StreamConnection.getInputStream(StreamConnection.java:408)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at com.sun.webkit.network.URLLoader.receiveResponse(URLLoader.java:507)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at com.sun.webkit.network.URLLoader.doRun(URLLoader.java:164)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at com.sun.webkit.network.URLLoader.lambda$run$96(URLLoader.java:129)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.security.AccessController.doPrivileged(Native Method)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at com.sun.webkit.network.URLLoader.run(URLLoader.java:128)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.util.concurrent.FutureTask.run(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]      at java.lang.Thread.run(Unknown Source)
[2017-07-03T07:52:43.980][Instance 22][Port 62555]
java.lang.NullPointerException
        at c.t.scraper.Scraper.go(Scraper.java:97)

No other error is logged before this one.

hollingsworthd commented 7 years ago

This has been commonly encountered by people but apparently doesn't cause too serious of problems. If that's not the case, will be curious to know. See #242 going forward. Thanks for submitting these issues. Duplicates are fine--the more info the better.