Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Protocol error (Target.closeTarget): Target closed. #344

Open
yeekit-jewel opened this issue Mar 28, 2019 · 3 comments
Open

Error: Protocol error (Target.closeTarget): Target closed. #344

yeekit-jewel opened this issue Mar 28, 2019 · 3 comments
Labels

Comments

@yeekit-jewel
Copy link

yeekit-jewel commented Mar 28, 2019

What is the current behavior?
(node:61647) UnhandledPromiseRejectionWarning: Error: Protocol error (Target.closeTarget): Target closed. at Promise (/Users/random/Documents/GitHub/test/node_modules/puppeteer/lib/Connection.js:86:56) at new Promise (<anonymous>) at Connection.send (/Users/random/Documents/GitHub/test/node_modules/puppeteer/lib/Connection.js:85:12) at Page.close (/Users/random/Documents/GitHub/test/node_modules/puppeteer/lib/Page.js:888:38) at Crawler.close (/Users/random/Documents/GitHub/test/node_modules/headless-chrome-crawler/lib/crawler.js:80:22) at Crawler.<anonymous> (/Users/random/Documents/GitHub/test/node_modules/headless-chrome-crawler/lib/helper.js:177:23) at HCCrawler._request (/Users/random/Documents/GitHub/test/node_modules/headless-chrome-crawler/lib/hccrawler.js:349:21) at process.internalTickCallback (internal/process/next_tick.js:77:7)

If the current behavior is a bug, please provide the steps to reproduce
just run the code and you will run into this error randomly

Please tell us about your environment:

  • Version: 1.8.0
  • Platform / OS version: macOS High Sierra version 10.13.6
  • Node.js version: 11.6.0
@yeekit-jewel
Copy link
Author

i solved this by temporary comment out the line 349 in node_modules/headless-chrome-crawler/lib/hccrawler.js:

//await crawler.close();

I think it is due to the code somehow run into the exception after you close the crawler in your try block.

@mike-aungsan
Copy link

@yeekit-jewel Thanks. Finally, I am able to see what is the real error.

@popstas
Copy link

popstas commented Apr 18, 2020

Error appears after maxrequestreached fired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants