Skip to content

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

Description

@fire17

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('XXXXXXXXXX@c.us','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 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions