net::ERR_FAILED (that happens with all pages)
sxiii opened this issue · 7 comments
root@test-jlinux_denis:~/screenshoteer# node index.js --url http://distrowatch.com
http://distrowatch.com
true
Error: net::ERR_FAILED at http://distrowatch.com
at navigate (/home/s/screenshoteer/node_modules/puppeteer/lib/FrameManager.js:120:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
-- ASYNC --
at Frame.<anonymous> (/home/s/screenshoteer/node_modules/puppeteer/lib/helper.js:111:15)
at Page.goto (/home/s/screenshoteer/node_modules/puppeteer/lib/Page.js:670:49)
at Page.<anonymous> (/home/s/screenshoteer/node_modules/puppeteer/lib/helper.js:112:23)
at execute (/home/s/screenshoteer/index.js:75:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
Yes, because the title tag is "DistroWatch.com: Put the fun back into computing. Use Linux, BSD."
It creates "DistroWatch.com" file in windows, the problem is ".com".
In the index.js line 71 replace with this:
const title = (await page.title()).replace(/[/\?%*:.|"<>]/g, '-');
It will create DistroWatch-com.png file.
@vladocar hmmm ok now I get the following:
root@test-jlinux_denis:/home/s/screenshoteer# node index.js --url http://distrowatch.com
http://distrowatch.com
true
Error: net::ERR_FAILED at http://distrowatch.com
at navigate (/home/s/screenshoteer/node_modules/puppeteer/lib/FrameManager.js:120:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
-- ASYNC --
at Frame.<anonymous> (/home/s/screenshoteer/node_modules/puppeteer/lib/helper.js:111:15)
at Page.goto (/home/s/screenshoteer/node_modules/puppeteer/lib/Page.js:670:49)
at Page.<anonymous> (/home/s/screenshoteer/node_modules/puppeteer/lib/helper.js:112:23)
at execute (/home/s/screenshoteer/index.js:75:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
Actually, it fails at any websites, including having and not having ".com" in website titles. Just so you know @vladocar
Test with yandex.ru
root@test-jlinux_denis:/home/s/screenshoteer# node index.js --url http://yandex.ru http://yandex.ru true Error: net::ERR_FAILED at http://yandex.ru at navigate (/home/s/screenshoteer/node_modules/puppeteer/lib/FrameManager.js:120:37) at process._tickCallback (internal/process/next_tick.js:68:7) -- ASYNC -- at Frame. (/home/s/screenshoteer/node_modules/puppeteer/lib/helper.js:111:15) at Page.goto (/home/s/screenshoteer/node_modules/puppeteer/lib/Page.js:670:49) at Page. (/home/s/screenshoteer/node_modules/puppeteer/lib/helper.js:112:23) at execute (/home/s/screenshoteer/index.js:75:16) at process._tickCallback (internal/process/next_tick.js:68:7)Hmm.. strange it works on both my WIndows and Mac.
Try to update commander:
npm i commander
Updated. It didn't helped tho...
+ commander@2.20.3
updated 1 package and audited 304 packages in 1.415s
found 0 vulnerabilities
Thanks anyway. Maybe I'll dig at this myself.
P.S. I'm on Manjaro Linux but I'm trying to run this on a privately-made C-only linux distribution. But the thing is that most of NPM packages work nicely there.
Try also: npm i puppeteer
I never tried on Linux I will try in my Virtual machine.
@vladocar actually, it works on my Manjaro even without any changes to the file. Here:
[sw@t490s screenshoteer]$ ls
'DistroWatch.com- Put the fun back into computing. Use Linux, BSD. undefined 1581345392569.png'
So it just created a file of that name without any problems.
But the problem is with the JLinux distro (the specialized linux distro I want to run this on). I was able to run chrome vanilla and ungoogled-chromium (for ungoogled, only after packing it in a huge tarball with GUIX toolkit). But some of the puppet-based screenshot tools are not working; and I wonder why. I've used these flags to run ungoogled chromium: ./bin/chromium --headless --no-sandbox --no-default-browser-check --no-first-run --no-experiments --disable-gpu --window-size=1920,1080 --hide-scrollbars --screenshot http://distrowatch.com