muralikg / puppetcam

Export puppeteer tab as webm video
MIT License
322 stars 62 forks source link

(node:1425) UnhandledPromiseRejectionWarning: Error: Could not start Xvfb. #3

Closed theianjohnson closed 6 years ago

theianjohnson commented 6 years ago

Hey! I just tried cloning your repo to try and run some basic Puppeteer commands to output as a video and after running npm install I'm getting an error on node export.js http://localhost:9000 spinner.webm

$ node export.js http://localhost:9000 spinner.webm
(node:1425) UnhandledPromiseRejectionWarning: Error: Could not start Xvfb.
    at Xvfb.startSync ({home directory}/puppetcam/node_modules/xvfb/index.js:84:17)
    ... rest of stack trace
(node:1425) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1425) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Running on Mac OSX 10.13.4, Node 10.5.0, NPM 6.1.0

Any idea what this could be?

muralikg commented 6 years ago

The example was designed to run on a linux server (Just sudo apt-get install xvfb on ubuntu). You just comment the xvfb.startsync and xvfb.stopsync lines to test it on mac but however if you deploy it to a server you will be needing them,

Sorry, I do not own a mac and could not help with the installation of xvfb on OS X. Feel free to reopen if you face any other issues