Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Chrome freezes on windows when opened with WWW::Mechanize::Chrome

by wireb (Initiate)
on Nov 09, 2021 at 18:04 UTC ( [id://11138638]=note: print w/replies, xml ) Need Help??


in reply to Chrome freezes on windows when opened with WWW::Mechanize::Chrome

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
  • Comment on Re: Chrome freezes on windows when opened with WWW::Mechanize::Chrome
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11138638]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-18 00:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found