Coder Social home page Coder Social logo

Comments (7)

maltoe avatar maltoe commented on June 10, 2024

Hey @aptinio,

can you share some details on your setup? Chromium version that has the error, but also host OS, environment, Elixir version, etc.. So we can try to reproduce this error.

from chromic_pdf.

aptinio avatar aptinio commented on June 10, 2024

This happens on my dev environment:

  • Arch Linux
  • asdf-managed Elixir and Erlang/OTP versions:
    • 1.15.4-otp-25 and 25.3.2.5
    • 1.15.4-otp-26 and 26.0.2
  • Chromium 115.0.5790.170

and on prod too:

  • Docker image hexpm/elixir:1.15.4-erlang-26.0.2-debian-bookworm-20230612-slim
  • same Chromium version 115.0.5790.170

My chromic_pdf_options:

  defp chromic_pdf_options do
    [
      disable_scripts: true,
      no_sandbox: true,
      offline: true
    ]
  end

Thanks @maltoe!

from chromic_pdf.

aptinio avatar aptinio commented on June 10, 2024

For now, I did this:

   defp chromic_pdf_options do
     [
       disable_scripts: true,
-      no_sandbox: true,
+      chrome_args: "--no-sandbox",
       offline: true
     ]
   end

from chromic_pdf.

maltoe avatar maltoe commented on June 10, 2024

@aptinio Thanks for the report. I've been able to reproduce this bug on Debian Bookworm. I have not attempted to debug the bug / changed behaviour further within chrome or the more recent environment, and also have not found any matching issue in their trackers.

At the same time, I can't recall why the --no-zygote flag is present there at all. Puppeteer doesn't seem to have equivalent code, and the docs I could find just say that when you use --no-zygote, you must use --no-sandbox as well (but not vice versa). So, I think --no-zygote is a mistake here and am tempted to simple go for #272, though breaking existing setups is a concern of cause. I did check on Alpine 3.16 and Debian Buster that --no-zygote isn't needed to run an unsandboxed root chrome, so it may be fine.

@andreasknoepfle wdyt? Remove the flag and risk breaking people's setups (certainly change people's setup though, as removing --no-zygote will add the zygote process) or play it safe?

from chromic_pdf.

maltoe avatar maltoe commented on June 10, 2024

"Playing it safe" could be: Deprecate --no-sandbox with a warning and change the docs to just tell people to use chrome_args as in @aptinio 's snippet.

from chromic_pdf.

maltoe avatar maltoe commented on June 10, 2024

Decided to YOLO it this time as tests in our CI environments suggest that --no-zygote was never needed and hence it seems unlikely that anyone will notice it.

@aptinio If you can, if would be nice if you could verify that current main fixes the bug in your environments.

from chromic_pdf.

aptinio avatar aptinio commented on June 10, 2024

It does. Thanks @maltoe! ☺️

from chromic_pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.