WWW/Mechanize/Chrome/Troubleshooting.pm untested

filter: Statementstmt 0.0% 0 / 1 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 1 SCAR -
1 =pod
2  
3 =head1 NAME
4  
5 WWW::Mechanize::Chrome::Troubleshooting - Things to watch out for
6  
7 =head1 INSTALLATION
8  
9 =head2 Chrome is installed but Perl does not connect to it
10  
11 If you notice that tests get skipped and/or the module installs
12 but "does not seem to work", most likely you need to close ALL your Chrome
13 windows. If you want Perl to share your browser, you will need to start Chrome
14 yourself with the C<<--remote-debugging-port=9222>> command line switch.
15  
16 =head2 Tests fail with URLs that do not appear in the distribution files
17  
18 If you notice that tests ( most likely, C<t/51-mech-links.t> ) fail with
19 URLs that are not on C<localhost> or C<127.0.0.1>, another not entirely unlikely
20 explanation is that your machine or your browser has been infected by some
21 "Search Plugin" redirector which exfiltrates your browsing history or redirects
22 your search engine or banking websites to other websites.
23  
24 For confirmation and/or finding out how to remove the offender, maybe a
25 search from a different machine for the URLs injected additionally into the
26 test pages helps you identify the offender.
27  
28 =head1 OPERATION
29  
30 =head2 Chrome / Chromium best practices
31  
32 Install your own version of Chrome/Chromium locally and disable automatic
33 updates. This prevents the API from changing under your scripts.
34  
35 =head2 File downloads don't work
36  
37 Chrome / Chromium doesn't have an API for determining whether a download
38 completed or not. Chrome versions v62 and v63 do have working downloads, but
39 Chrome v64 does not send the appropriate API messages.
40  
41 =head2 Timeout when launching script while Chrome is running
42  
43 You get the error message
44  
45 Timeout while connecting to localhost:9222. Do you maybe have a non-debug
46 instance of Chrome already running?
47  
48 Most likely you already launched the Chrome binary without supplying the
49 C<--remote-debugging-port> option. Either stop all Chrome instances and
50 (re)launch them using the C<--remote-debugging-port> on the command line or
51 launch a separate Chrome session using a separate data directory using
52 the C<data_directory> option.
53  
54 =head2 Lost UI shared context
55  
56 When Chrome is run in headless mode, Chrome throws a C<Lost UI shared context>
57 error. This error can be ignored and does not affect the operation of this
58 module.
59  
60 =head1 REPORTING AN ISSUE
61  
62 Ideally you ask your question on the public support forum, as then other people
63 can also provide you with good answers. Your question should include a short
64 script of about 20 lines that reproduces the problem. Remember to remove all
65 passwords from the script.
66  
67 =head1 REPOSITORY
68  
69 The public repository of this module is
70 L<https://github.com/Corion/www-mechanize-chrome>.
71  
72 =head1 SUPPORT
73  
74 The public support forum of this module is L<https://perlmonks.org/>.
75  
76 =head1 BUG TRACKER
77  
78 Please report bugs in this module via the Github bug queue at
79 L<https://github.com/Corion/WWW-Mechanize-Chrome/issues>
80  
81 =head1 AUTHOR
82  
83 Max Maischein C<corion@cpan.org>
84  
85 =head1 COPYRIGHT (c)
86  
87 Copyright 2010-2026 by Max Maischein C<corion@cpan.org>.
88  
89 =head1 LICENSE
90  
91 This module is released under the same terms as Perl itself.
92  
93 =cut
94  
95 package WWW::Mechanize::Chrome::Troubleshooting;
96 our $VERSION = '0.80';
97 1;