Can't execute Puppeteer with user "apache" (CentOS 7)

528 views
Skip to first unread message

Iván Pérez

unread,
Apr 27, 2018, 2:26:11 AM4/27/18
to Chromium-dev
Hello!

I'm using the example code found in this repository to create a PDF from a webpage. When I execute the script from a PHP script (that first builds up a webpage from the contents received from a form), I get an error:


(node:14832) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
[0424/165455.239499:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received.
[0424/165455.239717:FATAL:content_main_delegate.cc(53)] Check failed: false.
#0 0x55f27f255b0c base::debug::StackTrace::StackTrace()
#1 0x55f27f26e780 logging::LogMessage::~LogMessage()
#2 0x55f27d5f7d23 content::ContentMainDelegate::TerminateForFatalInitializationError()
#3 0x55f27ef90deb content::ContentMainRunnerImpl::Initialize()
#4 0x55f27ef9ab72 service_manager::Main()
#5 0x55f27ef8ff14 content::ContentMain()
#6 0x55f28309f9b9 headless::(anonymous namespace)::RunContentMain()
#7 0x55f28309fa42 headless::HeadlessBrowserMain()
#8 0x55f27ef97f9d headless::HeadlessShellMain()
#9 0x55f27d5f61ac ChromeMain
#10 0x7efcaad45c05 __libc_start_main
#11 0x55f27d5f602a _start

The node script (which uses Puppeteer) is invoked from PHP, and so it is run with the user apache on my server. Anyway, if instead of running it from PHP I execute the node script from the console with my own user, it works OK, but if I "sudo apache", then the same error happens again.

This is my environment:
  • Puppeteer version: 1.3.0
  • Platform / OS version: CentOS 7.4.1708 (Core)
  • Node.js version: 8.11.1
What is causing the error? Something related to apache user's permissions? I've followed all troubleshotting guides but I had no luck at the moment.

Thank you very much in advance!

Iván Pérez

unread,
Apr 27, 2018, 3:59:19 AM4/27/18
to Chromium-dev
Good news!

I've resolved the problem, but didn't find the root cause of the issue. Instead of using the bundled version of Chromium with Puppeteer, I tried to install Chromium system-wide and configure Pptr to use that executable. With that version the issue disappears. I whink it might be investigated further to see what are the differences between both versions.

Regards,

Eric Seckler

unread,
Apr 27, 2018, 11:23:09 AM4/27/18
to ivanp...@gmail.com, Chromium-dev
Sounds like the bundled version was missing the icu data file for some reason. I'd recommend filing a bug at puppeteer's tracker (or looking for an existing one).

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/19e40ceb-48b3-4963-87d8-a511b5a47774%40chromium.org.
Reply all
Reply to author
Forward
0 new messages