Closed epokuser closed 1 year ago
That error might occur when the bot is trying to make a screenshot exactly before "page.goto" ran. You could implement a try-catch or make a variable so the user knows whenever the restart is done. Personally I haven't ran into this issue, therefore I can't give an accurate solution.
**hello I updated the bot now iT BREAKS AFTER THE time specified.
I mean the bot works with all the new features but it is supposed to auto restart which it doesn't it just stops and crashes ** Connected to Discord!
C:\Users\Lelkasa\node_modules\puppeteer-core\lib\cjs\puppeteer\common\Connection.js:329 error: new Errors_js_1.ProtocolError(), ^
ProtocolError: Protocol error (Page.captureScreenshot): Target closed. at C:\Users\Lelkasa\node_modules\puppeteer-core\lib\cjs\puppeteer\common\Connection.js:329:24 at new Promise ()
at CDPSessionImpl.send (C:\Users\Lelkasa\node_modules\puppeteer-core\lib\cjs\puppeteer\common\Connection.js:325:16)
at CDPPage._CDPPage_screenshotTask (C:\Users\Lelkasa\node_modules\puppeteer-core\lib\cjs\puppeteer\common\Page.js:2591:77)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
originalMessage: ''
}
Node.js v18.12.1
C:\Users\Lelkasa>node zbouncer.js Connected to Discord!