giuseppecastaldo / ha-addons

Home Assistant Whatsapp Add-on
Apache License 2.0
49 stars 18 forks source link

sending image crash #21

Closed mupsje closed 1 year ago

mupsje commented 1 year ago

after a update Hassio, Automation not working anymore. so I did a test to sent a image...... nut then the app crash when sending a picture...

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [12:49:18] INFO: Installed custom component. [2023-03-25T12:49:23.769] [INFO] default - Whatsapp Addon started. [2023-03-25T12:49:24.654] [INFO] default - remco client is ready. [2023-03-25T12:55:50.809] [ERROR] default - Error in sending message. Client ID not found. /run.sh: line 10: 86 Illegal instruction (core dumped) node index s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

mupsje commented 1 year ago

I did a test to sent

all dont work anymore :( the standard txt is working

giuseppecastaldo commented 1 year ago

Send your service call yaml body

mupsje commented 1 year ago

service: whatsapp.send_message data: clientId: remco to: 31#$##@@$@s.whatsapp.net # User ID body: image: url: "https://dummyimage.com/600x400/000/fff.png" caption: Simple text

mupsje commented 1 year ago

Also, this always worked before,

service: whatsapp.send_message data: clientId: remco to: 31%#$#%$%$@s.whatsapp.net # User ID body: text: >- {{states.sensor.toogoodtogo_big_bazar_beek_magic_box.attributes.friendly_name}} footer: >- {{states.sensor.toogoodtogo_big_bazar_beek_magic_box.attributes.price}} templateButtons:

mupsje commented 1 year ago

just installed a fresh HA with only this addon. Also not working. Maybe something is blocking like a firewall ? Because simple text and location works just fine, but when sending like a image, or a url...

when I do this

  body:
    text: Hi it's a template message
    footer: Hello World
    templateButtons:
      - index: 1
        urlButton:
          displayText: ⭐ Star Whatsapp addon on GitHub!

it does not work.. But when i remove the part from TemplateButtons

body: text: Hi it's a template message

it sents....

beats me ;)

mupsje commented 1 year ago

Still not fixed. You need to update the version of the whatsapp-web.js library.

ps, maybe it is also this problem... https://github.com/pedroslopez/whatsapp-web.js/issues/2081