Subject: | Sandbox issue |
Date: | Tue, 6 Nov 2018 23:23:11 +0000 |
To: | "bug-WWW-Mechanize-Chrome [...] rt.cpan.org" <bug-WWW-Mechanize-Chrome [...] rt.cpan.org> |
From: | CLOSE Dave <Dave.Close [...] us.thalesgroup.com> |
Trying on Fedora 28 with a very short test program, just enough to
exhibit the problem. A Chrome window opens then closes almost
immediately as the errors below appear.
$ perl -V
Summary of my perl5 (revision 5 version 26 subversion 2) configuration:
Platform:
osname=linux
osvers=4.17.3-200.fc28.x86_64
archname=x86_64-linux-thread-multi
...
$ rpm -q google-chrome-stable
google-chrome-stable-62.0.3202.94-1.x86_64
# cpan -i WWW::Mechanize::Chrome
...
All tests successful.
Test Summary Report
-------------------
t/60-mech-custom-headers.t (Wstat: 0 Tests: 21 Failed: 0)
TODO passed: 6, 14
Files=41, Tests=352, 207 wallclock secs ( 0.20 usr 0.07 sys + 25.27
cusr 5.91 csys = 31.45 CPU)
Result: PASS
CORION/WWW-Mechanize-Chrome-0.23.tar.gz
/bin/make test -- OK
Running make install
Manifying 13 pod documents
Appending installation info to
/root/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
CORION/WWW-Mechanize-Chrome-0.23.tar.gz
/bin/make install -- OK
$ cat test.pl
#! /usr/bin/perl -w
use Log::Log4perl qw( :easy );
use WWW::Mechanize::Chrome;
Log::Log4perl -> easy_init ( $ERROR );
$mech = WWW::Mechanize::Chrome -> new (
launch_arg => [ "--no-sandbox", "--disable-suid-sandbox", ],
);
$ ./test.pl
DevTools listening on
ws://127.0.0.1:9222/devtools/browser/98ef5b6b-eb07-41fd-8f0d-ec1804cd6856
Use of uninitialized value in subroutine entry at
/usr/local/share/perl5/Chrome/DevToolsProtocol.pm line 564.
malformed JSON string, neither tag, array, object, number, string or
atom, at character offset 0 (before "(end of string)") at
/usr/local/share/perl5/Chrome/DevToolsProtocol.pm line 564.
[1106/150323.917415:ERROR:nacl_helper_linux.cc(310)] NaCl helper process
running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
# tail -1 /var/log/messages # Maybe not relevant but always appears
Nov 6 15:03:20 us02wiki01p dbus-daemon[976]: [system] Rejected send
message, 2 matched rules; type="method_call", sender=":1.97922"
(uid=2114 pid=11199 comm="/opt/google/chrome/chrome --no-sandbox
--disable-s") interface="org.freedesktop.DBus.ObjectManager"
member="GetManagedObjects" error name="(unset)" requested_reply="0"
destination="org.bluez" (bus)
--
Dave Close