首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >木偶机群集示例抛出错误:无法获取浏览器页

木偶机群集示例抛出错误:无法获取浏览器页
EN

Stack Overflow用户
提问于 2019-05-18 07:38:28
回答 1查看 2.8K关注 0票数 2

我在木偶技师-集群文档中使用了这个例子

我正在节点v10.15.3上运行此操作,我尝试将无头属性和slowMo传递给傀儡手选项。

我希望代码退出并创建页面的屏幕快照,然而,所发生的是几个铬实例引导,这些实例在控制台挂起和错误时没有加载任何页面:

代码语言:javascript
复制
(node:30826) UnhandledPromiseRejectionWarning: Error: Unable to get browser page
    at Worker.<anonymous> (/Users/Starlord/Code/oppose/node_modules/puppeteer-cluster/dist/Worker.js:43:31)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/Starlord/Code/oppose/node_modules/puppeteer-cluster/dist/Worker.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:30826) 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: 21)
(node:30826) [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.
(node:30826) UnhandledPromiseRejectionWarning: Error: Unable to get browser page
    at Worker.<anonymous> (/Users/Starlord/Code/oppose/node_modules/puppeteer-cluster/dist/Worker.js:43:31)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/Starlord/Code/oppose/node_modules/puppeteer-cluster/dist/Worker.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:30826) 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: 22)
^Cinternal/process/per_thread.js:198
      throw errnoException(err, 'kill');
      ^

Error: kill ESRCH
    at process.kill (internal/process/per_thread.js:198:13)
    at process.killChrome (/Users/Starlord/Code/oppose/node_modules/puppeteer/lib/Launcher.js:110:17)
    at process.emit (events.js:189:13)
EN

回答 1

Stack Overflow用户

发布于 2019-05-18 09:06:56

问题是,我在使用木偶技师之前使用的是木偶技师池,它使用的是一个较老版本的木偶技师。

我移除木偶技师池并安装了木偶技师,它按预期工作。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56196941

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档