Launch Browser option not working

4,182 views
Skip to first unread message

Jim Solderitsch

unread,
Oct 16, 2017, 11:35:06 PM10/16/17
to OWASP ZAP User Group
Just installed the latest ZAP 2.6 and updated the plugins.

Running on Mac OS X 10.12.6

I saw Simon's video on the browser launch feature and my installed browsers appear as selectable.

Clicking one of them and then hitting the launch browser button does nothing.

If I select JxBrowser, an empty window appears with a green plus sign at the top. Clicking it does nothing as well.

Maybe a noobie lack of setup knowledge.

I do have an older ZAP version installed (2.5.0) as well that I did not uninstall first.

Could some preferences files/settings be getting in the way?

thc...@gmail.com

unread,
Oct 17, 2017, 3:37:51 AM10/17/17
to zaprox...@googlegroups.com
Hi.

Would you mind checking the log file (zap.log in home directory [1])
when that happens?


> Could some preferences files/settings be getting in the way?

In theory it should not cause any issues, but better to use a different
home directory for the older version (i.e. with -dir command line arg [2]).


[1] https://github.com/zaproxy/zaproxy/wiki/FAQconfig
[2] https://github.com/zaproxy/zap-core-help/wiki/HelpCmdline

Best regards.

Jim Solderitsch

unread,
Oct 17, 2017, 2:51:05 PM10/17/17
to OWASP ZAP User Group
I see errors in the log.

Here is a partial trace:

2017-10-16 22:59:53,532 INFO  ContextAuthenticationPanel - Creating new panel for configuring: Manual Authentication
2017-10-16 23:07:00,577 INFO  ExtensionHttpSessions - Added new session token for site 'localhost:80': PHPSESSID
2017-10-16 23:12:51,818 ERROR ExtensionQuickStartLaunch - org.apache.http.conn.HttpHostConnectException: Connect to localhost:47512 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused (Connection refused)
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'jjsretina', ip: 'fe80:0:0:0:485:1c92:cca:f3f8%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121'
Driver info: driver.version: FirefoxDriver
org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:47512 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused (Connection refused)
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'jjsretina', ip: 'fe80:0:0:0:485:1c92:cca:f3f8%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:137)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:137)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:677)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:624)
at org.zaproxy.zap.extension.selenium.internal.BuiltInSingleWebDriverProvider.getWebDriver(BuiltInSingleWebDriverProvider.java:62)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:596)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:487)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowser(ExtensionSelenium.java:567)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:536)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:524)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:515)
at org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch$2$1.run(ExtensionQuickStartLaunch.java:277)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:47512 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused (Connection refused)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:139)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:87)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:343)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:159)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
... 18 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
... 33 more
2017-10-16 23:14:44,376 ERROR ExtensionQuickStartLaunch - java.lang.reflect.InvocationTargetException
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'jjsretina', ip: 'fe80:0:0:0:485:1c92:cca:f3f8%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121'
Driver info: driver.version: unknown
org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'jjsretina', ip: 'fe80:0:0:0:485:1c92:cca:f3f8%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121'
Driver info: driver.version: unknown
at org.zaproxy.zap.extension.jxbrowsermacos.selenium.JxBrowserProvider.getRemoteWebDriver(JxBrowserProvider.java:108)
at org.zaproxy.zap.extension.jxbrowsermacos.selenium.JxBrowserProvider.getWebDriver(JxBrowserProvider.java:236)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:596)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:487)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowser(ExtensionSelenium.java:567)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:536)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:524)
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:515)
at org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch$2$1.run(ExtensionQuickStartLaunch.java:277)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
at org.zaproxy.zap.extension.jxbrowsermacos.selenium.JxBrowserProvider.getRemoteWebDriver(JxBrowserProvider.java:105)
... 9 more
Caused by: java.lang.ExceptionInInitializerError
at com.teamdev.jxbrowser.chromium.internal.ipc.IPC.getDefault(SourceFile:90)
at com.teamdev.jxbrowser.chromium.BrowserContext.<init>(SourceFile:53)
at com.teamdev.jxbrowser.chromium.BrowserContext.<clinit>(SourceFile:25)
at org.zaproxy.zap.extension.jxbrowsermacos.selenium.JxBrowserProvider.getRemoteWebDriverImpl(JxBrowserProvider.java:158)
at org.zaproxy.zap.extension.jxbrowsermacos.selenium.JxBrowserProvider.access$400(JxBrowserProvider.java:66)
at org.zaproxy.zap.extension.jxbrowsermacos.selenium.JxBrowserProvider$GetWebDriverRunnable.run(JxBrowserProvider.java:292)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.teamdev.jxbrowser.chromium.internal.ChromiumExtractorException: Failed to extract Chromium binaries into /var/folders/6v/1p1396h55_72kp8gnv3gsnv00000gq/T/jxbrowser-chromium-55.0.2883.87.6.14.2
at com.teamdev.jxbrowser.chromium.internal.ChromiumExtractor.extractChromiumBinariesIfNecessary(SourceFile:88)
at com.teamdev.jxbrowser.chromium.internal.ipc.IPC.<init>(SourceFile:66)
at com.teamdev.jxbrowser.chromium.internal.ipc.IPC.create(SourceFile:96)
at com.teamdev.jxbrowser.chromium.internal.ipc.IPC$a.<clinit>(SourceFile:467)
... 20 more
Caused by: java.lang.RuntimeException: java.io.IOException: Cannot run program "/var/folders/6v/1p1396h55_72kp8gnv3gsnv00000gq/T/jxbrowser-chromium-55.0.2883.87.6.14.2/7zr-mac": error=2, No such file or directory
at com.teamdev.jxbrowser.chromium.internal.XZExtractor.extract(SourceFile:45)
at com.teamdev.jxbrowser.chromium.internal.b.run(SourceFile:1066)
at java.security.AccessController.doPrivileged(Native Method)
at com.teamdev.jxbrowser.chromium.internal.ChromiumExtractor.extractChromiumBinariesIfNecessary(SourceFile:60)
... 23 more
Caused by: java.io.IOException: Cannot run program "/var/folders/6v/1p1396h55_72kp8gnv3gsnv00000gq/T/jxbrowser-chromium-55.0.2883.87.6.14.2/7zr-mac": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at com.teamdev.jxbrowser.chromium.internal.xz.XZ.decompress(SourceFile:18)
at com.teamdev.jxbrowser.chromium.internal.XZExtractor.extract(SourceFile:42)
... 26 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 30 more

Jim Solderitsch

unread,
Oct 17, 2017, 2:52:49 PM10/17/17
to OWASP ZAP User Group
I am running by double clicking the Zap icon in my Mac's application folder. Should I be using the command line instead?


On Tuesday, October 17, 2017 at 3:37:51 AM UTC-4, thc202 wrote:

thc...@gmail.com

unread,
Oct 20, 2017, 4:59:37 AM10/20/17
to zaprox...@googlegroups.com
That's just needed if you want to use the two ZAP versions at the same
time (to avoid mixing configs/add-ons but they should still work fine).

Best regards.

thc...@gmail.com

unread,
Oct 20, 2017, 5:00:27 AM10/20/17
to zaprox...@googlegroups.com
Thanks for the details!

What version of Firefox are you using?

JxBrowser seems to be failing to extract its files, do you know if
ZAP/Java has write permissions to the mentioned dirs?

Best regards.

Jim Solderitsch

unread,
Oct 23, 2017, 1:11:18 PM10/23/17
to OWASP ZAP User Group
I downloaded the linux version of ZAP and running the script zap.sh launches ZAP 2.6 and from that application GUI using my own installed Java, I can invoke JXBrowser and my installed version of Firefox.

java -version shows 

java version "1.8.0_152"

Java(TM) SE Runtime Environment (build 1.8.0_152-b16)

Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)


But there is an annoying GUI glitch in the ZAP sites tree view when clicking an item: the clicked item becomes invisible. If use the arrow keys to move between items, the item left after the key click becomes visible again and the new item becomes invisible.

Using the latest version of Firefox.

thc...@gmail.com

unread,
Oct 23, 2017, 1:17:16 PM10/23/17
to zaprox...@googlegroups.com
Thanks again :)

Will update the issues with the latest information you provided.

(For the GUI glitch you need to use one of the weeklies.)

Best regards.
Reply all
Reply to author
Forward
0 new messages