tungs / timesnap

Node.js program that takes screenshots at smooth intervals of web pages with JavaScript animations
BSD 3-Clause "New" or "Revised" License
234 stars 57 forks source link

Promise does not get resolved #41

Open danish-pyxis opened 4 years ago

danish-pyxis commented 4 years ago

Promise in timesnap p = timeHandler.goToTimeAndAnimateForCapture(browserFrames, marker.time);

does not get resolved after some frames and puppeteer hangs infinitely.

As a workaround, I have used a timeout to detect unhandled promise but its letting me destroy that process.

Can we discuss - why is this odd behaviour?

tungs commented 4 years ago

Does this happen for all webpages? If it's for a specific web page, could you post it?

danish-pyxis commented 4 years ago

The issue doesn't happen for all pages. Page is a canvas based animation video. Let convert a page into public url and then I will share with you.

ownagedj commented 3 years ago

This also happens in the current version. E.g. if a video is embedded which does not exist.

atulmy commented 2 years ago

Getting stuck at random frames, for examples:

Preparing page for screenshot...
 screenshot 254/1325
Page prepared
Capturing Frame 254 to /code/demo/puppeteer/timecut-temp-1654945656176/image-000000254.jpeg...

[stuck indefinitely here]