错误:协议错误(Browser.getVersion):目标已关闭?

时间:2018-11-15 16:22:56

标签: node.js lambda puppeteer

我正在Lambda上运行长时间的递归会话。我的功能是基于Puppeteer。 3-4次调用后,出现此错误:

 Error: Protocol error (Browser.getVersion): Target closed.
at Promise (/var/task/node_modules/puppeteer/lib/Connection.js:73:56)
at new Promise (<anonymous>)
at Connection.send (/var/task/node_modules/puppeteer/lib/Connection.js:72:12)
at Browser._getVersion (/var/task/node_modules/puppeteer/lib/Browser.js:233:29)
at Browser.version (/var/task/node_modules/puppeteer/lib/Browser.js:208:32)
at Browser.<anonymous> (/var/task/node_modules/puppeteer/lib/helper.js:145:23)
at isBrowserAvailable (/var/task/node_modules/puppeteer-lambda/src/index.js:52:29)
at _getBrowser (/var/task/node_modules/puppeteer-lambda/src/index.js:12:41)
at Object.exports.getBrowser (/var/task/node_modules/puppeteer-lambda/src/index.js:46:11)

有什么办法解决这个问题吗?

0 个答案:

没有答案