You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example code is not reproducible. In the repository readme.md it only indicates the installation of node, install the dependency and run the example script and that's it, but in reality there are many previous steps and even then it is not possible to completely reproduce:
The component requires a specific version of nodejs, it would be a good idea to add instructions to set it as required in the package.json using engines option.
Pupeeter browser installation: The library require the web browser of pupeeter, i install using npx @puppeteer/browsers install chrome@stable;.
By default, puppeteer gives problems with the google chrome sandbox and you have to add special instructions to whatsapp web or it won't start: No usable sandbox on non root userRunning as root without --no-sandbox is not supported. #344 This required instruction is not found in the readme file and that means that the example code cannot be reproduced in any way. I even recommend that disabling the sandbox be enabled by default.
The code says an other error after qr resolve throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));. At this point I give up trying to get the script to work.
Expected behavior
Give indications of additional installations and configurations for minimum reproducibility and that the example script works without errors.
const{ Client }=require('whatsapp-web.js');constclient=newClient({puppeteer: {headless: true,args: ['--no-sandbox','--disable-setuid-sandbox','--disable-dev-shm-usage','--disable-accelerated-2d-canvas','--no-first-run','--no-zygote','--disable-gpu']},});client.on('qr',(qr)=>{// Generate and scan this code with your phoneconsole.log('QR RECEIVED',qr);});client.on('ready',()=>{console.log('Client is ready!');});client.on('message',msg=>{if(msg.body=='!ping'){msg.reply('pong');}});client.initialize();
Browser Type
Google Chrome
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Ubuntu 24.04 LTS.
Phone OS: Android.
whatsapp-web.js version 1.23.0
WhatsApp Web version: Can not find the version before the error message.
Node.js Version: v18.19.1
Additional context
No response
The text was updated successfully, but these errors were encountered:
I'm having the same problem, it seems like it stopped working out of nowhere, I remember everything was ok the last time I tested it, I think it was 5 days ago, in this case I went to test it this afternoon and it hasn't happened anymore.
Is there an existing issue for this?
Describe the bug
The example code is not reproducible. In the repository
readme.md
it only indicates the installation of node, install the dependency and run the example script and that's it, but in reality there are many previous steps and even then it is not possible to completely reproduce:package.json
usingengines
option.npx @puppeteer/browsers install chrome@stable;
.No usable sandbox
on non root user Running as root without --no-sandbox is not supported. #344 This required instruction is not found in the readme file and that means that the example code cannot be reproduced in any way. I even recommend that disabling the sandbox be enabled by default.LocalWebCache
error appears: TypeError: Cannot read properties of null (reading '1') at LocalWebCache.js for fresh installation #3000 The solution is upgrade the library but i use the last version fromnpmjs
. I solve the error setting a static version removing the regexp and addingconst version = '2.2206.9';
.throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
. At this point I give up trying to get the script to work.Expected behavior
Give indications of additional installations and configurations for minimum reproducibility and that the example script works without errors.
Steps to Reproduce the Bug or Issue
Relevant Code
package.json
:index.js
:Browser Type
Google Chrome
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: