Coder Social home page Coder Social logo

wwebjs / wwebjs.dev Goto Github PK

View Code? Open in Web Editor NEW
83.0 7.0 197.0 530 KB

Home to the wwebjs.dev site and official whatsapp-web.js guide

Home Page: https://wwebjs.dev

License: MIT License

JavaScript 100.00%
guide whatsapp whatsapp-web javascript whatsapp-web-js vuepress2

wwebjs.dev's People

Contributors

alechkos avatar darricheng avatar h110m avatar hrichiksite avatar husinzz avatar mikesoft avatar nelson8013 avatar pedroslopez avatar purpshell avatar qzdark avatar rockyou-cmd avatar whoisdon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wwebjs.dev's Issues

add buttons

iam tried to add button with message. but its not working

Compile Errors

Hi

I installed packet
npm i whatsapp-web.js

I add example code first line to my project

const { Client } = require('whatsapp-web.js');

but while this line is active, the project does not compile.

while this line is passive, the project is compile.

Error messages

**BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }**




**My modules versions** 
Angular CLI: 13.3.10
Node: 14.16.0
Package Manager: npm 6.14.11
OS: win32 x64
Angular: 13.3.12
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1303.10
@angular-devkit/build-angular   13.3.10
@angular-devkit/core            12.2.18
@angular-devkit/schematics      12.2.18
@angular/cdk                    8.2.3
@angular/cli                    13.3.10
@schematics/angular             12.2.18
rxjs                            6.5.5
typescript                      4.6.4
webpack                         5.83.1

![SS](https://github.com/wwebjs/wwebjs.dev/assets/123541143/81f4ae13-ff87-4fc9-8fa6-6c2e177dac8a)

Whatsapp web error

Aplicação rodando na porta *: 8001 . Acesse no link: http://localhost:8001
C:\chatbot_mcbc\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34
const version = indexHtml.match(/manifest-([\d\.]+).json/)[1];
^

TypeError: Cannot read properties of null (reading '1')
at LocalWebCache.persist (C:\chatbot_mcbc\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69)
at C:\chatbot_mcbc\node_modules\whatsapp-web.js\src\Client.js:771:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Using list and buttons gets you banned

I have gotten banned on more than 5 numbers and yes is 3 where physically sims and i set all those arg on puppeteer

So i decided to replicate my code with just text and no list or button

Now the bot has been running for 2 days straight now without getting banned and i even setup another bot to message the other bot and they are ping each othere every 5secs yet still no ban because i didn't use list and button

But building bot without button and list is bad for user experience and bad for the kind of stuff i am building i will be glad if this can be looked into and fixed thanks

Error throwing after scan whatsapp qr code in nodejs app

D:\Web Developement\UDEMY\Whatsapp Bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221
throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
^

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default')
at puppeteer_evaluation_script:5:95
at ExecutionContext._evaluateInternal (D:\Web Developement\UDEMY\Whatsapp Bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (D:\Web Developement\UDEMY\Whatsapp Bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16)
at async Client.initialize (D:\Web Developement\UDEMY\Whatsapp Bot\node_modules\whatsapp-web.js\src\Client.js:323:9)

Node.js v20.11.1
this error is thrown by this

client readiness

after generating qr even if qr scaned then its not going in readyness means client is not getting ready after qr scan

authenticated event is returning undefined

below is the code I have:


const { Client, LegacySessionAuth } = require('whatsapp-web.js');
const qrcode = require('qrcode-terminal');

try {

 let client = new Client();

    client.on('qr', (qr) => {
        qrcode.generate(qr, { small: true });
        console.log('QR RECEIVED', qr);
    });
    
    
    // Save session values to the file upon successful auth
    client.on('authenticated', (session) => {
        console.log(session, typeof session);
    });

    client.on('ready', () => {
        console.log('Client is ready!');
    });

    client.on('message', msg => {
        console.log('Message received:', msg);
    });

    client.initialize();
} catch (e) {
    console.log(e);
    throw new Error(e);
}


in result, everything is working fine just the session after authentication is not getting console logged, instead undefined is loged
as per: https://wwebjs.dev/guide/authentication.html#the-authenticated-event

Not working when I try to launch it

Description

C:\Visual Studio Code\whatsappbot>node whatsappbot.js

C:\Visual Studio Code\whatsappbot\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34
const version = indexHtml.match(/manifest-([\d\.]+).json/)[1];
^

TypeError: Cannot read properties of null (reading '1')
at LocalWebCache.persist (C:\Visual Studio Code\whatsappbot\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69)
at C:\Visual Studio Code\whatsappbot\node_modules\whatsapp-web.js\src\Client.js:786:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

whatsapp-web.js / whatss

I have followed the tutorial correctly at every stage and I am using node v22, but after installing whatsapp-web.js and creating the main code, when I run the program it appears "TypeError: Cannot read properties of null (reading '1')", so what do I have to do? Thank You
image

Error in execution

wwebjs-bot\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34
const version = indexHtml.match(/manifest-([\d\.]+).json/)[1];

    \wwebjs-bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221
        throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
              ^

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default')
at puppeteer_evaluation_script:5:95

erroors

TypeError: Cannot read properties of null (reading '1')

Is there any permanent fix for this? I tried this library 15-20 days ago and it was working fine, but now it is breaking for me as well with the same manifest file version issue. In index.html script is unable to find the version information of manifest file.

Screenshot 2024-04-18 at 11 37 55 AM

whatsapp-web.js error of puppeteer

D:\Web Developement\UDEMY\Whatsapp Bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221
throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
^

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default')
at puppeteer_evaluation_script:5:95
at ExecutionContext._evaluateInternal (D:\Web Developement\UDEMY\Whatsapp Bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (D:\Web Developement\UDEMY\Whatsapp Bot\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16)
at async Client.initialize (D:\Web Developement\UDEMY\Whatsapp Bot\node_modules\whatsapp-web.js\src\Client.js:323:9)

Node.js v20.11.1
this error is thrown by this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.