Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

help installing WWW::Mechanize::Chrome in Strawberry Perl

by Special_K (Monk)
on Jan 03, 2021 at 23:17 UTC ( [id://11126245]=perlquestion: print w/replies, xml ) Need Help??

Special_K has asked for the wisdom of the Perl Monks concerning the following question:

Per the advice given to me in a previous thread (https://perlmonks.org/?node_id=11123667) in which I asked for help trying to install the module IO-Async-0.77.tar.gz, a prerequisite to WWW::Mechanize::Chrome, in cygwin, I tried to install WWW::Mechanize::Chrome in Strawberry Perl but am still encountering the same failure with IO-Async-0.77.tar.gz. Here is the logfile:

Microsoft Windows [Version 10.0.19041.685] (c) 2020 Microsoft Corporation. All rights reserved. C:\WINDOWS\system32>cpan WWW::Mechanize::Chrome Loading internal logger. Log::Log4perl recommended for better logging CPAN: CPAN::SQLite loaded ok (v0.219) Database was generated on Sun, 03 Jan 2021 22:38:41 GMT Running install for module 'WWW::Mechanize::Chrome' CPAN: Digest::SHA loaded ok (v6.02) CPAN: Compress::Zlib loaded ok (v2.096) Checksum for C:\STRAWB~1\cpan\sources\authors\id\C\CO\CORION\WWW-Mecha +nize-Chrome-0.65.tar.gz ok CPAN: Archive::Tar loaded ok (v2.38) CPAN: YAML::XS loaded ok (v0.82) CPAN: CPAN::Meta::Requirements loaded ok (v2.140) CPAN: Parse::CPAN::Meta loaded ok (v2.150010) CPAN: CPAN::Meta loaded ok (v2.150010) CPAN: Module::CoreList loaded ok (v5.20200717) Configuring C/CO/CORION/WWW-Mechanize-Chrome-0.65.tar.gz with Makefile +.PL Can't locate PerlX/Maybe.pm in @INC (you may need to install the PerlX +::Maybe module) (@INC contains: C:/Strawberry/perl/site/lib C:/Strawb +erry/perl/vendor/lib C:/Strawberry/perl/lib . lib) at ./examples/../l +ib/WWW/Mechanize/Chrome.pm line 7. BEGIN failed--compilation aborted at ./examples/../lib/WWW/Mechanize/C +hrome.pm line 7. Compilation failed in require at examples/gen_examples_pod.pl line 32. Checking if your kit is complete... Looks good Warning: prerequisite IO::Async 0 not found. Warning: prerequisite Image::Info 0 not found. Warning: prerequisite Log::Log4perl 0 not found. Warning: prerequisite Net::Async::WebSocket::Client 0.12 not found. Warning: prerequisite Object::Import 0 not found. Warning: prerequisite PerlX::Maybe 0 not found. Warning: prerequisite Test::Memory::Cycle 0 not found. Warning: prerequisite URI::ws 0 not found. Warning: prerequisite Win32::File::VersionInfo 0 not found. Generating a gmake-style Makefile Writing Makefile for WWW::Mechanize::Chrome Writing MYMETA.yml and MYMETA.json CORION/WWW-Mechanize-Chrome-0.65.tar.gz C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK Running make for C/CO/CORION/WWW-Mechanize-Chrome-0.65.tar.gz ---- Unsatisfied dependencies detected during ---- ---- CORION/WWW-Mechanize-Chrome-0.65.tar.gz ---- IO::Async [requires] Image::Info [build_requires] Log::Log4perl [requires] Net::Async::WebSocket::Client [requires] Object::Import [requires] PerlX::Maybe [requires] Test::Memory::Cycle [build_requires] URI::ws [requires] Win32::File::VersionInfo [requires] Running install for module 'IO::Async' Checksum for C:\STRAWB~1\cpan\sources\authors\id\P\PE\PEVANS\IO-Async- +0.77.tar.gz ok Configuring P/PE/PEVANS/IO-Async-0.77.tar.gz with Build.PL Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'IO-Async' version '0.77' PEVANS/IO-Async-0.77.tar.gz C:\Strawberry\perl\bin\perl.exe Build.PL -- OK Running Build for P/PE/PEVANS/IO-Async-0.77.tar.gz Building IO-Async PEVANS/IO-Async-0.77.tar.gz C:\Strawberry\perl\bin\perl.exe ./Build -- OK Running Build test for PEVANS/IO-Async-0.77.tar.gz t\00use.t .................... ok t\01timequeue.t .............. ok t\02os.t ..................... ok t\03loop-magic.t ............. ok t\04notifier.t ............... ok t\05notifier-loop.t .......... ok t\06notifier-mixin.t ......... ok t\07notifier-future.t ........ ok t\10loop-poll-io.t ........... ok t\10loop-select-io.t ......... ok t\11loop-poll-timer.t ........ ok t\11loop-select-timer.t ...... ok t\12loop-poll-signal.t ....... skipped: This OS does not have signals t\12loop-select-signal.t ..... skipped: This OS does not have signals t\13loop-poll-idle.t ......... ok t\13loop-select-idle.t ....... ok t\14loop-poll-process.t ...... ok t\14loop-select-process.t .... ok t\15loop-poll-control.t ...... ok t\15loop-select-control.t .... ok t\16loop-poll-metrics.t ...... ok t\16loop-select-metrics.t .... ok t\18loop-poll-legacy.t ....... ok t\18loop-select-legacy.t ..... ok t\19loop-future.t ............ ok t\19test.t ................... ok t\20handle.t ................. ok t\21stream-1read.t ........... ok t\21stream-2write.t .......... ok t\21stream-3split.t .......... ok t\21stream-4encoding.t ....... ok t\22timer-absolute.t ......... ok t\22timer-countdown.t ........ ok t\22timer-periodic.t ......... ok t\23signal.t ................. skipped: This OS does not have signals t\24listener.t ............... ok t\25socket.t ................. ok t\26pid.t .................... ok t\27file.t ................... ok t\28filestream.t ............. ok t\30loop-fork.t .............. skipped: POSIX fork() is not available t\31loop-spawnchild.t ........ skipped: POSIX fork() is not available t\32loop-spawnchild-setup.t .. skipped: POSIX fork() is not available t\33process.t ................ skipped: POSIX fork() is not available t\34process-handles.t ........ skipped: POSIX fork() is not available t\35loop-openprocess.t ....... skipped: POSIX fork() is not available t\36loop-runchild.t .......... skipped: POSIX fork() is not available t\37loop-child-root.t ........ skipped: POSIX fork() is not available t\38loop-thread.t ............ ok t\39loop-runproccess.t ....... skipped: POSIX fork() is not available t\40channel.t ................ ok t\41routine.t ................ ok t\42function.t ............... ok t\50resolver.t ............... 1/? # Failed test '->failure [3] gives EAI_NONAME or EAI_NODATA' # at t\50resolver.t line 342. # $errno is 11002 # Looks like you failed 1 test of 35. t\50resolver.t ............... Dubious, test returned 1 (wstat 256, 0x +100) Failed 1/35 subtests (less 5 skipped subtests: 29 okay) t\51loop-connect.t ........... ok t\52loop-listen.t ............ ok t\53loop-extend.t ............ ok t\60protocol.t ............... ok t\61protocol-stream.t ........ ok t\62protocol-linestream.t .... ok t\63handle-connect.t ......... ok t\64handle-bind.t ............ ok t\70future-io.t .............. skipped: Future::IO is not available t\99pod.t .................... ok Test Summary Report ------------------- t\50resolver.t (Wstat: 256 Tests: 35 Failed: 1) Failed test: 28 Non-zero exit status: 1 Files=64, Tests=1249, 120 wallclock secs ( 0.23 usr + 0.12 sys = 0.3 +6 CPU) Result: FAIL Failed 1/64 test programs. 1/1249 subtests failed. PEVANS/IO-Async-0.77.tar.gz C:\Strawberry\perl\bin\perl.exe ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports PEVANS/IO-Async-0.77.tar.gz Stopping: 'install' failed for 'IO::Async'.

The error section appears to be:

# Looks like you failed 1 test of 35. t\50resolver.t ............... Dubious, test returned 1 (wstat 256, 0x +100) Failed 1/35 subtests

How do I fix this? A poster in my other thread said they had successfully installed the IO-Async-0.77.tar.gz module under Strawberry Perl. Should I just forward this output to the module's author? I checked the module's test results and I don't see Strawberry Perl represented (unless mswin32 is code for Strawberry Perl): http://matrix.cpantesters.org/?dist=IO-Async+0.77

Replies are listed 'Best First'.
Re: help installing WWW::Mechanize::Chrome in Strawberry Perl
by Corion (Patriarch) on Jan 04, 2021 at 08:21 UTC

    It seems that this bug is not restricted to Windows. It seems that the test expects a nameserver always to be available.

    I guess you can try to apply the patch attached to that RT ticket, whitelist the appropriate network packets in your firewall or just force the installation, ignoring that test failure.

    Update: There also is a Windows related bug report. I'm not sure which one applies, but as the rest works OK for you, you should be OK to force the installation.

Re: help installing WWW::Mechanize::Chrome in Strawberry Perl -- IO::Async
by Discipulus (Canon) on Jan 04, 2021 at 08:12 UTC
    Hello Special_K,

    ..and Bod too.

    Being IO::Async the guilty one you can try to test it per se:

    cpan> test IO::Async ... Nothing was ready after 10 second wait; called at t\51loop-connect.t l +ine 262 ... Stopping: 'test' failed for 'IO::Async'. Failed during this command: PEVANS/IO-Async-0.77.tar.gz : make_test NO

    I also noticed the windows firewall blocking something during the test phase.

    Iirc I had the very same problem installing WWW::Mechanize::Chrome but problably I have just cpan --notest install IO::Async or --force the installation.

    Actually on my strawberry 5.26 i have:

    cpan> r IO::Async Package namespace installed latest in CPAN file IO::Async 0.75 0.77 PEVANS/IO-Async-0.77.ta +r.gz cpan> r WWW::Mechanize::Chrome Package namespace installed latest in CPAN file WWW::Mechanize::Chrome 0.50 0.65 CORION/WWW-Mechanize-Ch +rome-0.65.tar.gz

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: help installing WWW::Mechanize::Chrome in Strawberry Perl
by Bod (Parson) on Jan 04, 2021 at 00:40 UTC

    It's not something specific to you...
    I've tried installing WWW::Mechanize::Chrome and mine also fails when loading the IO::Async dependency.

    I'll have a better look tomorrow as it's a module I've been meaning to try for quite some time...

Re: help installing WWW::Mechanize::Chrome in Strawberry Perl
by pritesh_ugrankar (Monk) on Jan 04, 2021 at 15:04 UTC

    Hi,

    As suggested by 1nickt I ran the command again with cpanm -v WWW::Mechanize::Chrome and here is what I found

    And when I check the C:\Users\PUGRAN~1\.cpanm\work\1609769637.8608\build.log file, it shows this:

    From what I could understand, the issue is mainly at:

    t/49-pipe.t ................................... skipped: Pipes are cur +rently unsupported on MSWin32 t/49-port.t ................................... ok t/50-follow-link.t ............................ ok t/50-form-with-fields-gh48.t .................. 1/6 cannot unlink file + for C:\Users\PUGRAN~1\AppData\Local\Temp\Dvvy_MMaaV\CrashpadMetrics- +active.pma: Permission denied at C:/Strawberry/perl/lib/File/Temp.pm +line 916. cannot remove directory for C:/Users/PUGRAN~1/AppData/Local/Temp/Dvvy_ +MMaaV: Directory not empty at C:/Strawberry/perl/lib/File/Temp.pm lin +e 916.

    And

    C:/Strawberry/perl/site/lib/Devel/Cycle.pm line 107. t/78-memleak.t ................................ ok t/78-two-instances.t .......................... Unhandled type: GLOB a +t C:/Strawberry/perl/site/lib/Devel/Cycle.pm line 107. t/78-two-instances.t .......................... ok t/99-interactive-single-window.t .............. ok t/rt127588.t .................................. ok t/rt130999.t .................................. ok t/select.t .................................... Use of uninitialized v +alue $ENV{"PATH"} in split at C:/Strawberry/perl/lib/File/Spec/Win32. +pm line 169. Use of uninitialized value $ENV{"PATH"} in split at C:/Strawberry/perl +/lib/File/Spec/Win32.pm line 169. t/select.t .................................... ok

    But my Perl Foo is not that strong. I'll still try to figure it out.

      Actually the two errors are:

      ... t/50-mech-new-tab.t ........................... 7/8 Could not find nod +e with given id -32000 at C:\Users\PUGRAN~1\.cpanm\work\1609769637.8608\WWW-Mechanize- +Chrome-0.65\blib\lib/Chrome/DevToolsProtocol/Target.pm line 490 # Looks like your test exited with 2304 just after 7. t/50-mech-new-tab.t ........................... Dubious, test returned + 255 (wstat 65280, 0xff00) Failed 1/8 subtests ... t/60-mech-custom-headers.t .................... 4/21 No search session + with given id found -32000 at C:\Users\PUGRAN~1\.cpanm\work\1609769637.8608\WWW-Mechanize- +Chrome-0.65\blib\lib/Chrome/DevToolsProtocol/Target.pm line 490 # Looks like your test exited with 2304 just after 10. t/60-mech-custom-headers.t .................... Dubious, test returned + 255 (wstat 65280, 0xff00) Failed 11/21 subtests

      These errors are "safe" to ignore, as they are some timing related issue which I haven't found the cause of (or a solution for) yet.

        Hi,

        Indeed!!. I ran cpanm -v --force WWW::Mechanize::Chrome and it did install fine!! Given below is the output just in case

        Please let me know how did you figure out that these are not "showstopper" errors? Did you refer any line/log that helped you decide that?

Re: help installing WWW::Mechanize::Chrome in Strawberry Perl
by pritesh_ugrankar (Monk) on Jan 04, 2021 at 11:15 UTC

    Hi,

    I'm on Windows 10 64 Bit. Perl Version is 5.32 (64 Bit).

    If I do cpanm WWW::Mechanize::Chrome the IO::Async installs successfully (as one of the dependencies of the module):

    Building and testing IO-Async-0.77 ... OK Successfully installed IO-Async-0.77

    However, the module installation hangs at Building and testing WWW-Mechanize-Chrome-0.65 .... It's stuck there since about an hour. I've left the command prompt open. Will check and report here in a while.

    Here's the entire output.

      Hi, fyi you can add the -v flag to cpanm and see what's going on in more detail.

      Hope this helps!


      The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11126245]
Approved by marto
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-03-28 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found