Avoid Raptor condprofile creation to hit an "Unable to write Firefox profile" error when executed locally on Ubuntu and snap packaged Firefox is installed
Categories
(Testing :: Raptor, task, P2)
Tracking
(Not tracked)
People
(Reporter: rpl, Unassigned)
References
Details
(Whiteboard: [fxp])
I got to hit this while I was drafting locally the patch to introduce a new condprofile customization for Bug 1859549, and it got me a big of digging to realize what was going on.
The issue manifests itself by the following error being logged along with the condprof creation failing:
arsenic.errors.SessionStartError: session not created: Failed to set preferences: Unable to write Firefox profile: No such file or directory (os error 2)
I don't remember exactly how I investigate it and pinpointed issue, but it is very likely that I ended up strace
an execution and then spotted that the geckodriver bin path was pointing to a binary included in the Firefox snap package by filtering the strace logs.
But anyway, the underlying issue is that executing raptor locally on Ubuntu we may end up choosing to use the geckodriver binary included in the snap package, which is going to be sandboxed as the snap-packaged Firefox instance and would not have access to any arbitrary path from the system (but only to what allowed by the snap sandbox).
I'm not sure how worth is for a sandboxed geckodriver to be included in the Firefox snap package, given that it is not unlikely that depending from that geckodriver binary would make it likely to hit that error if the webdriver requests tries to edit the content of the Firefox profile, and if that snap package would not include any geckodriver binary at all, then this issue would not be hit at all.
If there is a reason for including geckodriver in the snap package, or it is not under our control/reach, then we may alternatively make sure that raptor uses its own copy of geckodriver binary instead of the one available in PATH env var (and allow to use a specific binary only if specifically requested through raptor command line options).
Updated•2 years ago
|
Updated•2 years ago
|
Description
•