YunoHost-Apps / mautrix_signal_ynh

Matrix signal package for YunoHost
GNU Affero General Public License v3.0
4 stars 10 forks source link

mautrix signal does not bridge anymore #64

Closed rosbeef closed 1 year ago

rosbeef commented 1 year ago

Describe the bug

A clear and concise description of what the bug is.

Context

Steps to reproduce

try to use mautrix_signal

Expected behavior

working bridge

Logs

link
Signal bridge bot

Unhandled error while handling command:

12345678910111213141516Traceback (most recent call last):
  File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/bridge/commands/handler.py", line 489, in handle
    await self._run_handler(handler, evt)
  File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/bridge/commands/handler.py", line 338, in __call__
    return await self._handler(evt)
  File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix_signal/commands/auth.py", line 75, in link
    sess = await evt.bridge.signal.start_link()
  File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/signald.py", line 160, in start_link
    return LinkSession.deserialize(await self.request_v1("generate_linking_uri"))
  File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/rpc.py", line 244, in request_v1
    return await self._request(command, expected_response=command, version="v1", **data)
  File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/rpc.py", line 238, in _request
    resp_type, resp_data = await self._raw_request(command, **data)
  File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/rpc.py", line 235, in _raw_request
    return await asyncio.shield(future)
mausignald.errors.InternalError: error generating linking URI
Gredin67 commented 1 year ago

please provide the version of your bridge !sg version

rosbeef commented 1 year ago

mautrix-signal 0.3.0+dev.unknown

rosbeef commented 1 year ago

If it helps https://paste.yunohost.org/eqiyuluwoz

TiberiusRegenschein commented 1 year ago

This may be unrelated, but happened at the same time roughly 3 days ago.

I am using a ASUS NUC server X86, latest yunohost release. The trigger for not being able to bridge anymore could be the recent upgrade of synapse to 1.69.0~ynh1 . The error message in the log talks about an SSL Handshake error. This is true for all Signal contacts.

mausignald.errors.InternalError: org.whispersystems.signalservice.api.push.exceptions.PushNetworkException, javax.net.ssl.SSLHandshakeException, sun.security.validator.ValidatorException, sun.security.provider.certpath.SunCertPathBuilderException: org.whispersystems.signalservice.api.push.exceptions.PushNetworkException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target [2022-11-01 14:10:37,716] [ERROR@mau.portal.2e74729a-2f98-4258-bf0a-feab08bf21d0] Failed to handle Matrix message $n8rGBo7tGvDrbwZCoNazC-9-N0tMmcX4IGWcUka0P3Q Traceback (most recent call last): File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix_signal/portal.py", line 310, in handle_matrix_message await self._handle_matrix_message(sender, message, event_id) File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix_signal/portal.py", line 409, in _handle_matrix_message retry_count = await self._signal_send_with_retries( File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix_signal/portal.py", line 478, in _signal_send_with_retries await send_fn(sender, event_id, req_id=req_id, send_args) File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/signald.py", line 251, in send resp = await self.send_raw( File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/signald.py", line 225, in send_raw resp = await self.request_v1( File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/rpc.py", line 244, in request_v1 return await self._request(command, expected_response=command, version="v1", data) File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/rpc.py", line 238, in _request resp_type, resp_data = await self._raw_request(command, **data) File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mausignald/rpc.py", line 235, in _raw_request return await asyncio.shield(future) mausignald.errors.InternalError: org.whispersystems.signalservice.api.push.exceptions.PushNetworkException, javax.net.ssl.SSLHandshakeException, sun.security.validator.ValidatorException, sun.security.provider.certpath.SunCertPathBuilderException: org.whispersystems.signalservice.api.push.exceptions.PushNetworkException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target [2022-11-01 14:10:38,057] [INFO@aiohttp.access] 127.0.0.1 [01/Nov/2022:13:10:38 +0000] "PUT /transactions/811?access_token=Eay1IL7XQVJ4sI1hSWPe0NOoYUIZ_PoUoKN3lXxBARju7P8n0QXey8pdO8hgyhXo HTTP/1.1" 200 158 "-" "Synapse/1.69.0" [2022-11-01 14:15:16,760] [INFO@aiohttp.access] 127.0.0.1 [01/Nov/2022:13:15:16 +0000] "PUT /transactions/812?access_token=Eay1IL7XQVJ4sI1hSWPe0NOoYUIZ_PoUoKN3lXxBARju7P8n0QXey8pdO8hgyhXo HTTP/1.1" 200 158 "-" "Synapse/1.69.0" [2022-11-01 14:16:56,286] [INFO@mau.init] Everything stopped, shutting down [2022-11-01 14:17:40,161] [INFO@mau.init] Initializing mautrix-signal 0.3.0+dev.unknown [2022-11-01 14:17:40,172] [INFO@mau.init] Initialization complete in 0.31 seconds [2022-11-01 14:17:40,358] [INFO@mau.mx] Ensuring connectivity to homeserver [2022-11-01 14:17:40,392] [WARNING@mau.as.api.bot] Request #1 failed with HTTP 502, retrying in 4 seconds [2022-11-01 14:17:44,690] [INFO@mausignald] Connected to signald v0.22.1 [2022-11-01 14:17:45,742] [WARNING@mau.user.@thomas:myliberty.eu] New websocket state from signald: DISCONNECTED. Error: None [2022-11-01 14:17:45,743] [INFO@mau.init] Startup actions complete in 5.57 seconds, now running forever

rosbeef commented 1 year ago

Should it be related to #59 ?

Gredin67 commented 1 year ago

I think it's related to https://gitlab.com/signald/signald/-/issues/343 Upgrading signald to v0.23.0 should solve the issue. So upgrading the bridge should solve the issue.

Gredin67 commented 1 year ago

possible workaround (not really tested) for those who are still under Yunohost 4 (debian 10), upgrade signald without upgrading mautrix_signal :

app=mautrix_signal
source /usr/share/yunohost/helpers
ynh_install_extra_app_dependencies --repo="https://updates.signald.org unstable main" --package="libunixsocket-java signald signaldctl" --key="https://updates.signald.org/apt-signing-key.asc"
Gredin67 commented 1 year ago

solved by #63