FWeinb / electron-screenshot-service

Take screenshots using electron
MIT License
141 stars 26 forks source link

Running as a service: won't create second screenshot #32

Closed ahallicks closed 7 years ago

ahallicks commented 7 years ago

Firstly, this is a great module! I'm using it as part of a task runner to build a site then create a screenshot by calling this as a service at a given URL.

The issue is that it works the first time I call the URL but subsequent calls just hang. It gets to the screenshot creation, doesn't create a screenshot and then keeps trying over and over again.

I'm guessing that it's something to do with not closing the old process? But I thought that would be what screenshot.close(); does and I'm calling that right after the screenshot is saved.

I'm using express as a server that listens for a particular URL to generate screenshots. Have you seen anything like this before?

ahallicks commented 7 years ago

Nevermind, I'm a dumbass. Not calling screenshot.close(); is the trick!