Comments (5)
@jason-o-matic Thanks for your report.
The pixel matching error seems to be due to the animation not finished yet.
I think you should set more time to animationTimeout
.
And I couldn't agree with your suggestion that wait until matching size.
Even if animation is not finished yet, I think anmationTimeout
option shouldn't wait more.
from puppeteer-renderer.
Thanks for the prompt reply!
Here's a stack trace with more info, with an example that I think indicates more animationTimeout
isn't the only problem.
$ time curl 'http://localhost:3000/?type=screenshot&fullPage=true&animationTimeout=9999999999&url=https://www.cnn.com/'
Oops, An expected error seems to have occurred.
real 0m23.766s
user 0m0.015s
sys 0m0.039s
$ docker logs foobar
> [email protected] start /app
> node src/index.js
Initialized renderer.
Listen port on 3000.
Error: Image sizes do not match.
at pixelmatch (/app/node_modules/pixelmatch/index.js:21:15)
at waitForAnimations (/app/src/wait-for-animations.js:18:20)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Renderer.screenshot (/app/src/renderer.js:115:9)
at async /app/src/index.js:61:44
I set the animationTimeout
to a very large number, but the exception still happened in under 24 seconds.
I completely agree that animationTimeout
should be the maximum amount of time to wait.
Would it be possible to add a try/catch around pixelmatch(...)
so the calling function continued to retry?
from puppeteer-renderer.
Would it be possible to add a try/catch around pixelmatch(...) so the calling function continued to retry?
Just to clarify, I mean continue to retry until reaching animationTimeout
, but not more than that.
from puppeteer-renderer.
@jason-o-matic
I misunderstood about animationTimeout problem.
So I've fixed bug by comparing data sizes.
Thanks for the detailed error reporting.
from puppeteer-renderer.
I can confirm this solved the issue for me, thanks!
from puppeteer-renderer.
Related Issues (20)
- Oops, An expected error seems to have occurred. HOT 1
- Is there a way to reduce the size of the docker container? HOT 1
- Add health check endpoint HOT 1
- Docker container fails to run HOT 1
- UnhandledPromiseRejectionWarning: Error: Page crashed! HOT 2
- How to pass additional options for clipping HOT 6
- Error 500 HOT 5
- Render started to act as proxy HOT 1
- Puppeter cache disable or clear HOT 1
- Expected options.clip.x to be a number but found undefined HOT 2
- Custom DNS servers HOT 1
- what if url contains more than one parameter?
- Zombie chromium processes HOT 1
- Authentication HOT 1
- Inclusion of iframes in rendered output HOT 8
- Multi-Architecture Images (amd64/arm64) HOT 3
- Allow using POST method to allow for more/larger/longer options to be sent HOT 1
- Cannot find module 'fs/promises' HOT 1
- 建议更换一个镜像仓库吧,ghcr.io在阿里云服务器上pull一天了,愣是没pull下来。 HOT 1
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 puppeteer-renderer.