"Protocol error (Page.captureScreenshot): Target closed" when trying to take a fullpage-screenshot from a huge page
See original GitHub issueWe’re using docker container like that:
FROM ......
# Install missing shared libs for Chromium
RUN apt-get update && \
apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
# Project
COPY ./ /app
WORKDIR /app
# Install puppeteer so it's available in the container
RUN npm i --production
# Info
RUN npm -v
RUN node -v
# Run
ENTRYPOINT ["npm", "start"]
npm start
starts a simple server that takes a screenshot for specified page.
Inside this container we’re getting an error Protocol error (Page.captureScreenshot): Target closed. when fullPage property is true and trying to take a screenshot from a huge page (e.g. https://blog.archive.org/).
In a local machine, everything is fine.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Protocol error (Page.captureScreenshot): Target closed when ...
captureScreenshot ): Target closed. when fullPage property is true and trying to take a screenshot from a huge page. In a local machine, ......
Read more >Protocol error (Page.captureScreenshot): Target closed ...
Your issue is not reproducible. It works on my Centos 7, your Mac environment, so it seems to be a problem with the...
Read more >Error - Target closed - Checkly
Example error message: UnhandledPromiseRejectionWarning: Error: Protocol error: Target closed Possible causes Obvious possible cause: the browser, ...
Read more >1164757 - Capture full size screenshot is broken - Monorail
Issue 1164757: Capture full size screenshot is broken: Incorrect pixel dimensions · 1. Navigate to https://developer.mozilla.org/en-US/ · 2. CTRL+ ...
Read more >Puppeteer - CodeceptJS
don't save screenshot on failure. fullPageScreenshots boolean (opens new window)? make full page screenshots on failure.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aslushnikov
--disable-dev-shm-usage
works. Tanks! ✅