Closed mmaeffert closed 1 year ago
mesmo erro aqui!
same error here
/whats/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:230
error: new Errors_js_1.ProtocolError(),
^
ProtocolError: Protocol error (Runtime.callFunctionOn): Target closed.
at /whats/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:230:24
at new Promise (<anonymous>)
at CDPSession.send (/whats/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:226:16)
at ExecutionContext._evaluateInternal (/whats/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:204:50)
at ExecutionContext.evaluateHandle (/whats/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:155:21)
at WaitTask.rerun (/whats/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:551:37)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
originalMessage: ''
}
@mmaeffert managed to solve?
Does anyone know how to resolve?
@NissiusRibas No and it has been driving me insane. I figured that deleting the .wwebjs_cache and .wwebjs_auth, it sometimes works. I also get another error message when running the programm with a non root user …is not a snap cgroup
(node:8587) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/user.slice/user-0.slice/session-1.scope is not a snap cgroup
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/home/wa/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:241:20)
at Interface.<anonymous> (/home/wa/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:231:68)
at Interface.emit (events.js:326:22)
at Interface.close (readline.js:416:8)
at Socket.onend (readline.js:194:10)
at Socket.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:8587) 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:8587) [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.
Now my old installation is not working either, without doing ANY changes. It ran for almost 12 month
When I do the following, I get it running:
Then I get it running, but only if I do not use LocalAuth, which kind of defeats the purpose of using a service, but that suggests that authentication seems to trigger the issue
Fixed. I tried to safe money and chose ARM64 architecture. Went back to x86 and everything is running smooth now
When I do the following, I get it running:
- apply this: Nothing happens after scanning the QR Code #2437 (comment)
- remove /.wwebjs_auth and /.wwebjs_cache
- restart server
- start service
Then I get it running, but only if I do not use LocalAuth, which kind of defeats the purpose of using a service, but that suggests that authentication seems to trigger the issue
thanks man you really help me.
Is there an existing issue for this?
Describe the bug
I migrated servers and got the same code running with the same dependencies. When I start the bot via the CLI, everything works fine. However when I start the program via a service file, I get the following error:
Expected behavior
Read the local auth files and start as usual
Steps to Reproduce the Bug or Issue
systemctl start whatsappbot.service
Relevant Code
Service file:
Init properties:
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
No, I am not using Multi Device
Environment
OS: Ubuntu 22.04 "whatsapp-web.js": "^1.21.1-alpha.1" Node Version: 20.3.0
Additional context
No response