Comments (3)
It's a Chromium Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=770769&desc=2
Here's an example how to make screenshotting long pages work: https://github.com/GoogleChrome/puppeteer/blob/230be28b067b521f0577206899db01f0ca7fc0d2/examples/screenshots-longpage.js
Maybe this can get included into your Docker image @alekzonder ?
from docker-puppeteer.
@derFunk yes, i add screenshot patch to docker image
from docker-puppeteer.
I created this, it should be working: https://gist.github.com/derFunk/10747ce60e965de5b771e96b7a4ba8f7
I extended the returned JSON to contain the created single image filenames with the 16k max texture size, and I also removed the need to query for a height dimension as a command line argument.
Stitching the single images together has to be done with e.g. ImageMagick: convert -append file1.png file2.png out.png
, by iterating over the filenames (e.g. jq -r '.files[].filename')
.
It would be an optimization step to do stitching in the container already.
I had a little caveat though: Pretty regularly I encountered that the screenshot loop gets stuck, resulting in Error: Protocol error (Page.captureScreenshot): Target closed.
.
I didn't dig too deep into it, but found out that a page reload inside of the for loop seems to mitigate that specific error. It's a dirty hack (and commented out in my Gist), without me knowing why this helps, I just tried out several things to fix the getting-stuck problem.
I'll continue testing and can eventually provide a PR.
from docker-puppeteer.
Related Issues (20)
- can't npm install globally HOT 1
- How to use npm install in your image?
- yarn version is too old HOT 1
- root password HOT 1
- Provide latest node js support for image HOT 3
- Cannot find module '/app/index.js' HOT 1
- Error: EACCES: permission denied, open '/app/w.js' HOT 1
- can't launch chrome extension HOT 2
- Allow running in headful mode HOT 1
- Shouldn't tag 'latest' point to latest release? HOT 2
- can't take screenshots EACCES permission denied exception HOT 6
- Bind volumes don't work HOT 1
- Update to latest node:lts HOT 1
- Container don't exit on error HOT 1
- Can't install additional software HOT 1
- Error: net::ERR_FAILED at https://www.google.com/
- Fails with 'jest-puppeteer' due to missing 'procps' package
- what is root password? help ? `bash: sudo: command not found` HOT 1
- --cap-add=SYS_ADMIN comment
- add CHROME_BIN env variable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-puppeteer.