open-wa / wa-automate-python

💬 🤖 The most advanced Python whatsapp library for chatbots with advanced features. Be sure to ⭐ this repository for updates!
Other
349 stars 75 forks source link

send_message_with_auto_preview() API is not working #55

Closed manojsitapara closed 3 years ago

manojsitapara commented 4 years ago

This API was working with earlier version but it is not working now, I am getting following error

raise JsException("Error in function {0} ({1}). Command: {2}".format(self.function_name, e.msg, command))

openwa.wapi_js_wrapper.JsException: Error in function sendLinkWithAutoPreview (Timed out after 60000 ms). Command: return WAPI.pyFunc(()=>WAPI.sendLinkWithAutoPreview(

Can you please help me to resolve this issue?

Please note: g.driver.chat_send_message() API is working fine without any issue.

mrodal commented 4 years ago

It is working for me.. the error said timeout, maybe it was a network problem or the url you were trying to pass timed out?

manojsitapara commented 3 years ago

@mrodal send_message_with_auto_preview() API return true value till openwa==1.3.8 version, but in later version it always return False value and not posting messages in WhatsApp groups or any contact.

Can you please check from your end if it is working for openwa==1.3.10?

here is my code

chat_id = "1234567890@c.us" url = "https://amzn.to/35kq8hQ" text = "Hello World" res = g.driver.send_message_with_auto_preview(chat_id=chat_id, url=url, text=text)

res value is always False in latest version.

mrodal commented 3 years ago

Please follow this new issue that is the cause of the error you reported: https://github.com/open-wa/wa-automate-nodejs/issues/1118

smashah commented 3 years ago

@manojsitapara I'm also trying with your link (one plus 7t glacier blue etc..) and it is working ok for me. Are you editing wapi.js?

manojsitapara commented 3 years ago

@smashah No I have not edited wapi.js, it is same file which get downloaded from pip.

smashah commented 3 years ago

@manojsitapara can yo restart your session and try again please

manojsitapara commented 3 years ago

@smashah yes now it is working. Thank you !!