linkedtales / scrapedin

LinkedIn Scraper (currently working 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting the following error (node:19656) UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.evaluate): Target closed.

shubhankar1904 opened this issue · comments

I used the code sampled given in the basic tutorial and replaced the userid, password and profile URL. when I run the code. i get this error. I did double check the userid and password, and also tried the cookies method. but nothing works

(node:19656) UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.evaluate): Target closed.
at D:\Installations\scrapedin-master\scrapper\node_modules\puppeteer\lib\Connection.js:183:56
at new Promise ()
at CDPSession.send (D:\Installations\scrapedin-master\scrapper\node_modules\puppeteer\lib\Connection.js:182:12)
at ExecutionContext.evaluateHandle (D:\Installations\scrapedin-master\scrapper\node_modules\puppeteer\lib\ExecutionContext.js:72:75)
at ExecutionContext. (D:\Installations\scrapedin-master\scrapper\node_modules\puppeteer\lib\helper.js:109:23)
at D:\Installations\scrapedin-master\scrapper\node_modules\puppeteer\lib\DOMWorld.js:125:38
at processTicksAndRejections (internal/process/task_queues.js:97:5)
-- ASYNC --
at Frame. (D:\Installations\scrapedin-master\scrapper\node_modules\puppeteer\lib\helper.js:108:27)
at Page.$ (D:\Installations\scrapedin-master\scrapper\node_modules\puppeteer\lib\Page.js:300:29)
at Page. (D:\Installations\scrapedin-master\scrapper\node_modules\puppeteer\lib\helper.js:109:23)
at D:\Installations\scrapedin-master\scrapper\node_modules\scrapedin\src\login.js:61:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async module.exports (D:\Installations\scrapedin-master\scrapper\node_modules\scrapedin\src\scrapedin.js:28:7)
at async cfunc (D:\Installations\scrapedin-master\scrapper\crawler.js:10:25)
(node:19656) 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: 2)
(node:19656) [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:19656) UnhandledPromiseRejectionWarning: Error: linkedin: manual check was required, verify if your login is properly working manually or report this issue: scrapedin 1.0.20 https://github.com/linkedtales/scrapedin/issues
at D:\Installations\scrapedin-master\scrapper\node_modules\scrapedin\src\login.js:63:31
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async module.exports (D:\Installations\scrapedin-master\scrapper\node_modules\scrapedin\src\scrapedin.js:28:7)
at async cfunc (D:\Installations\scrapedin-master\scrapper\crawler.js:10:25)
(node:19656) 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: 3)

The linked issue probably has no connection to this error since it was already fixed and this is not the same Error.

It's not really easy to debug without being able to reproduce code. Can you run it with hasToLog turned on and see where it fails exactly?

This could also be failing due to your puppeteer installation / OS ... etc.

I've started having this same issue. Two days ago the scrapper was working fine

scrapedin: 2020-09-18T16:38:30.600Z info: [scrapedin.js] initializing
scrapedin: 2020-09-18T16:38:30.985Z info: [scrapedin.js] email and password was provided, we're going to login...
scrapedin: 2020-09-18T16:38:35.658Z info: [login.js] logging at: https://www.linkedin.com/login
scrapedin: 2020-09-18T16:38:51.538Z warn: [login.js] successful login element was not found
scrapedin: 2020-09-18T16:38:51.555Z warn: [login.js] manual check was required
(node:13184) UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.evaluate): Target closed.
    at PATH\node_modules\puppeteer\lib\Connection.js:183:56
    at new Promise (<anonymous>)
    at CDPSession.send (PATH\node_modules\puppeteer\lib\Connection.js:182:12)
    at ExecutionContext.evaluateHandle (PATH\node_modules\puppeteer\lib\ExecutionContext.js:72:75)
    at ExecutionContext.<anonymous> (PATH\node_modules\puppeteer\lib\helper.js:109:23)
    at PATH\node_modules\puppeteer\lib\DOMWorld.js:125:38
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
  -- ASYNC --
    at Frame.<anonymous> (PATH\node_modules\puppeteer\lib\helper.js:108:27)
    at Page.$ (PATH\node_modules\puppeteer\lib\Page.js:300:29)
    at Page.<anonymous> (PATH\node_modules\puppeteer\lib\helper.js:109:23)
    at PATH\node_modules\scrapedin\src\login.js:61:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async module.exports (PATH\node_modules\scrapedin\src\scrapedin.js:29:7)
(node:13184) 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: 2)
(node:13184) [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:13184) UnhandledPromiseRejectionWarning: Error: linkedin: manual check was required, verify if your login is properly working manually or report this issue: scrapedin 1.0.21 https://github.com/linkedtales/scrapedin/issues
    at PATH\node_modules\scrapedin\src\login.js:63:31
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async module.exports (PATH\node_modules\scrapedin\src\scrapedin.js:29:7)
(node:13184) 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: 3)

I've started having this same issue. Two days ago the scrapper was working fine

scrapedin: 2020-09-18T16:38:30.600Z info: [scrapedin.js] initializing
scrapedin: 2020-09-18T16:38:30.985Z info: [scrapedin.js] email and password was provided, we're going to login...
scrapedin: 2020-09-18T16:38:35.658Z info: [login.js] logging at: https://www.linkedin.com/login
scrapedin: 2020-09-18T16:38:51.538Z warn: [login.js] successful login element was not found
scrapedin: 2020-09-18T16:38:51.555Z warn: [login.js] manual check was required
(node:13184) UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.evaluate): Target closed.
    at PATH\node_modules\puppeteer\lib\Connection.js:183:56
    at new Promise (<anonymous>)
    at CDPSession.send (PATH\node_modules\puppeteer\lib\Connection.js:182:12)
    at ExecutionContext.evaluateHandle (PATH\node_modules\puppeteer\lib\ExecutionContext.js:72:75)
    at ExecutionContext.<anonymous> (PATH\node_modules\puppeteer\lib\helper.js:109:23)
    at PATH\node_modules\puppeteer\lib\DOMWorld.js:125:38
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
  -- ASYNC --
    at Frame.<anonymous> (PATH\node_modules\puppeteer\lib\helper.js:108:27)
    at Page.$ (PATH\node_modules\puppeteer\lib\Page.js:300:29)
    at Page.<anonymous> (PATH\node_modules\puppeteer\lib\helper.js:109:23)
    at PATH\node_modules\scrapedin\src\login.js:61:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async module.exports (PATH\node_modules\scrapedin\src\scrapedin.js:29:7)
(node:13184) 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: 2)
(node:13184) [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:13184) UnhandledPromiseRejectionWarning: Error: linkedin: manual check was required, verify if your login is properly working manually or report this issue: scrapedin 1.0.21 https://github.com/linkedtales/scrapedin/issues
    at PATH\node_modules\scrapedin\src\login.js:63:31
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async module.exports (PATH\node_modules\scrapedin\src\scrapedin.js:29:7)
(node:13184) 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: 3)

Quick Update, it started working again

@gmrperdigao I've started having this same issue. what is the solution for this issue?