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

[#270] Do no pass --no-zygote alongside --no-sandbox #272

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

### Changed

- Deprecated `:max_session_uses` option in favor of `session_pool: [max_uses: ...]`.
- Deprecate `:max_session_uses` option in favor of `session_pool: [max_uses: ...]`.
- Drop `--no-zygote` command line switch when using `no_sandbox: true` option. The switch causes session crashes in recent Chrome versions and was never needed for `--no-sandbox` in the first place. See #270.

⚠️ In case you are using `no_sandbox: true`, dropping `--no-zygote` means Chrome will spawn an additional OS process (the "zygote" process), which could be considered a break of backwards compatibility. Please monitor your next deployment. However, we believe this change is safe, meaning except for the additional process, it will not be noticable. Hence we concluded to drop the switch without a major version bump, in order not to disturb too many people. If you are not using `:no_sandbox`, this does not affect you.

## [1.12.0] - 2024-07-12

Expand Down
2 changes: 1 addition & 1 deletion lib/chromic_pdf/pdf/chrome_runner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ defmodule ChromicPDF.ChromeRunner do
# https://github.com/bitcrowd/chromic_pdf/issues/76
defp args(extra, opts) do
default_args()
|> append_if("--no-sandbox --no-zygote", no_sandbox?(opts))
|> append_if("--no-sandbox", no_sandbox?(opts))
|> append_if(to_string(opts[:chrome_args]), !!opts[:chrome_args])
|> Kernel.++(List.wrap(extra))
|> append_if("2>/dev/null 3<&0 4>&1", discard_stderr?(opts))
Expand Down