Open admin1982 opened 2 years ago
Sure i'll take a look very soon in couple of days I'm stuck with some deadlines as of now. Will keep you posted. Thanks for pointing out the issue
Thanks.
@admin1982 you'll probably find that you successfully created the credentials.json
even though this appears to be failing. Is that true? (will help diagnose!)
@j6k4m8 Yes, credentials.json was created. I am trying to send message using the credentials.json but it failed.
Can you share the error you get when you try to send a message? That sounds unrelated from the failure to write the credentials file!
This looks similar to issues discussed here. I haven't tried it yet, but this code snippet from a post looks promising::
"Just to make @aslushnikov's comment more explicit, with an example right here, I found that adding the --disable-dev-shm-usage launch option made a massive difference:
const browser = await puppeteer.launch({
args: ['--disable-dev-shm-usage']
});
See also https://github.com/GoogleChrome/puppeteer/issues/1834."
QR code saved was not scannable. Then I edited the puppeteer to run with headless: false mode.
When I scan the QR code from chrome, error below shown.
C:\Users\Acer\Desktop\messages-web-main\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:208 this._callbacks.set(id, { resolve, reject, error: new Error(), method }); ^
Error: Protocol error (Runtime.callFunctionOn): Target closed. at C:\Users\Acer\Desktop\messages-web-main\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:208:63 at new Promise ()
at CDPSession.send (C:\Users\Acer\Desktop\messages-web-main\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:207:16)
at ExecutionContext._evaluateInternal (C:\Users\Acer\Desktop\messages-web-main\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:201:50)
at ExecutionContext.evaluateHandle (C:\Users\Acer\Desktop\messages-web-main\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:152:21)
at WaitTask.rerun (C:\Users\Acer\Desktop\messages-web-main\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:532:37)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Can you help on this?