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

Cannot read property 'then' of undefined - Error in function sendMessage #96

Open
fire17 opened this issue Dec 6, 2021 · 2 comments
Open

Comments

@fire17
Copy link

fire17 commented Dec 6, 2021

cannot send messages
it didnt work for awhile
then it did
then stopped again
Traceback (most recent call last):


wa.chat_send_message(str(number), msg)
  File "openwaRepoGH/src/__init__.py", line 694, in chat_send_message
    result = self.wapi_functions.sendMessage(chat_id, message)
  File "openwaRepoGH/src/wapi_js_wrapper.py", line 182, in __call__
    "Error in function {0} ({1}). Command: {2}".format(self.function_name, e.msg, command))
openwaRepoGH.src.wapi_js_wrapper.JsException: Error in function sendMessage (javascript error: Cannot read property 'then' of undefined
JavaScript stack:
TypeError: Cannot read property 'then' of undefined
    at Object.window.WAPI.sendMessage (eval at executeScript (:480:16), <anonymous>:813:51)
    at eval (eval at executeAsyncScript (:556:26), <anonymous>:3:54)
    at Object.window.WAPI.pyFunc (eval at executeScript (:480:16), <anonymous>:2154:23)
    at eval (eval at executeAsyncScript (:556:26), <anonymous>:3:38)
    at eval (eval at executeAsyncScript (:556:26), <anonymous>:3:113)
    at executeAsyncScript (<anonymous>:556:47)
    at <anonymous>:571:29
    at callFunction (<anonymous>:450:22)
    at <anonymous>:464:23
    at <anonymous>:465:3
  (Session info: headless chrome=89.0.4389.72)). Command: return WAPI.pyFunc(()=>WAPI.sendMessage('[email protected]','yooooo'), arguments[0])

the main error seems to be
wapi_js_wrapper.JsException: Error in function sendMessage (javascript error: Cannot read property 'then' of undefined
please help 🙏

@fire17 fire17 changed the title Error in function sendMessage Cannot read property 'then' of undefined - Error in function sendMessage Mar 16, 2022
@fire17
Copy link
Author

fire17 commented Mar 16, 2022

still getting this error
is there a way to reload the driver properly ?
or any other suggestions ?
thank you

@karen-pal
Copy link

Hello,

I'm pretty sure this project has been abandoned, at least somewhat.

What I did was to use the mantained nodejs library: wa-automate-nodejs. Lately I've been using that and works great.

Cheers.

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

2 participants