-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temp dir rust_mozprofile
is left behind after terminating geckodriver
#299
Comments
I suspect that |
Hm, I just noticed that firefox is being ran as |
We may be able to use something like the chan-signal crate to receive the handleable signals and call |
If the feature requested in #535 gets added (caller provides an existing profile which is used), then, when that feature is in use, the profile directory must not be deleted on exit. Please keep this in mind. |
Hello, does anyone know where in the code the profile "rust_mozprofile..." i normally deleted? |
It will be deleted when |
Thank you for explanation. I've been digging in the code for hours then. I am trying to implement a functionality of saving the temporary profile after FF is closed but before it is actually deleted so that the modifications to the profile can be preserved. Thanks again. |
@vkatsikaros the version of geckodriver you are using is barely old. Can you please re-test with 0.19.1 and a current Firefox? Thanks. |
@whimboo you are right, the report was old. I took a quick look my setup:
I tried from 2 terminals A and B
so it seems rust_mozprofile is still there but it makes sense a firefox instance is left behind? Let me know if I am doing sth wrong or if I can provide more info. |
@vkatsikaros is your test calling |
@aronaks sorry, but your question is not related to this issue. |
@aronax, C# code: using OpenQA.Selenium.Firefox; namespace ConsoleApplication1 copyDirectory(profileDir, detinationDir); private static void copyDirectory(string Src, string Dst) if (Dst[Dst.Length - 1] != Path.DirectorySeparatorChar) usage: FirefoxDriver driver = new FirefoxDriver(); |
This issue is still happening Quit is being called at the end of browser session |
@ambirag would you mind attaching a trace level log when you see this problem? Make sure to clean-up the tmp directory before. |
Is there any update on this issue? I have /tmp directories being completely filled by tmpaddon and rust_mozprofile files. Is there a workaround to at least set the temporary directory where these files are created to a different location? |
As per common Unix practice, you can set |
I also noticed the On the other side this could most likely also be a problem of Firefox, not removing those files after installing the codecs. @aswan are you aware of that problem? |
I'm not aware. My knowledge of GMP is limited to the front-end bits in about:addons. This is kind of a shot in the dark but perhaps somebody like cpeterson could help. |
Ah, I checked the code and who made most of the modifications. Looks like Chris Pearce is our man here. I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1467247 to cover that. @andreastt and @AutomatedTester beside the retention problem of the downloaded files above, I wonder if we should disable the download of those video codec plugins by default when geckodriver is in use. If someone has to test videos with those codecs the pref could be flipped, and Firefox would download and install the plug-ins. Or do you think we should keep it enabled to have it ready nearly immediately? |
@whimboo Sure, I think that’s a good idea. We already disable Flash and similar plugins. |
I will get them disabled via https://bugzilla.mozilla.org/show_bug.cgi?id=1467700, which we hopefully can still squeeze into the next geckodriver 0.21.0 release. If anyone is still seeing that profile directories are left behind, please report again including the code in use and attach the the trace log. Thanks. |
Is there any way to change the folder where rust_mozprofile folders are created except changing TEPM system variable? |
@JekRock Assuming you mean |
I just realised I will take a follow-up to document this on https://firefox-source-docs.mozilla.org/testing/geckodriver/. |
@andreastt thanks again for the pointing out on the ability to set system variable for the process here |
@andreastt did we ever file a bug for this problem? Maybe I miss it but I cannot find anything related in the geckodriver nor mozbase rust component. |
I think this is related to the same problem discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1433495#c4 et seq. The reason the temporary directory is left behind is because Rust unwinds the stack abruptly when geckodriver is interrupted by a signal. |
Still happening in 2021 on 0.28.0. |
Note that this issue is still blocked on #291. |
Any resolution on this issue? Still continues to be an issue |
I use
geckodriver 0.11.1
andMozilla Firefox 49.0
onUbuntu 14.04
.As root, I check if firefox/geckodriver are running and if a
rust_mozprofile*
dir exists. All is clear.I run (sorry don't know enough rust to do this in rust :P )
Output:
In the end I check again if firefox/geckodriver are running and if a
rust_mozprofile*
dir existsI see
Delete Session
command was given #291 )/tmp/rust_mozprofile.rgB7JqF0sCrV/
, that is also printed out in geckodriver's outputJust in case:
but
/tmp/rust_mozprofile.rgB7JqF0sCrV/
is still there.The text was updated successfully, but these errors were encountered: