Closed kashif-ghafoor closed 1 year ago
Any luck figuring this out? I'm getting the same error.
I think https://github.com/spinlud/linkedin-jobs-scraper/commit/dcb657a6ec6080d1bff0684e6564f1e991efda98 is causing it, I worked around by using version 12.0.3
Anonymous mode is no longer supported
when headless is set to false scraper runs in anonymous mode but when I try to run it with headless false, After printing some information about browser scraper throws this error.
ProtocolError: Protocol error (Target.closeTarget): Target closed. at {WORKSPACE DIR}/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:103:24 at new Promise ()
at Connection.send ( {WORKSPACE DIR}/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:99:16)
at Page.close ( {WORKSPACE DIR}/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2011:30)
at LinkedinScraper. ( {WORKSPACE DIR}/node_modules/linkedin-jobs-scraper/build/scraper/LinkedinScraper.js:284:52)
at Generator.next ()
at fulfilled ( {WORKSPACE DIR}/node_modules/linkedin-jobs-scraper/build/scraper/LinkedinScraper.js:5:58) {
originalMessage: ''
}
node:internal/process/promises:279
triggerUncaughtException(err, true / fromPromise /);
^
ProtocolError: Protocol error (Target.closeTarget): Target closed. at {WORKSPACE DIR}/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:103:24 at new Promise ()
at Connection.send {WORKSPACE DIR}/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:99:16)
at Page.close ( {WORKSPACE DIR}/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2011:30)
at LinkedinScraper. ( {WORKSPACE DIR}/node_modules/linkedin-jobs-scraper/build/scraper/LinkedinScraper.js:284:52)
at Generator.next ()
at fulfilled ( {WORKSPACE DIR}/node_modules/linkedin-jobs-scraper/build/scraper/LinkedinScraper.js:5:58) {
originalMessage: ''
}
I have used a puppeteer. This error normally occurs when the browser/page closes and we want to perform an action after closing. But in this case I just copied sample code from github and tried to run. I am not able to understand what's the problem