Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to print using chromium=128.0.6613.84-1~deb12u1 #326

Open
xaviRodri opened this issue Aug 26, 2024 · 14 comments
Open

Failed to print using chromium=128.0.6613.84-1~deb12u1 #326

xaviRodri opened this issue Aug 26, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@xaviRodri
Copy link
Contributor

Hey there!!

I see nice improvements in the library! Thanks a lot!

I was releasing a new version of my app today (with Chromic 1.17) and saw that all PDF rendering started to crash..
After trying to rollback Chromic's version and seeing that it wasn't the problem, I looked at the difference between both docker images.. the chromium package's version!

I also build locally and for 128.0.6613.84-1~deb12u1, all my renders fail with the following error:

[0826/154642.416085:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0826/154642.416157:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
                                                                                                                                                                                                                                                                                    ** (ChromicPDF.ChromeError) Printing failed (Code -32000)

Chrome has responded with the above error error while you were trying to print a PDF.


    (chromic_pdf 1.17.0) lib/chromic_pdf/api/export_options.ex:29: ChromicPDF.ExportOptions.feed_chrome_data_into_output/2
    (chromic_pdf 1.17.0) lib/chromic_pdf/api/telemetry.ex:10: anonymous fn/2 in ChromicPDF.Telemetry.with_telemetry/3
    (telemetry 1.3.0) /app/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3
    (chromic_pdf 1.17.0) lib/chromic_pdf/api.ex:27: anonymous fn/4 in ChromicPDF.API.print_to_pdf/3
    (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2
    (chromic_pdf 1.17.0) lib/chromic_pdf/api.ex:25: anonymous fn/4 in ChromicPDF.API.print_to_pdf/3
    (chromic_pdf 1.17.0) lib/chromic_pdf/utils.ex:29: ChromicPDF.Utils.with_tmp_dir/1
    iex:6: (file)
15:46:42.426 [error] ChromicPDF received an 'Inspector.targetCrashed' message.

This means an active Chrome tab has died and your current operation is going to time out.

Known causes:

1) External URLs in <link> tags in the header/footer templates cause Chrome to crash.
2) Shared memory exhaustion can cause Chrome to crash. Depending on your environment, the
   available shared memory at /dev/shm may be too small for your use-case. This may
   especially affect you if you run ChromicPDF in a container, as, for instance, the
   Docker runtime provides only 64 MB to containers by default.

   Pass --disable-dev-shm-usage as a Chrome flag to use /tmp for this purpose instead
   (via the chrome_args option), or increase the amount of shared memory available to
   the container (see --shm-size for Docker).

Not sure if the error message helps here a lot..
Any idea why this could be happening??

Thanks in advance!!

@petelacey
Copy link

For what it's worth, starting at least a week ago, my Phoenix app with chromic_pdf and headless chrome embedded won't event start up. Somehow the buildpack I am using on Gigalixir grabbed the same version of Chrome as the OP; 128.0.6613.84, and now my app won't start properly. In some cases it refuses connections on port 4000. In other cases it just restarts over and over.

My logs are different than the OP, however. There's a lot of this:

ERROR:zygote_host_impl_linux.cc(99)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180

If this happens at startup and you are running inside a Docker container with a Linux-based
If this happened while you were printing a PDF, this may be a problem with Chrome itelf.
Either way, to see Chrome's error output, configure ChromicPDF with the option
discard_stderr: false
** (ChromicPDF.Connection.ConnectionLostError) Chrome has stopped or was terminated by an external program.
Last message: {:DOWN, #Reference<0.1260133489.1266155523.91091>, :port, #Port<0.17>, :normal}
 (stdlib 4.3.1.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
 (stdlib 4.3.1.3) gen_server.erl:1200: :gen_server.handle_msg/6
 (stdlib 4.3.1.3) gen_server.erl:1123: :gen_server.try_dispatch/4
 (stdlib 4.3.1.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/connection/local.ex:49: ChromicPDF.Connection.Local.handle_info/2

I tried removing the warm_up code. I also tried setting no_sandbox to both true and false, but nothing works.

It seems pretty clear that this is a change in Chrome and not in ChromicPDF, but maybe you can find a workaround.

@petelacey
Copy link

As a follow up. I changed the application.ex file to start up ChromicPDF as follows:

      {ChromicPDF,
        [
          no_sandbox: true,
          discard_stderr: false,
          offline: true,
          session_pool: [init_timeout: 10_000, size: 5],
          disable_scripts: true,
          chrome_args: [
            append: "--headless=new",
            remove: ["--headless"]
          ]
        ]
      },

Again, this is in the Gigalixir PaaS. It's running Heroku's buildpack heroku-20 (Ubuntu 20). I also upgraded to ChromicPDF 1.17.0. And I changed to this Chrome buildpack: https://github.com/heroku/heroku-buildpack-chrome-for-testing

# cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
# chrome --version
Google Chrome for Testing 128.0.6613.84 

While my app still fails at startup, the output has changed dramatically to the following:

[171:185:0826/194026.770482:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[171:190:0826/194027.292262:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[171:190:0826/194027.292199:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[171:185:0826/194028.110264:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[171:185:0826/194028.219164:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[171:185:0826/194028.219174:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[171:185:0826/194028.219086:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[171:185:0826/194028.219131:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
19:40:28.958 [error] Task #PID<0.1674.0> started from #PID<0.1671.0> terminating
10000 milliseconds.
** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
not able to complete the current operation (= PDF print job) within the configured
The underlying GenServer.call/3 exited with a timeout. This happens when the browser was

If you are printing large PDFs and expect long processing times, please consult the

bug in ChromicPDF. Please open an issue on the issue tracker.
documentation for the `timeout` option of the session pool.

If you are *not* printing large PDFs but your print jobs still time out, this is likely a

---
 call: &ChromicPDF.SpawnSession.create_target/2,
 await: &ChromicPDF.SpawnSession.target_created/2,
 steps: [

%ChromicPDF.Protocol{

 call: &ChromicPDF.SpawnSession.attach/2,
Current protocol:
 await: &ChromicPDF.SpawnSession.browser_context_created/2,
 await: &ChromicPDF.SpawnSession.page_enabled/2,
 call: &ChromicPDF.SpawnSession.disable_scripts/2,
 call: &ChromicPDF.SpawnSession.set_user_agent/2,
 await: &ChromicPDF.SpawnSession.attached/2,
 await: &ChromicPDF.ResetTarget.history_reset/2,
 call: &ChromicPDF.ResetTarget.blank/2,
 call: &ChromicPDF.SpawnSession.enable_page/2,
 call: &ChromicPDF.SpawnSession.offline_mode/2,
 call: &ChromicPDF.ResetTarget.reset_history/2,
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 state: %{
 init_timeout: 10000,
 await: &ChromicPDF.ResetTarget.blanked/2,
 discard_stderr: false,
 await: &ChromicPDF.ResetTarget.fsl_after_blank/2,
 chrome_args: [append: "--headless=new", remove: ["--headless"]],
 disable_scripts: true,
 __protocol__: ChromicPDF.SpawnSession,
 ],
 ignore_certificate_errors: false,
 checkout_timeout: "[FILTERED]",
 output: &ChromicPDF.SpawnSession.output/1
 close_timeout: "[FILTERED]",
 max_uses: "[FILTERED]",
 last_call_id: 5,
 name: "[FILTERED]",

 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3
 offline: true,
 Args: []
 }
 timeout: 5000,
 session_pool: [init_timeout: 10000, size: 5],
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
 no_sandbox: true,
19:40:28.959 [error] Task #PID<0.1676.0> started from #PID<0.1671.0> terminating
}
 unhandled_runtime_exceptions: :log
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>
 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
 size: 5,
** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
 call: &ChromicPDF.SpawnSession.create_target/2,
 __protocol__: ChromicPDF.SpawnSession,
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 call: &ChromicPDF.ResetTarget.blank/2,
not able to complete the current operation (= PDF print job) within the configured
If you are printing large PDFs and expect long processing times, please consult the
---

10000 milliseconds.
 await: &ChromicPDF.SpawnSession.browser_context_created/2,
 await: &ChromicPDF.SpawnSession.target_created/2,
 call: &ChromicPDF.SpawnSession.attach/2,
 call: &ChromicPDF.SpawnSession.disable_scripts/2,
documentation for the `timeout` option of the session pool.
 call: &ChromicPDF.SpawnSession.enable_page/2,
 steps: [
 output: &ChromicPDF.SpawnSession.output/1

 await: &ChromicPDF.SpawnSession.page_enabled/2,

 checkout_timeout: "[FILTERED]",
 await: &ChromicPDF.ResetTarget.blanked/2,

 ],
bug in ChromicPDF. Please open an issue on the issue tracker.

%ChromicPDF.Protocol{
 call: &ChromicPDF.SpawnSession.set_user_agent/2,
 no_sandbox: true,
 offline: true,
 last_call_id: 7,
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
 Args: []
 }
 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
 session_pool: [init_timeout: 10000, size: 5],
 unhandled_runtime_exceptions: :log


 init_timeout: 10000,
documentation for the `timeout` option of the session pool.
 close_timeout: "[FILTERED]",
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>

 size: 5,
 discard_stderr: false,
 timeout: 5000,
}
** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
 chrome_args: [append: "--headless=new", remove: ["--headless"]],
 max_uses: "[FILTERED]",
 name: "[FILTERED]",
If you are printing large PDFs and expect long processing times, please consult the
 ignore_certificate_errors: false,
19:40:28.958 [error] Task #PID<0.1675.0> started from #PID<0.1671.0> terminating
 disable_scripts: true,

The underlying GenServer.call/3 exited with a timeout. This happens when the browser was
10000 milliseconds.
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3
 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
not able to complete the current operation (= PDF print job) within the configured
 __protocol__: ChromicPDF.SpawnSession,
 ignore_certificate_errors: false,
 state: %{
 output: &ChromicPDF.SpawnSession.output/1
 call: &ChromicPDF.SpawnSession.attach/2,
 close_timeout: "[FILTERED]",
 call: &ChromicPDF.SpawnSession.offline_mode/2,
 call: &ChromicPDF.SpawnSession.set_user_agent/2,

 steps: [
 call: &ChromicPDF.SpawnSession.create_target/2,

Current protocol:
---
bug in ChromicPDF. Please open an issue on the issue tracker.
 disable_scripts: true,
 checkout_timeout: "[FILTERED]",
 call: &ChromicPDF.ResetTarget.blank/2,
 await: &ChromicPDF.SpawnSession.attached/2,
%ChromicPDF.Protocol{
 chrome_args: [append: "--headless=new", remove: ["--headless"]],
 await: &ChromicPDF.ResetTarget.fsl_after_blank/2,
 call: &ChromicPDF.ResetTarget.reset_history/2,
 await: &ChromicPDF.SpawnSession.browser_context_created/2,
 last_call_id: 1,
 await: &ChromicPDF.SpawnSession.page_enabled/2,
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 init_timeout: 10000,
 ],
 call: &ChromicPDF.SpawnSession.disable_scripts/2,
 await: &ChromicPDF.SpawnSession.target_created/2,

If you are *not* printing large PDFs but your print jobs still time out, this is likely a
 await: &ChromicPDF.ResetTarget.history_reset/2,
 discard_stderr: false,
 call: &ChromicPDF.SpawnSession.enable_page/2,
 await: &ChromicPDF.ResetTarget.blanked/2,

 name: "[FILTERED]",



 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3
bug in ChromicPDF. Please open an issue on the issue tracker.
Current protocol:
 steps: [
 size: 5,
 unhandled_runtime_exceptions: :log
** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>
If you are printing large PDFs and expect long processing times, please consult the
---
 }
 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
The underlying GenServer.call/3 exited with a timeout. This happens when the browser was
 session_pool: [init_timeout: 10000, size: 5],
 offline: true,
 Args: []
10000 milliseconds.
documentation for the `timeout` option of the session pool.
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
 max_uses: "[FILTERED]",

 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
If you are *not* printing large PDFs but your print jobs still time out, this is likely a

19:40:28.958 [error] Task #PID<0.1672.0> started from #PID<0.1671.0> terminating
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
}
 await: &ChromicPDF.SpawnSession.browser_context_created/2,
 init_timeout: 10000,
 output: &ChromicPDF.SpawnSession.output/1
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 call: &ChromicPDF.SpawnSession.enable_page/2,
 __protocol__: ChromicPDF.SpawnSession,
 call: &ChromicPDF.SpawnSession.attach/2,
 await: &ChromicPDF.SpawnSession.page_enabled/2,
 call: &ChromicPDF.ResetTarget.blank/2,
 ],
 disable_scripts: true,
 discard_stderr: false,
 await: &ChromicPDF.SpawnSession.target_created/2,
 call: &ChromicPDF.ResetTarget.reset_history/2,
 chrome_args: [append: "--headless=new", remove: ["--headless"]],
 max_uses: "[FILTERED]",
 await: &ChromicPDF.ResetTarget.history_reset/2,
 call: &ChromicPDF.SpawnSession.offline_mode/2,
 await: &ChromicPDF.ResetTarget.fsl_after_blank/2,
 last_call_id: 3,
 name: "[FILTERED]",
 state: %{
 no_sandbox: true,
 offline: true,
 await: &ChromicPDF.SpawnSession.attached/2,
 call: &ChromicPDF.SpawnSession.set_user_agent/2,
 checkout_timeout: "[FILTERED]",
 close_timeout: "[FILTERED]",
 session_pool: [init_timeout: 10000, size: 5],
 size: 5,
 ignore_certificate_errors: false,
 call: &ChromicPDF.SpawnSession.create_target/2,
 await: &ChromicPDF.ResetTarget.blanked/2,
 call: &ChromicPDF.SpawnSession.disable_scripts/2,
 timeout: 5000,
 call: &ChromicPDF.SpawnSession.create_target/2,
---
%ChromicPDF.Protocol{

If you are printing large PDFs and expect long processing times, please consult the

 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3

 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
If you are *not* printing large PDFs but your print jobs still time out, this is likely a
 Args: []
 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
 await: &ChromicPDF.SpawnSession.browser_context_created/2,
19:40:28.958 [error] Task #PID<0.1673.0> started from #PID<0.1671.0> terminating
 unhandled_runtime_exceptions: :log
Current protocol:


 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1

not able to complete the current operation (= PDF print job) within the configured
 steps: [
The underlying GenServer.call/3 exited with a timeout. This happens when the browser was
 }
documentation for the `timeout` option of the session pool.
10000 milliseconds.

** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
bug in ChromicPDF. Please open an issue on the issue tracker.
 await: &ChromicPDF.SpawnSession.target_created/2,
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
}
}
 no_sandbox: true,
 close_timeout: "[FILTERED]",
 size: 5,
 call: &ChromicPDF.SpawnSession.disable_scripts/2,
 output: &ChromicPDF.SpawnSession.output/1
 }
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 call: &ChromicPDF.SpawnSession.set_user_agent/2,
 ignore_certificate_errors: false,
 session_pool: [init_timeout: 10000, size: 5],
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3
 Args: []
 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>

[171:197:0826/194029.085722:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 199: Permission denied (13)
[171:197:0826/194031.335458:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 224: Permission denied (13)
[171:185:0826/194031.413005:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[171:185:0826/194031.412965:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[171:197:0826/194035.376013:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 243: Permission denied (13)
[171:197:0826/194035.425895:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 245: Permission denied (13)
[171:262:0826/194038.056428:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[171:262:0826/194038.056473:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[171:262:0826/194038.056544:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[171:262:0826/194038.056501:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[171:262:0826/194038.056379:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[171:197:0826/194038.155938:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 263: Permission denied (13)
[171:197:0826/194038.158360:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 264: Permission denied (13)
[171:197:0826/194038.416829:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 281: Permission denied (13)
[171:197:0826/194038.443024:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 290: Permission denied (13)
[171:197:0826/194038.445364:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 291: Permission denied (13)
[171:197:0826/194038.570518:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 308: Permission denied (13)
[171:197:0826/194038.572567:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 309: Permission denied (13)
[171:197:0826/194038.610007:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 326: Permission denied (13)
[171:197:0826/194038.612008:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 327: Permission denied (13)
[171:197:0826/194038.647604:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 344: Permission denied (13)
[171:197:0826/194038.649878:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 345: Permission denied (13)
 steps: [


The underlying GenServer.call/3 exited with a timeout. This happens when the browser was
documentation for the `timeout` option of the session pool.
not able to complete the current operation (= PDF print job) within the configured
** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
---
19:40:38.965 [error] Task #PID<0.1849.0> started from #PID<0.1671.0> terminating
If you are *not* printing large PDFs but your print jobs still time out, this is likely a
If you are printing large PDFs and expect long processing times, please consult the

10000 milliseconds.


bug in ChromicPDF. Please open an issue on the issue tracker.
%ChromicPDF.Protocol{

Current protocol:
 output: &ChromicPDF.SpawnSession.output/1
 state: %{
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 :disable_scripts => true,
 :checkout_timeout => "[FILTERED]",
 call: &ChromicPDF.ResetTarget.blank/2,
 await: &ChromicPDF.SpawnSession.page_enabled/2,
 :chrome_args => [append: "--headless=new", remove: ["--headless"]],
 call: &ChromicPDF.ResetTarget.reset_history/2,
 call: &ChromicPDF.SpawnSession.disable_scripts/2,
 :close_timeout => "[FILTERED]",
 :__protocol__ => ChromicPDF.SpawnSession,
 call: &ChromicPDF.SpawnSession.enable_page/2,
 await: &ChromicPDF.SpawnSession.attached/2,
 :discard_stderr => false,
 await: &ChromicPDF.ResetTarget.blanked/2,
 call: &ChromicPDF.SpawnSession.set_user_agent/2,
 call: &ChromicPDF.SpawnSession.offline_mode/2,
 await: &ChromicPDF.ResetTarget.fsl_after_blank/2,
 await: &ChromicPDF.ResetTarget.history_reset/2,
 ],
 :init_timeout => 10000,
 :unhandled_runtime_exceptions => :log,
 :size => 5,
 :session_pool => [init_timeout: 10000, size: 5],
 :name => "[FILTERED]",
 :max_uses => "[FILTERED]",
}
 "targetId" => "2A23F2E2B06501216F15EA2A4C67CD72"
 :timeout => 5000,
 :offline => true,
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3

 :ignore_certificate_errors => false,
 }
 :no_sandbox => true,
 "browserContextId" => "[FILTERED]",
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
 :last_call_id => 31,
The underlying GenServer.call/3 exited with a timeout. This happens when the browser was
 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
 call: &ChromicPDF.SpawnSession.offline_mode/2,
10000 milliseconds.
19:40:38.965 [error] Task #PID<0.1851.0> started from #PID<0.1671.0> terminating

 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
%ChromicPDF.Protocol{

bug in ChromicPDF. Please open an issue on the issue tracker.
 Args: []

 call: &ChromicPDF.SpawnSession.set_user_agent/2,
documentation for the `timeout` option of the session pool.
If you are printing large PDFs and expect long processing times, please consult the
---
** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 steps: [
If you are *not* printing large PDFs but your print jobs still time out, this is likely a
Current protocol:
 call: &ChromicPDF.SpawnSession.disable_scripts/2,

 await: &ChromicPDF.SpawnSession.attached/2,
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>

 output: &ChromicPDF.SpawnSession.output/1
 :discard_stderr => false,
 :session_pool => [init_timeout: 10000, size: 5],
 await: &ChromicPDF.ResetTarget.fsl_after_blank/2,
 :last_call_id => 35,
 :disable_scripts => true,
 :close_timeout => "[FILTERED]",
 await: &ChromicPDF.ResetTarget.history_reset/2,
 :init_timeout => 10000,
 :chrome_args => [append: "--headless=new", remove: ["--headless"]],
 call: &ChromicPDF.SpawnSession.enable_page/2,
 :name => "[FILTERED]",
 call: &ChromicPDF.ResetTarget.reset_history/2,
 :size => 5,
 state: %{
 ],
 await: &ChromicPDF.SpawnSession.page_enabled/2,
 :checkout_timeout => "[FILTERED]",
 :__protocol__ => ChromicPDF.SpawnSession,
 :ignore_certificate_errors => false,
 :offline => true,
 call: &ChromicPDF.ResetTarget.blank/2,
 :no_sandbox => true,
 :max_uses => "[FILTERED]",
 await: &ChromicPDF.ResetTarget.blanked/2,
 Args: []
19:40:38.965 [error] Task #PID<0.1853.0> started from #PID<0.1671.0> terminating
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3
 :unhandled_runtime_exceptions => :log,
not able to complete the current operation (= PDF print job) within the configured

** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
10000 milliseconds.
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>
The underlying GenServer.call/3 exited with a timeout. This happens when the browser was
 "browserContextId" => "[FILTERED]",
 :timeout => 5000,
}

 "targetId" => "C2FD18E4DAE42D68D07DE9E33E6FA3BE"
 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
 }
If you are printing large PDFs and expect long processing times, please consult the
If you are *not* printing large PDFs but your print jobs still time out, this is likely a

%ChromicPDF.Protocol{

documentation for the `timeout` option of the session pool.

---

Current protocol:
bug in ChromicPDF. Please open an issue on the issue tracker.

 steps: [
 call: &ChromicPDF.ResetTarget.blank/2,
 call: &ChromicPDF.SpawnSession.set_user_agent/2,
 await: &ChromicPDF.ResetTarget.fsl_after_blank/2,
 call: &ChromicPDF.ResetTarget.reset_history/2,
 call: &ChromicPDF.SpawnSession.enable_page/2,
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 await: &ChromicPDF.SpawnSession.page_enabled/2,
 :__protocol__ => ChromicPDF.SpawnSession,
 await: &ChromicPDF.SpawnSession.attached/2,
 call: &ChromicPDF.SpawnSession.offline_mode/2,
 ],
 await: &ChromicPDF.ResetTarget.blanked/2,
 state: %{
 output: &ChromicPDF.SpawnSession.output/1
 await: &ChromicPDF.ResetTarget.history_reset/2,
 call: &ChromicPDF.SpawnSession.disable_scripts/2,
 :session_pool => [init_timeout: 10000, size: 5],
 "targetId" => "2405563765E3DBCEAAC64A75DDFDE4C2"
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1

not able to complete the current operation (= PDF print job) within the configured
 :no_sandbox => true,
 }
 :last_call_id => 39,
 :checkout_timeout => "[FILTERED]",
 :discard_stderr => false,
 :size => 5,
 :timeout => 5000,
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!

 :init_timeout => 10000,
 :name => "[FILTERED]",
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>
 :max_uses => "[FILTERED]",
documentation for the `timeout` option of the session pool.
 ],
 call: &ChromicPDF.SpawnSession.disable_scripts/2,
 call: &ChromicPDF.ResetTarget.blank/2,
 call: &ChromicPDF.SpawnSession.enable_page/2,

 await: &ChromicPDF.ResetTarget.history_reset/2,
 state: %{
bug in ChromicPDF. Please open an issue on the issue tracker.
 await: &ChromicPDF.SpawnSession.attached/2,
 await: &ChromicPDF.ResetTarget.fsl_after_blank/2,
---

 call: &ChromicPDF.SpawnSession.runtime_enable/2,
 await: &ChromicPDF.ResetTarget.blanked/2,
 output: &ChromicPDF.SpawnSession.output/1
 call: &ChromicPDF.SpawnSession.set_user_agent/2,

Current protocol:
%ChromicPDF.Protocol{
 call: &ChromicPDF.SpawnSession.offline_mode/2,
 await: &ChromicPDF.SpawnSession.page_enabled/2,
 call: &ChromicPDF.ResetTarget.reset_history/2,
 :ignore_certificate_errors => false,
 :close_timeout => "[FILTERED]",
 :max_uses => "[FILTERED]",
 :timeout => 5000,
 :discard_stderr => false,
 :init_timeout => 10000,
 :__protocol__ => ChromicPDF.SpawnSession,
 :chrome_args => [append: "--headless=new", remove: ["--headless"]],
 :disable_scripts => true,
 :offline => true,
 :name => "[FILTERED]",
 :last_call_id => 33,
 :no_sandbox => true,
 :session_pool => [init_timeout: 10000, size: 5],
 :checkout_timeout => "[FILTERED]",
 :size => 5,
If you are *not* printing large PDFs but your print jobs still time out, this is likely a
 steps: [
 call: &ChromicPDF.SpawnSession.disable_scripts/2,

 call: &ChromicPDF.SpawnSession.offline_mode/2,
If you are printing large PDFs and expect long processing times, please consult the
 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3
 call: &ChromicPDF.SpawnSession.runtime_enable/2,
bug in ChromicPDF. Please open an issue on the issue tracker.
10000 milliseconds.
 }

19:40:38.966 [error] Task #PID<0.1852.0> started from #PID<0.1671.0> terminating
}
 call: &ChromicPDF.SpawnSession.set_user_agent/2,
%ChromicPDF.Protocol{
documentation for the `timeout` option of the session pool.


** (ChromicPDF.Browser.ExecutionError) Timeout in Channel.run_protocol/3!
 steps: [
Current protocol:

---
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>
 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
The underlying GenServer.call/3 exited with a timeout. This happens when the browser was
 call: &ChromicPDF.ResetTarget.reset_history/2,
 await: &ChromicPDF.SpawnSession.attached/2,
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
 call: &ChromicPDF.SpawnSession.enable_page/2,

 Args: []
 await: &ChromicPDF.SpawnSession.page_enabled/2,
not able to complete the current operation (= PDF print job) within the configured
 "targetId" => "0443FB898A8F3CAE413A0B822DBF9445"
If you are *not* printing large PDFs but your print jobs still time out, this is likely a
 "browserContextId" => "[FILTERED]",
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
 :unhandled_runtime_exceptions => :log,

 (elixir 1.16.1) lib/task/supervised.ex:36: Task.Supervised.reply/4
 await: &ChromicPDF.ResetTarget.blanked/2,
 ],
 :checkout_timeout => "[FILTERED]",
 :close_timeout => "[FILTERED]",
 :disable_scripts => true,
 :last_call_id => 37,
}
 await: &ChromicPDF.ResetTarget.history_reset/2,
 :chrome_args => [append: "--headless=new", remove: ["--headless"]],
 :__protocol__ => ChromicPDF.SpawnSession,
 :session_pool => [init_timeout: 10000, size: 5],
 await: &ChromicPDF.ResetTarget.fsl_after_blank/2,
 (elixir 1.16.1) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser.ex:61: anonymous fn/2 in ChromicPDF.Browser.session_pools/1
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/session_pool.ex:99: ChromicPDF.Browser.SessionPool.do_init_worker/1
 output: &ChromicPDF.SpawnSession.output/1
 :max_uses => "[FILTERED]",
 "browserContextId" => "[FILTERED]",
 }
 :no_sandbox => true,
Function: #Function<1.84393155/0 in ChromicPDF.Browser.SessionPool.init_worker/1>
 :size => 5,
 "targetId" => "392259423D63CF4AE75C7979D2E0CD36"
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/browser/channel.ex:24: ChromicPDF.Browser.Channel.run_protocol/3
 :name => "[FILTERED]",
 :discard_stderr => false,
 :ignore_certificate_errors => false,
 :timeout => 5000,

 call: &ChromicPDF.ResetTarget.blank/2,
 :offline => true,
 :unhandled_runtime_exceptions => :log,
 state: %{
 :init_timeout => 10000,
 Args: []
[171:197:0826/194039.191072:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 367: Permission denied (13)
[171:197:0826/194039.634424:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 376: Permission denied (13)
[171:197:0826/194039.636915:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 377: Permission denied (13)
[171:197:0826/194039.675129:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 394: Permission denied (13)
[171:197:0826/194039.677292:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 395: Permission denied (13)
[171:197:0826/194039.717994:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 412: Permission denied (13)
[171:197:0826/194039.720383:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 413: Permission denied (13)
[171:197:0826/194039.759621:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 430: Permission denied (13)
[171:197:0826/194039.761672:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 431: Permission denied (13)
[171:197:0826/194039.805459:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 448: Permission denied (13)
[171:197:0826/194039.808216:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 449: Permission denied (13)
[171:197:0826/194041.396047:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 467: Permission denied (13)
[171:197:0826/194041.402979:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 469: Permission denied (13)
[171:197:0826/194041.409116:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 475: Permission denied (13)
[171:197:0826/194041.417070:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 482: Permission denied (13)
[171:197:0826/194041.422184:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 487: Permission denied (13)
[0826/194041.759490:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[0826/194041.759332:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[171:197:0826/194041.841593:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 500: Permission denied (13)
[0826/194041.852948:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[0826/194041.852920:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[171:197:0826/194041.870707:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 509: Permission denied (13)
[171:197:0826/194041.874942:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 510: Permission denied (13)
[171:171:0826/194041.879943:ERROR:interface_endpoint_client.cc(722)] Message 2 rejected by interface blink.mojom.Widget
[171:197:0826/194041.880655:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 513: Permission denied (13)
[171:197:0826/194042.838820:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 536: Permission denied (13)
[171:171:0826/194042.848748:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=133
[171:197:0826/194042.850926:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 542: Permission denied (13)
[0826/194044.714989:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0826/194044.715021:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)

If this happens at startup and you are running inside a Docker container with a Linux-based
Either way, to see Chrome's error output, configure ChromicPDF with the option
19:40:45.568 [error] GenServer #PID<0.1669.0> terminating

image, please see the "Chrome Sandbox in Docker containers" section of the documentation.
** (ChromicPDF.Connection.ConnectionLostError) Chrome has stopped or was terminated by an external program.
If this happened while you were printing a PDF, this may be a problem with Chrome itelf.
Last message: {:DOWN, #Reference<0.809766910.2901409800.172731>, :port, #Port<0.15>, :normal}
 (chromic_pdf 1.17.0) lib/chromic_pdf/pdf/connection/local.ex:49: ChromicPDF.Connection.Local.handle_info/2

 (stdlib 4.3.1.3) gen_server.erl:1123: :gen_server.try_dispatch/4

 (stdlib 4.3.1.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
 discard_stderr: false
 (stdlib 4.3.1.3) gen_server.erl:1200: :gen_server.handle_msg/6
[574:589:0826/194047.903290:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[574:601:0826/194047.903215:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 603: Permission denied (13)
[574:592:0826/194047.903294:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[574:592:0826/194047.925812:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[574:589:0826/194047.925847:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[574:589:0826/194047.925900:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[574:589:0826/194047.925915:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[574:589:0826/194047.925929:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[574:589:0826/194047.925877:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[574:601:0826/194047.998365:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 605: Permission denied (13)
[574:589:0826/194047.998814:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[574:589:0826/194047.998842:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[574:601:0826/194048.490857:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 646: Permission denied (13)
[574:601:0826/194048.493310:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 647: Permission denied (13)
[574:665:0826/194048.767975:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[574:665:0826/194048.767887:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[574:665:0826/194048.767999:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[574:665:0826/194048.767832:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

I don't know if any of that helps, but if you have any thoughts, I'm all ears. Thanks!!!

@petelacey
Copy link

A few more bits of information, if you don't mind. It appears that after I (reluctantly) turned no-sandbox on, the app does indeed startup and I can generate PDFs as before. It's just that all that ☝️ crazy stuff gets dumped into my logs first.

Incidentally, I put back the call to warm_up which I had previously removed, but that changed nothing. And I tried headless=old too, but that didn't change anything either. And finally I upgraded from Ubuntu 20 to 24, but again, nothing.

Something changed in Chrome between versions 127 and 128 that just made everything go sideways, and I don't see any way to pin the Chrome buildpack I'm using to a certain chrome version, it's always going to pick the current stable release. 😞

@metabren
Copy link

Hey @petelacey. I ran into the same issue. For me, it seemed to be large images being displayed as base64 data. 127 was fine, and 128 crashed intermittently.

I forked the "old" chrome buildpack and added the ability for it to read a GOOGLE_CHROME_MAJOR_VERSION environment variable. I've got mine set at 127 for now and it seems to be working. Feel free to use / fork (at your own risk) of course 😅

@petelacey
Copy link

Thanks, @metabren!!! You, sir, are a marvel. I didn't even think this was a possible. For now, I've temporarily pivoted over to a wkhtmltopdf solution (my PDF needs are modest), but I will definitely try this out next week.

@maltoe
Copy link
Collaborator

maltoe commented Sep 2, 2024

Hello both,

thank you for the information. Unfortunately, I don't have much time to look into it further. But considering there are possibly related active issues in other repositories, this may as well be a Chromium bug and we only need to give upstream some time.

@andreasknoepfle Confirmed this is an issue for Alpine-3.20 based images, see https://gist.github.com/maltoe/dcc697f17b92bb1911b74a44d534b5b9 (124 works, 128 crashes)

@metabren
Copy link

metabren commented Sep 2, 2024

Apologies @maltoe, I should have said. I definitely would consider this a Chromium bug. Hope they sort it out soon.

@petelacey
Copy link

Thanks, @maltoe. I was able to get past this with @metabren's buildpack. I'll make a point of trying upcoming releases of chrome. I'll leave a note when it starts working again.

@maltoe maltoe added the bug Something isn't working label Sep 3, 2024
@dvic
Copy link
Contributor

dvic commented Sep 24, 2024

We've also encountered this issue, we are using this in our Dockerfile to install a specific version:

ENV CHROME_VERSION=126.0.6478.182-1

RUN apt update && apt install -y --no-install-recommends \
  apt-transport-https \
  ca-certificates \
  curl \
  fontconfig \
  fonts-freefont-ttf \
  fonts-ipafont-gothic \
  fonts-kacst \
  fonts-liberation \
  fonts-noto \
  fonts-roboto \
  fonts-symbola \
  fonts-thai-tlwg \
  fonts-wqy-zenhei \
  gnupg \
  libatk-bridge2.0-0 \
  libatspi2.0-0 \
  libexif-dev \
  libgbm1 \
  libgl1-mesa-dri \
  libgl1-mesa-glx \
  libgtk-3-0 \
  libu2f-udev \
  libv4l-0 \
  libvulkan1 \
  libxkbcommon0 \
  wget \
  xdg-utils \
  && wget --no-check-certificate https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
  && dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb \
  && apt -y -f install \
  && apt purge --auto-remove -y curl gnupg wget \
  && rm -rf /var/lib/apt/lists/* \
  && rm google-chrome-stable_${CHROME_VERSION}_amd64.deb

@satphil
Copy link

satphil commented Sep 24, 2024

We also had this problem. Headless printing was OK with Chromium 126, but 128 broke it.
It is now working for us with Chromium 129.0.6668.58 built on Debian GNU/Linux 12 (bookworm) on arm64

@maltoe
Copy link
Collaborator

maltoe commented Sep 25, 2024

@satphil That's good news, thank you!

@janwillemvd
Copy link
Contributor

Don't want to ruin the party, but we just tried to start our application with ENV CHROME_VERSION=129.0.6668.58-1 and we get the errors again.

With ENV CHROME_VERSION=126.0.6478.182-1 everything works without any problems.

@andreasknoepfle
Copy link
Member

Hello both,

thank you for the information. Unfortunately, I don't have much time to look into it further. But considering there are possibly related active issues in other repositories, this may as well be a Chromium bug and we only need to give upstream some time.

@andreasknoepfle Confirmed this is an issue for Alpine-3.20 based images, see https://gist.github.com/maltoe/dcc697f17b92bb1911b74a44d534b5b9 (124 works, 128 crashes)

I can't reproduce the crash with this. I get the same output, but the test.pdf is printed 🤔

@maltoe
Copy link
Collaborator

maltoe commented Sep 26, 2024

@andreasknoepfle Dockerfile in gist still produces the same result for me. Errors + no PDF created. Also added another one based on Bookworm, no PDF created. Am on Linux and amd64 (Ryzen), just for reference.

Unfortunately don't have much time to look into this. Still very mysterious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants