messages-web icon indicating copy to clipboard operation
messages-web copied to clipboard

QR code not scannable.

Open admin1982 opened this issue 3 years ago • 6 comments

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?

admin1982 avatar Oct 26 '22 03:10 admin1982

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

SwapnilSoni1999 avatar Oct 26 '22 18:10 SwapnilSoni1999

Thanks.

admin1982 avatar Oct 26 '22 18:10 admin1982

@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 avatar Nov 27 '22 21:11 j6k4m8

@j6k4m8 Yes, credentials.json was created. I am trying to send message using the credentials.json but it failed.

admin1982 avatar Nov 29 '22 00:11 admin1982

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!

j6k4m8 avatar Nov 29 '22 02:11 j6k4m8

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."

T3chi avatar Jun 08 '23 05:06 T3chi