mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.02k stars 796 forks source link

Error in function sendImage (Failed to decode response from marionette) #1122

Closed roigreenberg closed 2 years ago

roigreenberg commented 2 years ago

Has anyone ever had this issue? any idea how to solve it?

2022-01-05 00:41:38,485 [19] - ERROR - Error in function sendImage (Failed to decode response from marionette). Command: return WAPI.sendImage('data:video/mp4;base64,AAAAGGZ0eXBtcD QyAAAAAG1wNDJpc29tAAAAGGJlYW0BAAAAAQAAAAAAAAACAAAAAAA/521vb3YAAABsbXZoZAAAAAAAAAAAAAAAAAAArEQAE9U5AAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAA Traceback (most recent call last): File "/app/webwhatsapi/wapi_js_wrapper.py", line 144, in call return self.driver.execute_async_script(command) File "/opt/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 657, in execute_async_script return self.execute(command, { File "/opt/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/opt/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/groups_bot/init.py", line 33, in send_message_to_groups res = await send_message_to_group(g, messages, ad_id) File "/app/groups_bot/init.py", line 62, in send_message_to_group raise e File "/app/groups_bot/init.py", line 53, in send_message_to_group await send_media(ad_id, group, message, msg_text) File "/app/groups_bot/init.py", line 141, in send_media msg = await send_media_and_seen(group.driver, group, message, msg_text, tmp_path) File "/app/groups_bot/init.py", line 178, in send_media_and_seen return await driver.send_media(path, chat.id, msg_text) File "/app/webwhatsapi/async_driver.py", line 194, in send_media return await self._run_async(self._driver.send_media, path, chat_id, caption, driver=self) File "/app/webwhatsapi/async_driver.py", line 41, in _run_async return await result if isinstance(result, Awaitable) else result File "/app/webwhatsapi/init.py", line 703, in send_media result = self.wapi_functions.sendImage(imgBase64, chatid, filename, caption) File "/app/webwhatsapi/wapi_js_wrapper.py", line 157, in call raise JsException("Error in function {0} ({1}). Command: {2}".format(self.function_name, e.msg, command[:200])) webwhatsapi.wapi_js_wrapper.JsException: Error in function sendImage (Failed to decode response from marionette). Command: return WAPI.sendImage('data:video/mp4;base64,AAAAGGZ0eXBt cDQyAAAAAG1wNDJpc29tAAAAGGJlYW0BAAAAAQAAAAAAAAACAAAAAAA/521vb3YAAABsbXZoZAAAAAAAAAAAAAAAAAAArEQAE9U5AAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAA

dekkardnexus5 commented 2 years ago

Same problem here with another exception message

this error is fired when I send a mp4 file

roigreenberg commented 2 years ago

I (think I) solve my issue with raising the selenium docker memory from 2gn to 3gb..

dekkardnexus5 commented 2 years ago

It worked, Tks!