[Snap] geckodriver cannot start Firefox when profile is located outside of users home directory
Categories
(Testing :: geckodriver, defect, P3)
Tracking
(firefox102 fixed)
Tracking | Status | |
---|---|---|
firefox102 | --- | fixed |
People
(Reporter: justinlindsaychapman, Assigned: jgraham)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
(Whiteboard: [bidi-m3-mvp][webdriver:external])
Attachments
(3 files, 1 obsolete file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
Steps to reproduce:
Using python selenium geckodriver combination with ubuntu 22.04 lts, Python version 3.10.4, Selenium 4.1.3 and Geckodriver 3.1
Actual results:
Throws the error
Your Firefox profile cannot be loaded. It may be missing or inaccessible
It is not missing, it is not inaccessible, I am using it right now.
From what I know geckodriver creates a temporary profile if one is specified. I have tried specifying and using unspecified. Geckodriver is on PATH /use/bin and /usr/local/bin I have given full permission to both folders. This was working prior to upgrading to UBUNTU 22.04, the only difference with Firefox is that it is now a snap installation instead of a deb. I am extremely frustrated and have lost days trying to get this working . This effecting my work badly.
Expected results:
geckodriver should have opened a session window
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Adding to Snap tracker. You can consider to use Deb Firefox version from PPA (https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa)
Updated•3 years ago
|
@Martin Stransky. Thank you for the suggestion. I thought it important that this be looked at because out of the box the snap version of ff doesn't work with geckodriver. I did purge the package and installed the deb ppa and package. Things work properly with the deb version of the same browser. Thanks again for your reply.
Comment 4•3 years ago
|
||
This has also been reported at: https://github.com/mozilla/geckodriver/issues/2010
@JLChapman, is this an issue that started recently? Can you reproduce it with an older version of geckodriver? It would be good to know if a change in geckodriver or Firefox caused this broken behavior. It's the first time that we hear about that. Thanks.
Comment 5•3 years ago
|
||
Martin, could this be a dupe or related to bug 1763436? geckodriver creates the profile in /tmp
so it means the profile is not located within the usual home folder.
@Henrik Skupin, this started with the upgrade from Ubuntu 21.10 to 22.04, the from what I understand Canonical are trying to push all their packages as SNAP, it seems that this problem is specific to the SNAP version of firefox. I removed the SNAP version and forced the PPA for the deb version. Geckodriver now works the same way it did prior to upgrade.
So as far a I can see this is an issue that has started with the SNAP packaged firefox. I was able to reproduce over and over up until I removed the SNAP version.
Thank you for your reply.
bug 1763436 seems to be related but not the same issue as I was able to open firefox and use it, it was when using geckodriver that I had the error.
Comment 8•3 years ago
|
||
The problem is most likely that geckodriver wants firefox to use a temporary profile in /tmp
, which the firefox snap cannot access because it is strictly confined.
That's indeed an unfortunate regression, let's see if a solution can be worked out on the geckodriver issue tracker.
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Thank you Oliver! That indeed would be a reasonable explanation for this issue. As listed in our documentation and also mentioned in the issue on GitHub you will have to set the TMPDIR
environment variable to a location that the Firefox snap package can access.
We will discuss if there is something that we could do in geckodriver itself in our next weeks triage meeting.
Updated•3 years ago
|
Reporter | ||
Comment 10•3 years ago
|
||
@ Henrik Skupin, if indeed it is a permission related error maybe part of the procedure could be to have a more detailed warning/error so when it does arise it is easier to isolate a cause.
Thanks for you reply and input.
Assignee | ||
Comment 11•3 years ago
|
||
This adds a --profile-root
argument to geckodriver that sets the
directory in which we create temporary profiles.
This helps workaround an issue with sandboxed Firefox
instances (e.g. those running on snap) where the /tmp inside the
sandbox and outside the sandbox are not the same. Users can set this
to a directory that's visible both in and out of the sandbox so that
both geckodriver and Firefox can access the temporary profile.
Updated•3 years ago
|
Assignee | ||
Comment 12•3 years ago
|
||
Updated•3 years ago
|
Comment 13•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Comment 14•3 years ago
|
||
bugherder |
Comment 15•3 years ago
|
||
I've updated the release notes for the 0.31.0 release on Github:
https://github.com/mozilla/geckodriver/releases/tag/v0.31.0
Comment 16•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 17•2 years ago
|
||
Comment 18•2 years ago
|
||
Comment on attachment 9276441 [details]
Bug 1766125 - Change the default firefox binary path when geckodriver is used from within snap confinement
Revision D146303 was moved to bug 1769991. Setting attachment 9276441 [details] to obsolete.
Comment 19•2 years ago
|
||
bugherder |
Comment 20•2 years ago
|
||
All related patches have been landed. As such closing as fixed. Thanks James!
Updated•2 years ago
|
Description
•