petersolopov / carbonara

API for carbon
MIT License
125 stars 32 forks source link

UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded #3

Closed sonder-joker closed 4 years ago

sonder-joker commented 4 years ago

I try to run it on my server but it report a error when I send a post request, which don't happen if use https://carbonara.now.sh/

(node:17) UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded
    at /home/pptruser/app/node_modules/puppeteer-core/lib/LifecycleWatcher.js:100:25
  -- ASYNC --
    at Frame.<anonymous> (/home/pptruser/app/node_modules/puppeteer-core/lib/helper.js:82:19)
    at Page.goto (/home/pptruser/app/node_modules/puppeteer-core/lib/Page.js:440:53)
    at Page.<anonymous> (/home/pptruser/app/node_modules/puppeteer-core/lib/helper.js:83:27)
    at module.exports (/home/pptruser/app/src/takeScreenshot.js:41:14)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:17) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17) [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.

I 'm not familiar with node.js, so I search it in google. But I can't solve it. I wish if someone can help me.

petersolopov commented 4 years ago

could you show code? Did you use a docker container to run it on your server?

sonder-joker commented 4 years ago

could you show code? Did you use a docker container to run it on your server?

Thanks for your help, I found out because I didn’t update my nodejs which default version is low in ubuntu. I recommand to give the minimum version requirements of nodejs.