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

bug: Puppeteer reports a weird warning #247

Open
thunderhunt opened this issue Sep 3, 2023 · 5 comments
Open

bug: Puppeteer reports a weird warning #247

thunderhunt opened this issue Sep 3, 2023 · 5 comments

Comments

@thunderhunt
Copy link

Context:

  • version (md-to-pdf -v): 5.2.4
  • platform (Unix, macOS, Windows): Unix
  • node version: v18.17.1

Describe the bug:

When you run to get the pdf of an MD file, some weird warning lands on the screen. check below.
Puppeteer old Headless deprecation warning:
In the near future headless: true will default to the new Headless mode
for Chrome instead of the old Headless implementation. For more
information, please see https://developer.chrome.com/articles/new-headless/.
Consider opting in early by passing headless: "new" to puppeteer.launch()
If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.

@thunderhunt thunderhunt added the bug label Sep 3, 2023
thunderhunt added a commit to thunderhunt/md-to-pdf that referenced this issue Sep 3, 2023
Fixed the weird warning, and bumped up the puppeteer version.
@simonhaenisch
Copy link
Owner

Do you mean the message shows up in the terminal or in the generated PDF?

@simonhaenisch simonhaenisch removed the bug label Sep 4, 2023
@thunderhunt
Copy link
Author

@simonhaenisch , Its showed up in yellow in terminal

@FelipeJz
Copy link

Same here

@simonhaenisch
Copy link
Owner

This will resolve itself soon enough with the next major version of puppeteer, I assume.

@FelipeJz
Copy link

FelipeJz commented Oct 14, 2023

This happens because there is a new headless implementation, the previous one will be soon deprecated, the default option in md-to-pdf is still using it, this issue is resolved by changing the headless option to "new", it works fine, so is a simple update.

Temporary fix

const pdf = await mdToPdf(
      { content: "" },
      {
        launch_options: {
          headless: "new",
        },
      }
    );

ikuwow added a commit to ikuwow/resume that referenced this issue May 23, 2024
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

No branches or pull requests

3 participants