chrisvxd / story2sketch

Convert Storybook into Sketch symbols 💎
Other
403 stars 32 forks source link

Allow options to be passed to Puppeteer #36

Closed andrewshawcare closed 6 years ago

andrewshawcare commented 6 years ago

I'm using Docker in my project and receiving the following error:

[0619/122651.197333:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

I'd like to allow Puppeteer to be launched with the --no-sandbox argument. Ideally, this could be implemented in this line as:

this.browser = await puppeteer.launch(this.puppeteerOptions);

Where this.puppeteerOptions would be { args: ["--no-sandbox"] }

andrewshawcare commented 6 years ago

Any updates on this?

andrewshawcare commented 6 years ago

Further information regarding the need to set --no-sandbox: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-fails-due-to-sandbox-issues

chrisvxd commented 6 years ago

Sorry for the delay @andrewshawcare, have been away on holiday and for some reason not receiving email notifications.

I'll try and have a look into this for you. Passing properties via the story2sketch config sounds like a great idea.

chrisvxd commented 6 years ago

Just saw your PR! Thanks. Will review that.