vasani-arpit / WBOT

A simple Web based BOT for WhatsApp™ in NodeJS 😜. Working as of 📅 Feb 4th, 2024
Other
988 stars 313 forks source link

Uncaught ReferenceError: webpackChunkwhatsapp_web_client is not defined #363

Closed mohdsaeed7849 closed 6 months ago

mohdsaeed7849 commented 6 months ago

I don't know, my whatsapp version is changed from 2.2412.50 to 2.3000.1012373576

that is giving me error in wapi.js: webpackChunkwhatsapp_web_client is not defined.

vasani-arpit commented 6 months ago

Whatsapp has moved away from webpack to their internal build system called comet. There are several solutions mentioned in this issue. https://github.com/pedroslopez/whatsapp-web.js/issues/2789 please try them out.

mbnaj commented 6 months ago

what is the solution?

vasani-arpit commented 6 months ago

either https://github.com/pedroslopez/whatsapp-web.js/issues/2789#issuecomment-2018399590 or https://github.com/pedroslopez/whatsapp-web.js/issues/2789#issuecomment-1992260938 should work. IMO. You can do both.

mohdsaeed7849 commented 6 months ago

@vasani-arpit clearing the cookies logs me out of whatsapp

vasani-arpit commented 6 months ago

That's the price one have to pay until there is a permanent solution. Reverse engineering what WA has built takes time. This is a temporary solution.

mohdsaeed7849 commented 6 months ago

you can find the updated wapi.js that is compatible in both 2.2X and 2.3X , https://github.com/mikelustosa/Projeto-TInject/blob/master/Source/JS/js.abr

kivlanzein commented 6 months ago

@mohdsaeed7849 please help me to fix this problem, I got the same problem webpackChunkwhatsapp_web_client is not defined? there is a solution

does this code work for you? https://github.com/mikelustosa/Projeto-TInject/blob/master/Source/JS/js.abr

mohdsaeed7849 commented 6 months ago

@kivlanzein yes, it worked for me.

kivlanzein commented 6 months ago

@mohdsaeed7849 okay thanks, worked for me to

kivlanzein commented 6 months ago

@mohdsaeed7849 can you help me how to send a message to a new number? I use this

WAPI.sendMessage2() .. works if you have already chatted with a bot, cannot send messages if you have never chatted with a bot (new number)

vasani-arpit commented 6 months ago

Temporary fix has been added in latest version https://github.com/vasani-arpit/WBOT/releases