pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
14.62k stars 3.48k forks source link

WhatsApp Web crashes when sending buttons #2132

Closed Diieggoww closed 11 months ago

Diieggoww commented 1 year ago

Is there an existing issue for this?

Describe the bug

WhatsApp Web crashes when sending buttons. Problem started on 07/04. before that it was working normally

Expected behavior

n

Steps to Reproduce the Bug or Issue

n

Relevant Code

n

Browser Type

Google Chrome

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

n

Additional context

n

amosayomide05 commented 1 year ago

Read other issues before submitting new issue

SattyaP commented 1 year ago

What's the solution ? , what should i do ?

amosayomide05 commented 1 year ago

What's the solution ? , what should i do ?

There is no solution right now It's being worked on

SattyaP commented 1 year ago

What's the solution ? , what should i do ?

There is no solution right now It's being worked on

thanks for information

Diieggoww commented 1 year ago

Read other issues before submitting new issue

I didn't find a similar problem. ty

danieldwipaska commented 1 year ago

Read other issues before submitting new issue

I didn't find a similar problem. ty

there are many similar issues related to buttons. please read carefully

comunik182 commented 1 year ago

Read other issues before submitting new issue

I didn't find a similar problem. ty

there are many similar issues related to buttons. please read carefully

but the problem is new, since 3 days ago

amosayomide05 commented 1 year ago

Read other issues before submitting new issue

I didn't find a similar problem. ty

there are many similar issues related to buttons. please read carefully

but the problem is new, since 3 days ago

No

Since last 2 weeks

comunik182 commented 1 year ago

got it 🤗

piroposantosdev commented 1 year ago

Whatsapp buttons depends of whatsapp API that, for now, it's only a paid service. The only way to use it is paying whatsapp API. I think it'll never be solved to whatsapp web since it's blocked from whatsapp server itself, like as send location from whatsapp web, that is not available anymore

SattyaP commented 1 year ago

I can still send the button but I need to change the body text and footer to null and it doesn't make my page crash but on a smartphone you can't see the button, I deliberately did the button feature only for the web, can I do this?

piroposantosdev commented 1 year ago

I can still send the button but I need to change the body text and footer to null

and it doesn't make my page crash but on a smartphone you can't see the button, I deliberately did the button feature only for the web, can I do this?

Actually you are not sending buttons. It was rendered only in your Whatsapp Web (puppeteer) but it will never be delivered. As a paid service, when you try to send a message with button this must be validated by server. If server doesn't be able to authenticate, this message with buttons not work. That's why you can see in your puppeteer browser but not in your mobile app

SattyaP commented 1 year ago

I can still send the button but I need to change the body text and footer to null and it doesn't make my page crash but on a smartphone you can't see the button, I deliberately did the button feature only for the web, can I do this?

Actually you are not sending buttons. It was rendered only in your Whatsapp Web (puppeteer) but it will never be delivered. As a paid service, when you try to send a message with button this must be validated by server. If server doesn't be able to authenticate, this message with buttons not work. That's why you can see in your puppeteer browser but not in your mobile app

Thanks for explaining

amosayomide05 commented 1 year ago

Try this

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

piroposantosdev commented 1 year ago

Try this

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

Wow, this package is working buttons... Tks for sharing

amiruldev20 commented 1 year ago

@amosayomide05 I can already do it, but on my friend's WhatsApp there are some that are not visible

makmortifera commented 1 year ago

Try this npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

Wow, this package is working buttons... Tks for sharing

Working?

piroposantosdev commented 1 year ago

Try this

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

Wow, this package is working buttons... Tks for sharing

Working?

For me it's working only for IOS. Android device do not receive but for my porpose it's good

wellborgmann commented 1 year ago

Tente isso npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

Uau, este pacote está funcionando botões... Obrigado por compartilhar

Try this

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

Can you send me the code for the button you are sending?

piroposantosdev commented 1 year ago

Tente isso npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

Uau, este pacote está funcionando botões... Obrigado por compartilhar

Try this npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

Can you send me the code for the button you are sending?

Sure... What i've done was replace the files from this repo npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage in node_modules/whatsapp-web.js

And use this commands:

let button = new Buttons('body', [{ body: 'Yes' }, { body: 'No' },], 'title', 'footer'); client.sendMessage(msg.from, button);

wellborgmann commented 1 year ago

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

I deleted the node_modules past and installed this repository then I tried to send this button but it didn't work, did I understand right or is it something different that should be done?

makmortifera commented 1 year ago

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

I deleted the node_modules past and installed this repository then I tried to send this button but it didn't work, did I understand right or is it something different that should be done?

That its not working, i think its working on IOS and Web only

wellborgmann commented 1 year ago

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage Apaguei os node_modules passados ​​e instalei esse repositório aí tentei mandar esse botão mas não deu certo, entendi direito ou é algo diferente que deve ser feito?

Isso não está funcionando, acho que está funcionando apenas no IOS e na Web

I think so, here it didn't work on android

piroposantosdev commented 1 year ago

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage I deleted the node_modules past and installed this repository then I tried to send this button but it didn't work, did I understand right or is it something different that should be done?

That its not working, i think its working on IOS and Web only

thats it... it is not working in android, but web whatsapp and ios works normally. Then you can check from which platform the message is sent using msg.deviceType and create buttons for ios/webapp and texts for androids

piroposantosdev commented 1 year ago

npm i https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage

I deleted the node_modules past and installed this repository then I tried to send this button but it didn't work, did I understand right or is it something different that should be done?

you should only download (zip) files from this repo https://github.com/BielPlugner/whatszap-web.js-Fix_Button_list_SendImage and replace the folder src inside whatsapp-web-js folder in node_modules

shirser121 commented 11 months ago

Buttons and lists currently not supported