-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[🚀 Feature]: Allow specifying arguments to open for firefox.Service log #11061
Comments
@vringar, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Full transparency: I'm filing this as a feature request, because the original bug/implementation stalled and maybe with this more accurate framing it is more likely to get approved. |
My apologies, had a lot going on recently. Let's make sure we add an extensible way to do this if we are adding it. I am in the process of tidying up, documenting and type hinting the service code. Q: as it stands can you just pass the file object directly as Edit: I just looked at firefox specifically and it's not so simple based on how it's implemented, quite restrictive in what is being enforced there, makes sense to me to open that up and allow client code to utilise the underlying Just defining that consistent API is key here. edit2: Even more confusing, some are shovelled as service args; other into the subprocess, need to dissect more... Summary:
so quite a bit of difference there. I'm wondering if we just expose more control in general to the underlying |
@symonk welcome back! No need to apologize. I'm sorry if I came off as rude/demanding.
Is this something I should investigate/prototype or was this just thinking out loud on your part? |
@titusfortner was this addressed with your recent changes? |
No, that's the PR I'm still working on — #12103 Different browsers have different behavior, so looking to get it all the same. One This should satisfy this issue, please let me know if you have feedback. |
Closed by #12103 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature and motivation
The current
log_file
argument only lets users supply the name of the log file but assumes that all users want it opened witha+
mode andutf-8
encoding. While this works for most users, it prevents certain use cases, as explained below. The PR #10704 makes this more flexible while maintaining full backwards compatibility.Motivation:
As part of OpenWPM we use Selenium to drive multiple Firefox browsers in parallel.
To capture, enrich and redirect the browser's logging output, we use named pipes that look like normal log files to Selenium.
However pipes don't support seeking so the need to be opened with
w
and not witha+
as thefirefox.Service
currently does. We have previously monkeypatched this but that approach has led to us breaking every time a new Selenium release comes out. A newer approach that tries to callfirefox.Service.__init__
and open thelog_file
afterwards doesn't work at all, so I wanted to check if there was an appetite to address this issue upstream.Usage example
The text was updated successfully, but these errors were encountered: