Connection was aborted by the software in your host machine
See original GitHub issueHere is my code: proxy = new BrowserMobProxyServer(); proxy.setConnectTimeout(20, TimeUnit.SECONDS); proxy.setIdleConnectionTimeout(20, TimeUnit.SECONDS); proxy.setRequestTimeout(20, TimeUnit.SECONDS); // proxy.setMitmDisabled(true); proxy.start(0); Proxy prox = ClientUtil.createSeleniumProxy(proxy); capabilities.setCapability(CapabilityType.PROXY, prox); driver = new PhantomJSDriver(capabilities);
// time out for script should not be longer than page load timout.
driver.manage().timeouts().setScriptTimeout(20, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
driver.getErrorHandler().setIncludeServerErrors(true);
// create a new HAR
proxy.newHar(target);
driver.get(target);
// get the HAR data
Har har = proxy.getHar();
proxy.endHar();
proxy.stop();
driver.quit();
return har;
I saw some of these exception in the log, are they bad? and what’s cause of those exception? I don’t think the page was timing out, if it’s so, there would be a timeout exception I believe.
java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_25] at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[?:1.8.0_25] at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0_25] at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0_25] at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379) ~[?:1.8.0_25] at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:447) ~[browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881) ~[browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:241) ~[browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119) [browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111) [browsermob-dist-2.1.0-beta-3-SNAPSHOT.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
Issue Analytics
- State:
- Created 8 years ago
- Comments:14
Top GitHub Comments
I am using Firefox.
@mohammed16 download CORS extension in google chrome, enable it and then, in Intercepted URLs copy the route you want.