Skip Menu |

This queue is for tickets about the Firefox-Marionette CPAN distribution.

Report information
The Basics
Id: 133427
Status: resolved
Priority: 0/
Queue: Firefox-Marionette

People
Owner: Nobody in particular
Requestors: SHE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 1.00_02



Subject: Doesn't install nor run in Windows 7
Windows 7 64-Bit perl (v5.26.1) built for MSWin32-x86-multi-thread-64int F::M 0.98 The module does version checks on firefox.exe during install and runtime. (Got it installed by patching the Makefile.) Possible cause, it seems like the current versions of FF do not print to stdout at all. I've tried FF 81.0 (64-Bit) and FF 78.3.0esr (32-Bit), both with PowerShell and cmd. Tried -version and -help switches in all imaginable formats. Also piped through |more (which helped with older FF versions on a different machine). On the other hand I couldn't find related issues at mozilla. Or maybe a windows 7 issue? I have no newer version to try. Would love to use this module! Thank you for your work, Steffen
On Sun Sep 27 00:35:02 2020, SHE wrote: Show quoted text
> Windows 7 64-Bit > perl (v5.26.1) built for MSWin32-x86-multi-thread-64int > F::M 0.98 > > The module does version checks on firefox.exe during install and > runtime. > (Got it installed by patching the Makefile.) > Possible cause, it seems like the current versions of FF do not print > to stdout at all. > > I've tried FF 81.0 (64-Bit) and FF 78.3.0esr (32-Bit), both with > PowerShell and cmd. > > Tried -version and -help switches in all imaginable formats. > Also piped through |more (which helped with older FF versions on a > different machine). > On the other hand I couldn't find related issues at mozilla. > Or maybe a windows 7 issue? I have no newer version to try. > > Would love to use this module! > > Thank you for your work, > Steffen
Hi Steffen, Could you show me the output of "perl Makefile.PL" and "make test"? In addition, could you show me your patched Makefile.PL file? Cheers David
Hi David! 1. unmodified: ################### C:\Strawberry\cpan\build\Firefox-Marionette-0.98-1>perl Makefile.PL Der Befehl ""firefox.exe"" ist entweder falsch geschrieben oder konnte nicht gefunden werden. Checking in Path: Mozilla Firefox cannot be discovered in ... <%PATH%> C:\Strawberry\cpan\build\Firefox-Marionette-0.98-1>gmake test gmake: *** No rule to make target 'test'. Stop. (The environment PATH reported in the error messsage gets actually never used to locate the executable.) ################### Changes to Makefile.PL 54 } + print "\n\$binary = '$binary'\n"; 55 } 73 my $version_string = `"$binary" -version`; + $version_string = 'Mozilla Firefox 78.3.0esr (32-Bit)'; + print "\n\$version_string = '$version_string'\n"; 74 print $version_string; ################### 2nd output: C:\Strawberry\cpan\build\Firefox-Marionette-0.98-0>perl Makefile.PL $binary = 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe' $version_string = 'Mozilla Firefox 78.3.0esr (32-Bit)' Warning: prerequisite PDF::API2 2.036 not found. We have 2.033. Mozilla Firefox 78.3.0esr (32-Bit)Generating a gmake-style Makefile Writing Makefile for Firefox::Marionette Writing MYMETA.yml and MYMETA.json C:\Strawberry\cpan\build\Firefox-Marionette-0.98-0>gmake test ... <complete output in attached file test-out.txt> ... t/01-marionette.t .. ok t/pod-coverage.t ... ok t/pod.t ............ ok All tests successful. Files=4, Tests=444, 41 wallclock secs ( 0.16 usr + 0.06 sys = 0.22 CPU) Result: PASS ################### Thank you for your efforts, Steffen
Subject: test-out.txt

Message body is not shown because it is too large.

Hi Steffen, Could you check to see if https://cpan.metacpan.org/authors/id/D/DD/DDICK/Firefox-Marionette-0.98_04.tar.gz works for your case? Cheers David On Mon Sep 28 19:09:03 2020, SHE wrote: Show quoted text
> Hi David! > > 1. unmodified: > ################### > C:\Strawberry\cpan\build\Firefox-Marionette-0.98-1>perl Makefile.PL > Der Befehl ""firefox.exe"" ist entweder falsch geschrieben oder > konnte nicht gefunden werden. > Checking in Path: > Mozilla Firefox cannot be discovered in ... <%PATH%> > > C:\Strawberry\cpan\build\Firefox-Marionette-0.98-1>gmake test > gmake: *** No rule to make target 'test'. Stop. > > (The environment PATH reported in the error messsage gets actually > never used to locate the executable.) > > ################### > Changes to Makefile.PL > 54 } > + print "\n\$binary = '$binary'\n"; > 55 } > > 73 my $version_string = `"$binary" -version`; > + $version_string = 'Mozilla Firefox 78.3.0esr (32-Bit)'; > + print "\n\$version_string = '$version_string'\n"; > 74 print $version_string; > > ################### > 2nd output: > > C:\Strawberry\cpan\build\Firefox-Marionette-0.98-0>perl Makefile.PL > > $binary = 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe' > > $version_string = 'Mozilla Firefox 78.3.0esr (32-Bit)' > Warning: prerequisite PDF::API2 2.036 not found. We have 2.033. > Mozilla Firefox 78.3.0esr (32-Bit)Generating a gmake-style Makefile > Writing Makefile for Firefox::Marionette > Writing MYMETA.yml and MYMETA.json > > C:\Strawberry\cpan\build\Firefox-Marionette-0.98-0>gmake test > ... > <complete output in attached file test-out.txt> > ... > t/01-marionette.t .. ok > t/pod-coverage.t ... ok > t/pod.t ............ ok > All tests successful. > Files=4, Tests=444, 41 wallclock secs ( 0.16 usr + 0.06 sys = 0.22 > CPU) > Result: PASS > > ################### > > Thank you for your efforts, > Steffen
Nope, sorry: Firefox-Marionette-0.98_04>perl Makefile.PL Checking for firefox in Path: Checking for waterfox in Path: Checking for basilisk in Path: Mozilla Firefox cannot be discovered in ... <%PATH%> Firefox-Marionette-0.98_04> --- The binary is found rightaway, but still the version command only returns an empty string: "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -version >nul BTW, a new FF window opens when the version option is omitted. So it gets appearently read (and probably also understood). Just no output happens. I did also try it with no other FF instance running, to no avail. Meanwhile I also hardcoded the version into Marionette.pm and it seems to be working just fine. So the executable's missing output seems to be the only issue at hand. Alternatively you could obtain the version from the file application.ini in the same directory: [App] Vendor=Mozilla Name=Firefox RemotingName=firefox Version=78.3.0 BuildID=20200914174320 SourceRepository=https://hg.mozilla.org/releases/mozilla-esr78 SourceStamp=fc94a8dbf2e71656c6e2bcfa72b7c9edef98ef7b ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} Tell me if I can help you any further, Steffen Am Mo 28. Sep 2020, 06:02:14, DDICK schrieb: Show quoted text
> Hi Steffen, > > Could you check to see if > https://cpan.metacpan.org/authors/id/D/DD/DDICK/Firefox-Marionette- > 0.98_04.tar.gz works for your case? > > Cheers > David > > On Mon Sep 28 19:09:03 2020, SHE wrote:
> > Hi David! > > > > 1. unmodified: > > ################### > > C:\Strawberry\cpan\build\Firefox-Marionette-0.98-1>perl Makefile.PL > > Der Befehl ""firefox.exe"" ist entweder falsch geschrieben oder > > konnte nicht gefunden werden. > > Checking in Path: > > Mozilla Firefox cannot be discovered in ... <%PATH%> > > > > C:\Strawberry\cpan\build\Firefox-Marionette-0.98-1>gmake test > > gmake: *** No rule to make target 'test'. Stop. > > > > (The environment PATH reported in the error messsage gets actually > > never used to locate the executable.) > > > > ################### > > Changes to Makefile.PL > > 54 } > > + print "\n\$binary = '$binary'\n"; > > 55 } > > > > 73 my $version_string = `"$binary" -version`; > > + $version_string = 'Mozilla Firefox 78.3.0esr (32-Bit)'; > > + print "\n\$version_string = '$version_string'\n"; > > 74 print $version_string; > > > > ################### > > 2nd output: > > > > C:\Strawberry\cpan\build\Firefox-Marionette-0.98-0>perl Makefile.PL > > > > $binary = 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe' > > > > $version_string = 'Mozilla Firefox 78.3.0esr (32-Bit)' > > Warning: prerequisite PDF::API2 2.036 not found. We have 2.033. > > Mozilla Firefox 78.3.0esr (32-Bit)Generating a gmake-style Makefile > > Writing Makefile for Firefox::Marionette > > Writing MYMETA.yml and MYMETA.json > > > > C:\Strawberry\cpan\build\Firefox-Marionette-0.98-0>gmake test > > ... > > <complete output in attached file test-out.txt> > > ... > > t/01-marionette.t .. ok > > t/pod-coverage.t ... ok > > t/pod.t ............ ok > > All tests successful. > > Files=4, Tests=444, 41 wallclock secs ( 0.16 usr + 0.06 sys = 0.22 > > CPU) > > Result: PASS > > > > ################### > > > > Thank you for your efforts, > > Steffen
Subject: application.ini
Download application.ini
application/octet-stream 893b

Message body not shown because it is not plain text.

Not having a lot of luck reproducing your entire issue i'm afraid. I've installed 78.3.0esr (32 bit) on Windows 10 and got a failure in the module (shows during "gmake test") but regardless of what i do, the "perl Makefile.PL" seems to perfectly capture the version.
And "firefox.exe -version" does give you output in cmd.exe? Am Fr 02. Okt 2020, 06:40:12, DDICK schrieb: Show quoted text
> Not having a lot of luck reproducing your entire issue i'm afraid. > > I've installed 78.3.0esr (32 bit) on Windows 10 and got a failure in > the module (shows during "gmake test") but regardless of what i do, > the "perl Makefile.PL" seems to perfectly capture the version.
Missed the part about Windows 7. Must need more sleep. I've reworked Makefile.PL and the library to inspect the WOW6432Node section of the Win32 registry. If you've got some time, i would really appreciate you giving feedback if https://cpan.metacpan.org/authors/id/D/DD/DDICK/Firefox-Marionette-0.98_05.tar.gz solves the issue.
I'm sorry. Still getting the same error: Firefox-Marionette-0.98_05>perl Makefile.PL Checking for firefox in Path: Checking for waterfox in Path: Checking for basilisk in Path: Mozilla Firefox cannot be discovered in <%PATH%> Firefox-Marionette-0.98_05> What's wrong with reading the firefox application.ini? Cheers, Steffen
On Mon Oct 05 07:08:28 2020, SHE wrote: Show quoted text
> What's wrong with reading the firefox application.ini?
Just a little disappointed that i need three different methods for accessing the version of firefox. :)
On Tue Oct 06 22:16:05 2020, DDICK wrote: Show quoted text
> On Mon Oct 05 07:08:28 2020, SHE wrote:
> > What's wrong with reading the firefox application.ini?
> > Just a little disappointed that i need three different methods for > accessing the version of firefox. :)
Okay, quick test. Can you run this diagnostic program on your node? It is intended to show the location of Firefox and check the relative location of the application.ini file.
Subject: test.pl
#! /usr/bin/perl use strict; use warnings; use Win32(); use File::Spec(); use Fcntl(); print "DisplayName:" . Win32::GetOSDisplayName() . "\n"; print "OSName:" . Win32::GetOSName() . "\n"; print "OSVersion:" . ( join q[.], Win32::GetOSVersion() ) . "\n"; use strict; foreach my $path ( split /;/sm, $ENV{Path} ) { if ( -e File::Spec->catfile( $path, 'firefox.exe' ) ) { print "Found firefox.exe in $path\n"; my $short_path_name = Win32::GetShortPathName("$path\\firefox.exe"); print "Which is $short_path_name\n"; print `$short_path_name -version`; print "Checking application.ini\n"; sysopen my $handle, File::Spec->catfile( $path, 'application.ini' ), Fcntl::O_RDONLY(); while ( my $line = <$handle> ) { chomp $line; if ( $line =~ /^Version=/smx ) { print "INI:$line:\n"; } } } } print "Trying default firefox in $ENV{ProgramFiles}\n"; my $short_path_name = Win32::GetShortPathName("$ENV{ProgramFiles}\\Mozilla Firefox\\firefox.exe"); print "Which is $short_path_name\n"; print `$short_path_name -version`; print "Checking application.ini\n"; sysopen my $handle, "C:\\Program Files\\Mozilla Firefox\\application.ini", Fcntl::O_RDONLY(); while ( my $line = <$handle> ) { chomp $line; if ( $line =~ /^Version=/smx ) { print "INI:$line:\n"; } }
Just a ping on this one?
I'm sorry. Can't find the proper settings to get informed on updates. The test.pl unchanged: Show quoted text
>test.pl
DisplayName:Windows 7 Professional (64-bit) Service Pack 1 OSName:Win7 OSVersion:Service Pack 1.6.1.7601.2.1.0.256.1 Trying default firefox in C:\Program Files (x86) Which is C:\PROGRA~2\MOZILL~1\firefox.exe Checking application.ini readline() on closed filehandle $handle at C:\Users\Heinrich\Downloads\test.pl line 39. Show quoted text
>
my changes: print "Checking application.ini\n"; $short_path_name =~ s/firefox\.exe/application\.ini/; sysopen my $handle, $short_path_name, Fcntl::O_RDONLY(); Show quoted text
>test.pl
DisplayName:Windows 7 Professional (64-bit) Service Pack 1 OSName:Win7 OSVersion:Service Pack 1.6.1.7601.2.1.0.256.1 Trying default firefox in C:\Program Files (x86) Which is C:\PROGRA~2\MOZILL~1\firefox.exe Checking application.ini INI:Version=78.3.0: Show quoted text
>
The version command still produces no output, yet reading application.ini does work as intended. Is the .ini only existent in windows distributions? Maybe there is no need for a switch. BTW, there is a module Config::IniFiles by Shlomi Fish which I used in the past, but maybe you want to cut down on dependencies. Cheers, Steffen
On Sun Oct 18 06:45:10 2020, SHE wrote: Show quoted text
> The version command still produces no output, yet reading > application.ini does work as intended. Is the .ini only existent in > windows distributions? Maybe there is no need for a switch. > BTW, there is a module Config::IniFiles by Shlomi Fish which I used in > the past, but maybe you want to cut down on dependencies.
Hi Steffen, Apologies for going silent. Work is a bit crazy atm. I've included a stab at application.ini support, which was tricky as i have no environment that i can replicate the conditions in. Can you test https://cpan.metacpan.org/authors/id/D/DD/DDICK/Firefox-Marionette-1.00_01.tar.gz to see if it works in your environment? Cheers Dave
Hi Dave, so far v1.00_01 is working and I can find no problems when using it with my small application. (Which actually doesn't do much at the moment.) Upon installment however, one of the tests is failing now. (Remember, all tests were passed in 0.98 after I tricked the version detection.) Maybe it has to do with my PDF::API2 being too old or anything else you changed in between? C:\Strawberry\cpan\build\Firefox-Marionette-1.00_01>perl Makefile.PL Determining version string from C:\Program Files (x86)\Mozilla Firefox\application.ini Mozilla Firefox 78.3.0 Checking if your kit is complete... Looks good Warning: prerequisite PDF::API2 2.036 not found. We have 2.033. Generating a gmake-style Makefile Writing Makefile for Firefox::Marionette Writing MYMETA.yml and MYMETA.json C:\Strawberry\cpan\build\Firefox-Marionette-1.00_01>gmake test 1> test-Firefox-Marionette-1.00_01.txt 2>&1 <output attached> I shall update API2 and try again. Thanks in the meanwhile.
Subject: test-Firefox-Marionette-1.00_01.txt

Message body is not shown because it is too large.

Ok, everything went fine after I upgraded PDF::API2 to v2.038 C:\Strawberry\cpan\build\Firefox-Marionette-1.00_01>perl Makefile.PL Determining version string from C:\Program Files (x86)\Mozilla Firefox\application.ini Mozilla Firefox 78.3.0 Checking if your kit is complete... Looks good Generating a gmake-style Makefile Writing Makefile for Firefox::Marionette Writing MYMETA.yml and MYMETA.json C:\Strawberry\cpan\build\Firefox-Marionette-1.00_01>gmake test 1> test2-Firefox-Marionette-1.00_01.txt 2>&1 <output attached> ... All tests successful. Test Summary Report ------------------- t/01-marionette.t (Wstat: 0 Tests: 418 Failed: 0) TODO passed: 298 Files=4, Tests=455, 111 wallclock secs ( 0.14 usr + 0.03 sys = 0.17 CPU) Result: PASS Thanks a lot and enjoy your day, Dave!
Subject: test2-Firefox-Marionette-1.00_01.txt

Message body is not shown because it is too large.

On Sun Nov 08 00:08:40 2020, SHE wrote: Show quoted text
> Ok, everything went fine after I upgraded PDF::API2 to v2.038 > > C:\Strawberry\cpan\build\Firefox-Marionette-1.00_01>perl Makefile.PL > Determining version string from C:\Program Files (x86)\Mozilla > Firefox\application.ini > Mozilla Firefox 78.3.0 > Checking if your kit is complete... > Looks good > Generating a gmake-style Makefile > Writing Makefile for Firefox::Marionette > Writing MYMETA.yml and MYMETA.json > > C:\Strawberry\cpan\build\Firefox-Marionette-1.00_01>gmake test 1> > test2-Firefox-Marionette-1.00_01.txt 2>&1 > <output attached> > > ... > All tests successful. > > Test Summary Report > ------------------- > t/01-marionette.t (Wstat: 0 Tests: 418 Failed: 0) > TODO passed: 298 > Files=4, Tests=455, 111 wallclock secs ( 0.14 usr + 0.03 sys = 0.17 > CPU) > Result: PASS > > Thanks a lot > and enjoy your day, Dave!