david-dick / firefox-marionette

This is a client module to automate the Mozilla Firefox browser via the Marionette protocol
https://metacpan.org/dist/Firefox-Marionette
Other
12 stars 3 forks source link

Cleanup of temporary marionette directory sometimes fails #14

Closed eserte closed 2 years ago

eserte commented 2 years ago

In some situations the temporary directory /tmp/firefox_marionettelocal.......... is not removed after the using script terminated. This can be reproduced with a simple oneliner like

perl5.34.0 -MFirefox::Marionette -E '$fm=Firefox::Marionette->new;$fm->go("http://www.cpan.org");'

Adding $fm->quit seems to help in this situation. However, I see that a DESTROY method exists and it looks like it tries to cleanup this directory, but for some reason it fails.

david-dick commented 2 years ago

Thanks for the test case. Confirmed. I'm a little busy at the moment, but will hopefully get some time to work on this soon.

david-dick commented 2 years ago

Looks like this is caused by something going wrong in global destruction. It also works fine if you define my $fm instead of a global variable. Should be fixed now.