Corion / WWW-Mechanize-Chrome

automate the Chrome browser
https://metacpan.org/release/WWW-Mechanize-Chrome
Artistic License 2.0
30 stars 12 forks source link

Installing (testing) in Linux as root enters infinite loop #78

Open hadjiprocopis opened 10 months ago

hadjiprocopis commented 10 months ago
cpanm WWW::Mechanize::Chrome

gets stack on

Building and testing WWW-Mechanize-Chrome-0.72 ... 

This is a bit more verbose and shows it gets stacked on t/49-pipe.t :

cpanm --look WWW::Mechanize::Chrome
perl Makefile.PL && make all && make test

Finally, running:

perl Makefile.PL && make all && perl -Iblib/lib t/49-pipe.t

Shows the culprit to be:

# Testing with /usr/bin/google-chrome
[1220/101643.905504:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

Thank you for this great software

Corion commented 10 months ago

Yeah - I'm still working on this one resp. thinking about whether to skip this test when running the tests as root. I see the options of

Currently I think the second option is the best and least invasive option

hadjiprocopis commented 10 months ago

Don't you need to add --no-sandbox when running it as root?

I think just a simple warning can suffice when you detect that spawning that process resulted in the specific error.

If this is only a *nix issue then once you detect the problem you can suggest that running the tests as non-root, e.g. sudo -u XYZ make test.

If it was simple for root to find a username XYZ (and safe) and run the make test as XYZ and make install as root, then I think postamble in Makefile.PL can be useful. I can look at it. But what happens with the XYZ I do not know.