Your Firefox profile cannot be loaded. It may be missing or inaccessible.

1,346 views
Skip to first unread message

BGS 20

unread,
Jan 14, 2023, 9:31:40 PM1/14/23
to OWASP ZAP User Group
ican't launch firefox in zap
Screenshot from 2023-01-15 04-26-39.png

kingthorin+owaspzap

unread,
Jan 15, 2023, 11:46:18 AM1/15/23
to OWASP ZAP User Group
OS?
Java version?
ZAP version?
Web driver addon version?
Selenium addon version?
Quickstart addon version?

How are you starting ZAP?

Johny White

unread,
Feb 16, 2023, 6:38:13 AM2/16/23
to OWASP ZAP User Group
Hi all! I have the same problem when launching Firefox. After this message, another window appears: the provided browser was not found.

my $PATH=/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin

the firefox binary located at : /usr/bin/firefox , /bin/firefox, snap/bin/firefox

OS: Ubuntu 22.04.1 LTS
--------------------------------------------
Java version : openjdk 17.0.5 2022-10-18
OpenJDK Runtime Environment (build 17.0.5+8-Ubuntu-2ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.5+8-Ubuntu-2ubuntu122.04, mixed mode, sharing)
--------------------------------------------------------
ZAP: 2.12.0
selenium addon version : selenium 15.11.0
Quickstrat: 35.0.0

I don't know how to see the version of the webdrivers, but they come with the app folder. All addons have been updated.

I start the zap through the icon, but also tried to start from cmd . Zap is located in the /opt/zaproxy/
------------------------------------------------
-rwxr-xr-x 1 root root zap.sh

I tried deleting the webdriver folder and restarting the zap - it did not help.

firefox root profile directory:
/home/$user/snap/firefox/common/.mozilla/firefox/profile.default

firefox local profile directory:
/home/$user/snap/firefox/common/.cache/mozilla/firefox/profile.default

And ZAP logs:

2023-02-16 13:55:20,152 [ZAP-BrowserLauncher] ERROR ExtensionQuickStartLaunch - Process unexpectedly closed with status 1
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'host', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-56-generic', java.version: '17.0.5'
Driver info: driver.version: FirefoxDriver
remote stacktrace:
org.openqa.selenium.WebDriverException: Process unexpectedly closed with status 1
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'host', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-56-generic', java.version: '17.0.5'
Driver info: driver.version: FirefoxDriver
remote stacktrace:
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
    at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62) ~[?:?]
    at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30) ~[?:?]
    at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126) ~[?:?]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
    at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:1002) ~[?:?]
    at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?]
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
    at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) ~[?:?]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
    at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647) ~[?:?]
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128) ~[?:?]
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74) ~[?:?]
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136) ~[?:?]
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) ~[?:?]
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) ~[?:?]
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) ~[?:?]
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131) ~[?:?]
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:147) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:1052) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:896) ~[?:?]
    at org.zaproxy.zap.extension.selenium.internal.BuiltInSingleWebDriverProvider.getWebDriver(BuiltInSingleWebDriverProvider.java:63) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriverImpl(ExtensionSelenium.java:773) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getWebDriver(ExtensionSelenium.java:573) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowser(ExtensionSelenium.java:734) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:674) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:650) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:634) ~[?:?]
    at org.zaproxy.zap.extension.selenium.ExtensionSelenium.getProxiedBrowserByName(ExtensionSelenium.java:624) ~[?:?]
    at org.zaproxy.zap.extension.quickstart.launch.ExtensionQuickStartLaunch.lambda$launchBrowser$1(ExtensionQuickStartLaunch.java:214) ~[?:?]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]



воскресенье, 15 января 2023 г. в 19:46:18 UTC+3, kingthorin+owaspzap:

thc...@gmail.com

unread,
Feb 16, 2023, 7:37:29 AM2/16/23
to zaprox...@googlegroups.com
This is a problem related to snap, there's a workaround:
https://github.com/mozilla/geckodriver/releases/tag/v0.32.0

You would have to define TMPDIR to a location that both firefox and
geckodriver can write to.

Best regards.

Johny White

unread,
Feb 17, 2023, 2:46:23 AM2/17/23
to OWASP ZAP User Group
It's strange, but it still doesn't work for me.

$ TMPDIR=$HOME/tmp geckodriver --profile-root=~/tmp
/snap/firefox/2356/usr/lib/firefox/geckodriver: error: Unable to write to temporary directory; consider --profile-root with a writeable directory
geckodriver 0.32.0 ( 2023-02-14)
WebDriver implementation for Firefox


Also tried:
$ export TMPDIR=$HOME/tmp geckodriver

But ZAP still keeps giving the error

Also tried other user directories, but no luck

https://github.com/mozilla/geckodriver/issues/2010 The last comment suggests that not only I have problems with the gecodriver
четверг, 16 февраля 2023 г. в 15:37:29 UTC+3, thc202:

thc...@gmail.com

unread,
Feb 17, 2023, 4:55:48 AM2/17/23
to zaprox...@googlegroups.com
Did you ensure that the tmp directory you created as the required
permissions for geckodriver and Firefox to write to it?

Best regards.

Johny White

unread,
Feb 17, 2023, 5:56:38 AM2/17/23
to OWASP ZAP User Group
Like all rights are allowed

drwxrwxrwx  2 user user  tmp

when I specify the full path or through the environment variable that I set earlier, the following is launched:
$geckodriver --profile-root=$TMPDIR
1676629932214    geckodriver    INFO    Listening on 127.0.0.1:4444

Should firefox be launched in ZAP now? Just an error also says that the profile was not found.

I will attach a screenshot of the setting in ZAP, at which it says that the profile was not found
Settings-profile-not found.png

The logs says:
Driver info: driver.version: FirefoxDriver
remote stacktrace:
org.openqa.selenium.WebDriverException: Process unexpectedly closed with status 1

But when I try to specify a local gecodriver, the "Profile not found" error disappears, but it says that the browser cannot be found, although I tried to manually point to the local browser along the path /usr/bin/firefox
settings2.png

After the above setup, the logs write:
Driver info: driver.version: FirefoxDriver
remote stacktrace:
org.openqa.selenium.SessionNotCreatedException: Failed to start browser /usr/bin/firefox: no such file or directory

settings3.png
After the above setup, the logs wite:
Driver info: driver.version: FirefoxDriver
remote stacktrace:
org.openqa.selenium.InvalidArgumentException: binary is not a Firefox executable

My firefox version in newest 109.0 (64bit) Snap for Ubuntu, canonical-002 - 1.0
пятница, 17 февраля 2023 г. в 12:55:48 UTC+3, thc202:
Reply all
Reply to author
Forward
0 new messages