Skip to content

refactor: remove safeMode because Broweserless got rid of it #22

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luigitec
Copy link

Fixes an error:

Error: "Failed to render from Browserless: POST Body validation failed: "safeMode" is not allowed"

Issue:

Browserless 2.0

/pdf API
The PDF API operates in a similar fashion as the in browserless 1.xx. The biggest difference is how launch flags are handled, which now use a consolidated launch object to hold all CLI arguments and flags.

waitFor has now been removed and deprecated in favor of puppeteer's discrete API methods: waitForEvent, waitForFunction, waitForSelector and waitForTimeout.

rotate has been removed due to lack of usage and included 3rd party dependencies. safeMode has also been removed in favor of using puppeteer's streaming capabilities that are much less error-prone.

Source: https://docs.browserless.io/baas/migrate#pdf-api:~:text=safeMode%20has%20also%20been%20removed%20in%20favor%20of%20using%20puppeteer%27s%20streaming%20capabilities%20that%20are%20much%20less%20error%2Dprone

Browserless 2.0

/pdf API
The PDF API operates in a similar fashion as the in browserless 1.xx. The biggest difference is how launch flags are handled, which now use a consolidated launch object to hold all CLI arguments and flags.

waitFor has now been removed and deprecated in favor of puppeteer's discrete API methods: waitForEvent, waitForFunction, waitForSelector and waitForTimeout.

rotate has been removed due to lack of usage and included 3rd party dependencies. safeMode has also been removed in favor of using puppeteer's streaming capabilities that are much less error-prone.
@willpower232
Copy link
Member

thanks for the heads up, looks like I missed a few endpoints for the enum too so will be doing a release soon. I think I'm happy to just remove and do a minor version bump to highlight the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants