I am hitting a similar hang on multiple computers all running windows and the latest Chrome.
Was this ever solved?
My specific setup:
Version 95.0.4638.69 (Official Build) (64-bit) <- program was working prior to this release / update
WWW::Mechanize::Chrome is up to date. (0.68)
This is perl 5, version 30, subversion 3 (v5.30.3) built for MSWin32-x64-multi-thread
Dissolved my script down to the following that will cause a recreate. Typically stops responding after loading CNN during the sleep delay.
Note if you remove the delays you can get a few more of the pages to load but eventually the hang returns.
####################################################################
# This is a test of WWW::Mechanize::Chrome
####################################################################
use strict;
use warnings;
use File::Path;
use Log::Log4perl qw(:easy); # used by WWW::Mechanize::Chrome
use WWW::Mechanize::Chrome;
my $chrome = "";
my $page = "";
Log::Log4perl->easy_init($TRACE); # Set priority of root logger to ER
+ROR
# clean up data_directory to start fresh each time.
mkdir("/temp/");
rmtree("/temp/mechaChrome/");
mkdir("/temp/mechaChrome/");
$chrome = WWW::Mechanize::Chrome->new(
#autoclose => 0, # when script is complete close the browse
+r (default yes)
data_directory => '/temp/mechaChrome/', # this fixes the "Do yo
+u maybe have a non-debug instance of Chrome already running?" timeout
+ error by forcing a new instance of chrome.
start_url => 'https:\\www.cnn.com',
launch_arg => [ " --enable-logging", "--v=1" ]
);
print("sleeping\n");
sleep(30);
print("Load reddit\n");
$page = $chrome->get("https://www.reddit.com/");
print("sleeping\n");
sleep(30);
print("Load slashdot\n");
$page = $chrome->get("https://slashdot.org/");
print("sleeping\n");
sleep(30);
print("Script done\n");
exit(0);
I have the trace output from the command prompt not sure if there is a second file anywhere I should grab for debug. (added the launch_arg =>
" --enable-logging", "--v=1" but not sure where that output goes)
Is there a preferred place to paste the output? (it's quite large)
Thanks,
Wire
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.