Comments (7)
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.
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.
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.
@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.
"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.
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.
It does. Thanks @maltoe!
from chromic_pdf.
Related Issues (20)
- Support dynamic names HOT 2
- Investigating the ability to navigate through POST HOT 4
- on_demand implementation sends exit signal to caller HOT 15
- GPU renderer on a headless server? HOT 2
- Timeouts on prod HOT 11
- Exception at startup on Gigalixir HOT 2
- Chromium on a different machine in the network HOT 9
- Ability to pass URL as the template source? HOT 1
- Ability to call `Emulation.setScriptExecutionDisabled` on a per-page basis? HOT 3
- Is it possible to use the service name instead of an ip address when use chrome_address? HOT 1
- Make checkout timeout configurable
- Changelog dates are wrong HOT 1
- websocket_debugger_url failing on windows erlang26/elixir15.7 HOT 2
- Footer is not displayed anymore with recent Chromiums HOT 23
- Troublesome PNG images? HOT 2
- Printing PDF crashes instantly before timeout HOT 13
- Loading external files fails when printing from in-memory HTML HOT 2
- Thoughts regarding executing ghostscript with stderr_to_stdout: true? HOT 8
- Will this work with msEdge and Google Chrome for Testing? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chromic_pdf.