I'm trying to start prerender with headless chrome(v62) on my Centos7 sistem but it won't start. When running "node server.js" I get:
2017-11-23T08:50:08.329Z Starting Prerender
2017-11-23T08:50:08.331Z Starting Chrome
2017-11-23T08:50:08.343Z Prerender server accepting requests on port 3000
2017-11-23T08:50:08.392Z Chrome connection closed... restarting Chrome
2017-11-23T08:50:08.392Z Chrome died immediately after restart... stopping Prerender
Does anyone know what could be the cause? Thank you very much
That's because you can't run Chrome as root. Try running the command "sudo node server.js" with another user.
For this you need to add that user to Sudoers, here is a great tutorial how to do that https://www.webhostinghero.com/add-a-user-to-sudoers-in-centos-linux/
you can also add --no-sandbox to run Chrome as root.
vim $(which google-chrome)
then add --no-sandbox to the last line, make it like
exec -a "$0" "$HERE/chrome" "$@" --no-sandbox
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With