Open ndanner-wesleyancs opened 3 months ago
I'll try to work on these in the next couple of weeks.
I have fixed the mypy
errors.
I'm a little perplexed about your suggested test. The original TMPDIR (typically /tmp
) could very well have XPI files in it, for example from some other independent process. I'm not sure why we would want to guard against that. If you meant the new TMPDIR, then since it is created by mkdttmp
, it is necessarily empty, isn't it?
This pull request modifies OpenWPM as follows:
geckodriver
is started, the TMPDIR environment variable is set in the environment used bygeckodriver
.The proximate rationale for doing this is that when
geckodriver
adds the OpenWPM extension to FF, it makes a copy of the XPI file in its temporary directory. Unfortunately, it doesn't delete it. That means one copy of the XPI file for each browser that is launched is left behind in/tmp
. On a big stateless crawl, that's a lot of copies. We can't find out the name of the temporary file thatgeckodriver
creates to delete it ourselves, and we don't want to just delete all XPI files in/tmp
because we don't actually know to whom the all belong. This approach seems to resolve these problems.This patch is based on v.0.28.0.
See #1090.