gutschilla / elixir-pdf-generator

Create PDFs with wkhtmltopdf or puppeteer/chromium from Elixir.
MIT License
332 stars 71 forks source link

Fix passing of --no-sandbox to chrome-option #51

Closed gdancel closed 5 years ago

gutschilla commented 5 years ago

@gdancel - I stumbled upon the same thing. It's an issue with Elixir's parameter passing which is fixed in Elixir 1.8 - at least for me.

Which Elixir version are you using. For Elixir 1.7 the equal sign is required. Unfortunately, for 1.8 it will break the command.

Maybe I should introduce a version switch for a while after the version-dependency has been verified.

What do you think? Please let me know of your environment.

gdancel commented 5 years ago

@gutschilla I'm using 1.6.6. I didn't know that it will break in 1.8. The workaround I ended up using is adding shell_params: ["--chrome-option=--no-sandbox"] in the options for generate. Since there's a way to disable sandbox without using app env I think it's up to you if you'd like to support old versions being apple to use app env to disable sandbox.

gutschilla commented 5 years ago

@gdancel Thanks for coming back to me on this issue. Since there's a workaround in place I'd say I will document this. I would rather not try to bump the minimum Elixir version for this. I basic docker scenarios, the no-sandbox option is pretty handy as you need to run as root from within the container - so at least for me it's important.

gutschilla commented 5 years ago

I am adding a "known issue" section right now. I will bump the minimum Elixir version to 1.7 for 0.6.0