jasonraimondi / url-to-png

Selfhosted. URL to PNG utility featuring parallel rendering using Playwright for screenshots and with storage caching via Local, S3, or CouchDB
https://jasonraimondi.github.io/url-to-png/
MIT License
136 stars 26 forks source link

Hangs on invalid urls #18

Closed saschwarz closed 2 years ago

saschwarz commented 2 years ago

I'm using url-to-png to create snapshots in my Django web app for a database of web properties; some of which are no longer around.

If I invoke the docker image with this old and now defunked URL: http://localhost:3000/?url=http://www.greytdogsagility.com

The container gives this error: error: Attempted to send payload of invalid type 'boolean'. Expected a string or Buffer.

and the connection hangs "forever" and never times out.

jasonraimondi commented 2 years ago

Just pushed a fix for this in version 1.3.2 allowing the server to properly throw an error. I should probably just return a blank image or something, but that is a problem for another day.

saschwarz commented 2 years ago

Wow! Thank you for such a speedy resolution.