Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message.reply_message() function not working #92

Open
Shyguy99 opened this issue Nov 19, 2021 · 9 comments
Open

message.reply_message() function not working #92

Shyguy99 opened this issue Nov 19, 2021 · 9 comments

Comments

@Shyguy99
Copy link

While using the reply_message() function ,it showing this error.Same with sendMessageWithMentions function

Error in function reply (javascript error: moi is not defined
JavaScript stack:
ReferenceError: moi is not defined
at Object.window.. [as getNewMessageId] (eval at executeScript (:445:16), :3:207006)
at Object.window.. [as reply] (eval at executeScript (:445:16), :3:200389)
at async Object.window.. [as pyFunc] (eval at executeScript (:445:16), :3:340428)
(Session info: headless chrome=95.0.4638.69)). Command: return WAPI.pyFunc(()=>WAPI.reply('918888817110-1623809113@g.us','hhs','true_918888817110-1623809113@g.us_F2E7178E4E10FE485063C066B67F47A2'), arguments[0])

@theTrolleyProblem
Copy link

theTrolleyProblem commented Nov 23, 2021

Getting the same error using either of the following:

  • driver.reply_message
  • message.reply_message

Exception is as follows:

raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: ReferenceError: moi is not defined
Stacktrace:
@https://web.whatsapp.com/:2:213410
@https://web.whatsapp.com/:2:206873
During handling of the above exception, another exception occurred:

openwa.wapi_js_wrapper.JsException: Error in function reply (ReferenceError: moi is not defined). Command: return WAPI.pyFunc(()=>WAPI.reply('63019323768287@g.us','logged','true_63019323768287@g.us_E1FF79D11274414F7E840FB04EC03ED5'), arguments[0])

@mrodal
Copy link
Collaborator

mrodal commented Nov 24, 2021

@smashah looks like the same issue that happened with WAPI.getMe() and you added the moi definition to the main patches.. its weird because getMe() still works, but reply fails with the same error 🤔

@smashah
Copy link
Member

smashah commented Nov 24, 2021

@mrodal @theTrolleyProblem @Shyguy99 please restart and try again

@Shyguy99
Copy link
Author

@smashah I tried again, surprisingly it worked once but after that, it gave the same error :(

@mrodal
Copy link
Collaborator

mrodal commented Nov 27, 2021

@Shyguy99 could you explain a little more about how to reproduce the error? Its working fine for me now

@Shyguy99
Copy link
Author

@mrodal Bro I don't know what's happening, after reading your comment I use a message.reply_message() dynamically from WhatsApp using some command it worked fine but then I change the code of bot replacing every driver.chat_send_message() to message.reply_message() and restart the bot. now it again causes that error. Now using the reply_message() function dynamically also gives the same error. :((
This same scenario happened yesterday also.

@mrodal
Copy link
Collaborator

mrodal commented Nov 27, 2021

I just pushed some changes, could you check again with the latest version?

@UnpopularOpinion
Copy link

I am currently experiencing this issue today, Have tried both driver.reply_message() and message.reply_message()

@mrodal
Copy link
Collaborator

mrodal commented Jun 8, 2022

@UnpopularOpinion this library is being deprecated, I suggest that you try using the new https://github.com/open-wa/wa-automate-socket-client-python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants