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

Tell puppeteer to use a older version of chrome? #442

Open
AdriaanBos opened this issue Jun 3, 2024 · 0 comments
Open

Tell puppeteer to use a older version of chrome? #442

AdriaanBos opened this issue Jun 3, 2024 · 0 comments

Comments

@AdriaanBos
Copy link

Hi,

I'm currently running on Windows Server 2012. I had to upgrade pageres to a newer version because of API compatibility regarding chromium. We were still running pagesres that used chromium v78.

After upgrading nodejs, npm and pageres I can see that puppeteer us trying to use chrome version 121.0.6167.85 which is not supported on Windows server 2012. I'm getting the following error:

C:\SCM2 Repilication\Reporting Service>node convert.mjs

  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/puppetee
r/puppeteer/issues/new/choose.

(node:21812) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
file:///C:/SCM2%20Repilication/Reporting%20Service/node_modules/@puppeteer/browsers/lib/esm/launch.js:258
                reject(new Error([
                       ^

Error: Failed to launch the browser process!


TROUBLESHOOTING: https://pptr.dev/troubleshooting

    at Interface.onClose (file:///C:/SCM2%20Repilication/Reporting%20Service/nod
e_modules/@puppeteer/browsers/lib/esm/launch.js:258:24)
    at Interface.emit (node:events:532:35)
    at Interface.close (node:internal/readline/interface:527:10)
    at Socket.onend (node:internal/readline/interface:253:10)
    at Socket.emit (node:events:532:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:2
1)

Node.js v22.2.0

How can use pageres and tell puppeteer to use a lower version of chrome?

import Pageres from 'pageres';

await new Pageres({delay: 7})
	.source('file:///C:/SCM2%20Repilication/Reporting%20Service/techmaps/user_map.html', ['1920x1080'])
	.destination('C:/SCM2 Repilication/Reporting Service/techmaps/')
	.run();
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

1 participant