0
  • Using OWSAP ZAP 2.8.0
  • On Ubuntu 19.04
  • With openjdk version 11.0.3 installed

When clicking the "Launch Browser" button on ZAP to launch the HUD enabled browser for ZAP, no browser is launched and an error is printed in the terminal (full output below).

I have already tried Chromium and Firefox - both have the same issue.

Another issue I've been experiencing, although potentially unrelated, is that when trying to use ZAP in Firefox I am unable to visit HTTPS sites due to the certificate not working correctly (even though it's installed on Firefox).

I have also tried launching it with sudo zaproxy (as opposed to just zaproxy)

While writing this I restarted ZAP and now the "Enable HUD" checkbox is unchecked and disabled (greyed out); clicking "Launch Browser" does nothing and prints the same error.

1564053694462   mozrunner::runner   INFO    Running command: "/usr/lib/firefox/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.RrRH7dDl2ZK7"
1564053694915   addons.webextension.screenshots@mozilla.org WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1564053694915   addons.webextension.screenshots@mozilla.org WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1564053694915   addons.webextension.screenshots@mozilla.org WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1564053694915   addons.webextension.screenshots@mozilla.org WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
ExceptionHandler::GenerateDump cloned child 4758
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
59660 [ZAP-BrowserLauncher] ERROR org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch  - invalid argument: can't kill an exited process
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'my-ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '5.0.0-21-generic', java.version: '11.0.3'
Driver info: driver.version: FirefoxDriver
remote stacktrace: 
org.openqa.selenium.WebDriverException: invalid argument: can't kill an exited process
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'my-ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '5.0.0-21-generic', java.version: '11.0.3'
Driver info: driver.version: FirefoxDriver
remote stacktrace: 
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
    at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
    at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
    at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
    at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:777)
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:700)
    at org.zaproxy.zap.extension.selenium.internal.BuiltInSingleWebDriverProvider.getWebDriver(BuiltInSingleWebDriverProvider.java:62)
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:639)
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:509)
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowser(ExtensionSelenium.java:602)
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:566)
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:552)
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:542)
    at org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch$2.run(ExtensionQuickStartLaunch.java:227)
    at java.base/java.lang.Thread.run(Thread.java:834)


Was recommended to replace openjdk with oracle's java. After uninstalling openjkd and installing java 12.0.2 I am still experiencing the same issue. Now, when running zap with sudo, I get the following error:

/snap/zaproxy/4/zap.sh: line 51: [: -ge: unary operator expected
/snap/zaproxy/4/zap.sh: line 54: [: -ge: unary operator expected
Exiting: ZAP requires a minimum of Java 8 to run, found 

Running java --version displays java 12.0.2 2019-07-16

0

I've had problems in the past using openjdk with ZAP that went away after switching to the regular propietary Oracle JDK.

  • I recall seeing errors when using zap regarding version 11 openjdk being too new, something related to "this feature only supported on version 8" . – john doe Jul 25 at 15:22
  • After uninstalling openjdk and installing java 12.0.2, I am still experiencing the same issue – Grub Jul 26 at 8:16
  • Try 1.8 JDK from: java.com/en/download/linux_manual.jsp – user10216038 – user10216038 Jul 26 at 20:09
  • Also, the "unary operator expected" error is common when Java is not automatically found. Running "java -version" from your Home Directory should show what java is linked by default. – user10216038 Jul 27 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.