Dear Monks

I have problem with WWW::Mechanize::Chrome

Running included examples ends up with infinite waiting or ...

e.g using included example dump-links.pl
https://metacpan.org/pod/WWW::Mechanize::Chrome::Examples#Example:-dump-links.pl
  generates error:
Could not connect to '127.0.0.1:9222': Connection refused

After starting headless chrome in background:
google-chrome --headless --hide-scrollbars --remote-debugging-port=9222 --disable-gpu  &

  response from dump_links.pl:
Could not connect to '127.0.0.1:9223': Connection refused

Changed the code -  port to connect added:
my $mech = WWW::Mechanize::Chrome->new( port => 9222, );
 .. waits initialisation for ever ...
 
I have experimented with  Chrome options, WWW::Mechanize::Chrome->new %options etc etc - no results.

Command line variant works well:
google-chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/

(just for background - I was successful with similar demos from WWW::Mechanize::PhantomJS)
All searches form PerlMonks, StackOverflow -- also no results.

Installed environment:
Ubuntu 16.04.3 LTS
perl v5.22.1
Google Chrome 62.0.3202.89
also tried  Chromium 64.0.3240.0 ( this was bundled with Puppeteer - all demos working fine)

Any comments, suggestions ....?


Thank you in advance 
Ivar

In reply to Problem with WWW::Mechanize::Chrome by ivartr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.