Skip to content

Commit

Permalink
[#270] Do no pass --no-zygote alongside --no-sandbox
Browse files Browse the repository at this point in the history
Relates to [[#270]](#270)
  • Loading branch information
maltoe committed Aug 16, 2023
1 parent 8dfa93f commit 7059fe0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### Changed

- Deprecated `:max_session_uses` option in favor of `session_pool: [max_uses: ...]`.
- Dropped `--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

0 comments on commit 7059fe0

Please sign in to comment.