【发布时间】:2021-11-01 09:29:36
【问题描述】:
从台式机换成笔记本电脑后,每次尝试运行 puppeteer 程序时都会出现以下错误:
(node:69) UnhandledPromiseRejectionWarning: TimeoutError: Timed out after 30000 ms while trying to connect to the browser! Only Chrome at revision r901912 is guaranteed to work.
at Timeout.onTimeout (/mnt/c/Users/trgre/OneDrive/Desktop/puppeteer-Core/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:208:20)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
(node:69) 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:69) [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.
【问题讨论】:
-
欢迎来到 Stack Overflow!寻求调试帮助的问题必须包括所需的行为以及在问题本身中重现它所需的最短代码。没有明确问题陈述的问题对其他读者没有用处。请参阅:How to create a Minimal, Complete, and Verifiable example。
-
请提供足够的代码,以便其他人更好地理解或重现问题。
-
除了代码之外,您的每个不同设备上还有哪些操作系统/环境设置?我们不知道哪些变量可能导致该问题,因此请尝试提供诊断所需的背景信息。
标签: javascript node.js puppeteer