haberda / signal-addon

Signal addon docker files
9 stars 7 forks source link

Can't send message after uipdate add-on #135

Closed dreem2001 closed 1 month ago

dreem2001 commented 1 month ago

Just updated add-on to 0.84 and can't send messages anymore. While sending a dummy message from Developer tools to services with complex names (two+ words) HA indicates successful sending but there's nothing in messenger. If service name is simple - HA returns "Unknown error" In logs:


Source: components/signal_messenger/notify.py:105
First occurred: 12:00:00 PM (18 occurrences)
Last logged: 11:16:18 PM

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 275, in _async_notify_message_service
    await self.async_send_message(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 251, in async_send_message
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/signal_messenger/notify.py", line 105, in send_message
    self._signal_cli_rest_api.send_message(
  File "/usr/local/lib/python3.12/site-packages/pysignalclirestapi/api.py", line 259, in send_message
    raise exc
  File "/usr/local/lib/python3.12/site-packages/pysignalclirestapi/api.py", line 254, in send_message
    raise SignalCliRestApiError(json_resp["error"])
pysignalclirestapi.api.SignalCliRestApiError: org.signal.libsignal.usernames.MissingSeparatorException: Username must contain a '.'```

Restore to 0.83 fixes problem. 
haberda commented 1 month ago

I can't reproduce this issue, mine works fine. What CPU architecture are you using? What mode are you operating in? I run mine on an x86 and have tried all modes. I'd also take a look at the add-on config folder, make sure nothing in there is significantly altered/deleted during the update.

In most cases when there is an issue like this it is not the add-on itself that is a problem. This add-on is just a repackage of this docker container, which itself is based on this work. Take a look at some of what I have outlined and then maybe look upstream to see if others have a similar issue.

jonathanlflatt commented 1 month ago

I also have a small issue after the update: Messages to groups are no longer working, messages to phone numbers are working as usual. Error message in automation: Invalid Signal group size (16 In the log of the add-on it just shows a 400 error. After a rollback 0.83.0 it works fine again. Hardware: x86 and signal add-on running in json-rpc mode.

dreem2001 commented 1 month ago

My problem is definitely related to https://github.com/bbernhard/signal-cli-rest-api/issues/547

dreem2001 commented 1 month ago

Finally, had time to dig into. It definitely not the problem of add-on and API, but signal_messenger component of HA Workaround is to use alias instead of phone number.

dreem2001 commented 1 month ago

https://github.com/home-assistant/core/issues/119832

haberda commented 1 month ago

Awesome, thanks for following up!