zaproxy: bad path for selenium webdrivers in weekly builds
Describe the bug
Weekly builds look for selenium webdrivers in $HOME/.ZAP/webdriver/linux/64/chromedriver and $HOME/.ZAP/webdriver/linux/64/geckodriver but those paths are created and used by stable/release builds which may not be installed on the system.
Weekly builds should look in $HOME/.ZAP_D. There may be other such instances.
Steps to reproduce the behavior
- remove $HOME/.ZAP directory
- install and run weekly build (which uses $HOME/.ZAP_D
- use quick launch to launch either browser (chrome/firefox)
Actual: error that selected browser is unavailable; console errors show bad path as indicated
Expected behavior
launch browser
Software versions
OWASP ZAP
Version: D-2022-06-07
Installed Add-ons: [[id=accessControl, version=8.0.0],
[id=alertFilters, version=14.0.0], [id=ascanrules,
version=47.0.0], [id=ascanrulesAlpha, version=38.0.0],
[id=ascanrulesBeta, version=41.0.0], [id=automation,
version=0.16.0], [id=bruteforce, version=12.0.0],
[id=callhome, version=0.4.0], [id=commonlib,
version=1.10.0], [id=communityScripts, version=14.0.0],
[id=coreLang, version=16.0.0], [id=custompayloads,
version=0.11.0], [id=diff, version=12.0.0],
[id=directorylistv1, version=6.0.0], [id=directorylistv2_3,
version=4.0.0], [id=directorylistv2_3_lc, version=4.0.0],
[id=domxss, version=13.0.0], [id=encoder, version=0.7.0],
[id=exim, version=0.2.0], [id=fileupload, version=1.1.0],
[id=formhandler, version=5.0.0], [id=fuzz, version=13.7.0],
[id=gettingStarted, version=14.0.0], [id=graaljs,
version=0.3.0], [id=graphql, version=0.10.0], [id=help,
version=15.0.0], [id=hud, version=0.14.0],
[id=imagelocationscanner, version=3.0.0], [id=invoke,
version=12.0.0], [id=jsonview, version=2.0.0], [id=jwt,
version=1.0.2], [id=jython, version=12.0.0], [id=network,
version=0.3.0], [id=oast, version=0.11.0], [id=onlineMenu,
version=10.0.0], [id=openapi, version=28.0.0],
[id=plugnhack, version=13.0.0], [id=portscan,
version=10.0.0], [id=pscanrules, version=41.0.0],
[id=pscanrulesAlpha, version=35.0.0], [id=pscanrulesBeta,
version=30.0.0], [id=quickstart, version=34.0.0],
[id=replacer, version=10.0.0], [id=reports, version=0.14.0],
[id=retest, version=0.3.0], [id=retire, version=0.13.0],
[id=reveal, version=5.0.0], [id=scripts, version=31.0.0],
[id=selenium, version=15.10.0], [id=sequence,
version=7.0.0], [id=soap, version=14.0.0], [id=spiderAjax,
version=23.8.0], [id=sqliplugin, version=15.0.0], [id=tips,
version=10.0.0], [id=wappalyzer, version=21.11.0],
[id=webdriverlinux, version=40.0.0], [id=webdrivermacos,
version=41.0.0], [id=webdriverwindows, version=40.0.0],
[id=websocket, version=27.0.0], [id=zest, version=36.0.0]]
Operating System: Linux
Java Version: Private Build 11.0.15
System's Locale: en_US
Display Locale: en_GB
Format Locale: en_US
Default Charset: UTF-8
ZAP Home Directory: /home/user/.ZAP_D/
ZAP Installation Directory: /home/user/Downloads/ZAP_D-2022-06-07/./
Look and Feel: FlatLaf Darcula (com.formdev.flatlaf.FlatDarculaLaf)
Screenshots
No response
Errors from the zap.log file
354765 [ZAP-BrowserLauncher] ERROR org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch - The driver executable does not exist: /home/user/.ZAP/webdriver/linux/64/geckodriver
java.lang.IllegalStateException: The driver executable does not exist: /home/user/.ZAP/webdriver/linux/64/geckodriver
at com.google.common.base.Preconditions.checkState(Preconditions.java:585) ~[?:?]
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:146) ~[?:?]
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:141) ~[?:?]
at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:44) ~[?:?]
at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:167) ~[?:?]
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:355) ~[?:?]
at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:190) ~[?:?]
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:147) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:1037) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:881) ~[?:?]
at org.zaproxy.zap.extension.selenium.internal.BuiltInSingleWebDriverProvider.getWebDriver(BuiltInSingleWebDriverProvider.java:63) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:766) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:566) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowser(ExtensionSelenium.java:727) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:667) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:643) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:627) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:617) ~[?:?]
at org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch.lambda$launchBrowser$1(ExtensionQuickStartLaunch.java:214) ~[?:?]
at java.lang.Thread.run(Thread.java:829) ~[?:?]
421726 [ZAP-BrowserLauncher] ERROR org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch - The driver executable does not exist: /home/user/.ZAP/webdriver/linux/64/chromedriver
java.lang.IllegalStateException: The driver executable does not exist: /home/user/.ZAP/webdriver/linux/64/chromedriver
at com.google.common.base.Preconditions.checkState(Preconditions.java:585) ~[?:?]
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:146) ~[?:?]
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:141) ~[?:?]
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:35) ~[?:?]
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:159) ~[?:?]
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:355) ~[?:?]
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:94) ~[?:?]
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:157) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:980) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:881) ~[?:?]
at org.zaproxy.zap.extension.selenium.internal.BuiltInSingleWebDriverProvider.getWebDriver(BuiltInSingleWebDriverProvider.java:63) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:766) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:566) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowser(ExtensionSelenium.java:727) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:667) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:643) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:627) ~[?:?]
at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:617) ~[?:?]
at org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch.lambda$launchBrowser$1(ExtensionQuickStartLaunch.java:214) ~[?:?]
at java.lang.Thread.run(Thread.java:829) ~[?:?]
Additional context
No response
Would you like to help fix this issue?
- Yes
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 17 (9 by maintainers)
With directory issue are you referring to use of
.ZAP
when running weekly?which firefox
? In any case the problem you are seeing is the same that happens with snap, unable to create the profile in the temporary directory.