mautrix / signal Goto Github PK
View Code? Open in Web Editor NEWA Matrix-Signal puppeting bridge
License: GNU Affero General Public License v3.0
A Matrix-Signal puppeting bridge
License: GNU Affero General Public License v3.0
Hi, I switched from https://github.com/matrix-hacks/matrix-puppet-signal to https://github.com/tulir/mautrix-signal and it kind of works but I have especially problems with the messages I post in other clients which don't show up in matrix. Other people write and I see their messages but only theirs, if I answer on the phone in a signal client then I can't see my answers synchronized to the matrix conversation. Any idea what I'm doing wrong?
Also I read about the Double puppeting, but I have no idea what advantage it gives me but also what the 'access token' in login-matrix <access token> is
I'm trying to set up E2E encryption from my Android Element client, when I'm inside the Settings of Signal room there is next message You don't have permission to enable encryption in this room
, is there ability to activate it?
Hi there,
i am struggling to get the package to be installed, i have followed the guide on https://docs.mau.fi/bridges/python/setup/index.html?bridge=signal and it always fails at the python-olm package.
Building wheels for collected packages: python-olm
Building wheel for python-olm (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/mautrix-signal/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vfxaekas/python-olm_fd7c1130ca914272b53e11c930ba54a4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vfxaekas/python-o
lm_fd7c1130ca914272b53e11c930ba54a4/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wh
eel-53lny1h4
cwd: /tmp/pip-install-vfxaekas/python-olm_fd7c1130ca914272b53e11c930ba54a4/
Complete output (29 lines):
make: *** No rule to make target '../include/olm/olm.h', needed by 'include/olm/olm.h'. Stop.
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/olm
copying olm/__init__.py -> build/lib.linux-x86_64-3.7/olm
copying olm/sas.py -> build/lib.linux-x86_64-3.7/olm
copying olm/__version__.py -> build/lib.linux-x86_64-3.7/olm
copying olm/session.py -> build/lib.linux-x86_64-3.7/olm
copying olm/account.py -> build/lib.linux-x86_64-3.7/olm
copying olm/_finalize.py -> build/lib.linux-x86_64-3.7/olm
copying olm/group_session.py -> build/lib.linux-x86_64-3.7/olm
copying olm/utility.py -> build/lib.linux-x86_64-3.7/olm
copying olm/pk.py -> build/lib.linux-x86_64-3.7/olm
copying olm/_compat.py -> build/lib.linux-x86_64-3.7/olm
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.7/_libolm.c'
creating build/temp.linux-x86_64-3.7
building '_libolm' extension
creating build/temp.linux-x86_64-3.7/build
creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -I/opt/mautrix-signal/include/python3.7m -c build/
temp.linux-x86_64-3.7/_libolm.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_libolm.o -I../include
build/temp.linux-x86_64-3.7/_libolm.c:570:18: fatal error: olm/olm.h: No such file or directory
#include <olm/olm.h>
^~~~~~~~~~~
I couldn't find any clue on how to solve this issue.
Thanks
Pecadis
I try to create an empty group to do test and when I create one on signal app I've got this on the log:
an 25 07:44:08 ks10 python[313097]: [2021-01-25 07:44:08,577] [ERROR@mausignald] Exception in event handler
Jan 25 07:44:08 ks10 python[313097]: Traceback (most recent call last):
Jan 25 07:44:08 ks10 python[313097]: File "/var/lib/mautrix-signal/lib/python3.9/site-packages/mausignald/signald.py", line 51, in _run_event_handler
Jan 25 07:44:08 ks10 python[313097]: await handler(event)
Jan 25 07:44:08 ks10 python[313097]: File "/var/lib/mautrix-signal/lib/python3.9/site-packages/mautrix_signal/signal.py", line 62, in on_message
Jan 25 07:44:08 ks10 python[313097]: await self.handle_message(user, sender, evt.sync_message.sent.message,
Jan 25 07:44:08 ks10 python[313097]: File "/var/lib/mautrix-signal/lib/python3.9/site-packages/mautrix_signal/signal.py", line 79, in handle_message
Jan 25 07:44:08 ks10 python[313097]: group_v2_info = await self.get_group(user.username, msg.group_v2.id,
Jan 25 07:44:08 ks10 python[313097]: File "/var/lib/mautrix-signal/lib/python3.9/site-packages/mausignald/signald.py", line 177, in get_group
Jan 25 07:44:08 ks10 python[313097]: if "id" not in resp:
Jan 25 07:44:08 ks10 python[313097]: TypeError: argument of type 'NoneType' is not iterable
This group only contains me.
The group exists on matrix.
I try to send a message from my phone, where I create the group, and it keeps sending this error.
I restart mautrix-signal, and then it works.
if I disable to autocreate_group_portal, and I restart, then I have a strange behavior:
when I send the message from matrix, it appear only on the signal desktop.
when I try to send the message from signal, it fail to delivery
when I try to send a message from the phone, it recreate the group and then now it works between phone and desktop cliean
but matrix now fail to send due to the error above.
I know that the commit mentions a possibility of breaking the profile name sync but after this 64bc5c3 the names in my instance are no longer updating.
Hey tulir,
I use a non Mobile Number and needs to call me instead of sending an SMS in register process.
This for this Nice Bridge anyway :)
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
await self._run_handler(handler, evt)
File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 290, in __call__
return await self._handler(evt)
File "/usr/lib/python3.8/site-packages/mautrix_signal/commands/auth.py", line 65, in link
account = await evt.bridge.signal.link(callback, device_name=device_name)
File "/opt/mautrix-signal/mausignald/signald.py", line 114, in link
raise make_linking_error(resp)
mausignald.errors.LinkingConflict: The user +********* already exists. Delete "/signald/data/+***********" and trying again.
Hi,
Thanks for your amazing bridges.
I have one issue I cannot understand how to fix it.
First, I don't have any errors in logs.
Here is the config file:
# Homeserver details
homeserver:
# The address that this appservice can use to connect to the homeserver.
address: https://<redacted>
# The domain of the homeserver (for MXIDs, etc).
domain: <redacted>
# Whether or not to verify the SSL certificate of the homeserver.
# Only applies if address starts with https://
verify_ssl: true
asmux: false
# Application service host/registration related details
# Changing these values requires regeneration of the registration.
appservice:
# The address that the homeserver can use to connect to this appservice.
address: http://localhost:29328
# When using https:// the TLS certificate and key files for the address.
tls_cert: false
tls_key: false
# The hostname and port where this appservice should listen.
hostname: 0.0.0.0
port: 29328
# The maximum body size of appservice API requests (from the homeserver) in mebibytes
# Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
max_body_size: 1
# The full URI to the database. Only Postgres is currently supported.
database: postgres://<redacted>
# The unique ID of this appservice.
id: signal
# Username of the appservice bot.
bot_username: signalbot
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
# to leave display name/avatar as-is.
bot_displayname: Signal Bot
bot_avatar: <redacted>
# Community ID for bridged users (changes registration file) and rooms.
# Must be created manually.
#
# Example: "+signal:example.com". Set to false to disable.
community_id: false
# Whether or not to receive ephemeral events via appservice transactions.
# Requires MSC2409 support (i.e. Synapse 1.22+).
# You should disable bridge -> sync_with_custom_puppets when this is enabled.
ephemeral_events: false
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
as_token: <redacted>
hs_token: <redacted>
# Prometheus telemetry config. Requires prometheus-client to be installed.
metrics:
enabled: false
listen_port: 8000
signal:
# Path to signald unix socket
socket_path: /var/run/signald/signald.sock
# Directory for temp files when sending files to Signal. This should be an
# absolute path that signald can read. For attachments in the other direction,
# make sure signald is configured to use an absolute path as the data directory.
outgoing_attachment_dir: /tmp
# Directory where signald stores avatars for groups.
avatar_dir: /signald/signal_data/avatars
# Directory where signald stores auth data. Used to delete data when logging out.
data_dir: /signald/signal_data/data
# Whether or not message attachments should be removed from disk after they're bridged.
remove_file_after_handling: true
# Bridge config
bridge:
# Localpart template of MXIDs for Signal users.
# {userid} is replaced with an identifier for the Signal user.
username_template: signal_{userid}
# Displayname template for Signal users.
# {displayname} is replaced with the displayname of the Signal user, which is the first
# available variable in displayname_preference. The variables in displayname_preference
# can also be used here directly.
displayname_template: '{displayname} (Signal)'
# Whether or not contact list displaynames should be used.
# Using this isn't recommended on multi-user instances.
allow_contact_list_name_updates: true
# Available variables: full_name, first_name, last_name, phone, uuid
displayname_preference:
- full_name
- phone
# Whether or not to create portals for all groups on login/connect.
autocreate_group_portal: true
# Whether or not to create portals for all contacts on login/connect.
autocreate_contact_portal: false
# Whether or not to use /sync to get read receipts and typing notifications
# when double puppeting is enabled
sync_with_custom_puppets: true
# Whether or not to update the m.direct account data event when double puppeting is enabled.
# Note that updating the m.direct event is not atomic (except with mautrix-asmux)
# and is therefore prone to race conditions.
sync_direct_chat_list: false
# Allow using double puppeting from any server with a valid client .well-known file.
double_puppet_allow_discovery: false
# Servers to allow double puppeting from, even if double_puppet_allow_discovery is false.
double_puppet_server_map:
example.com: https://example.com
# Shared secret for https://github.com/devture/matrix-synapse-shared-secret-auth
#
# If set, custom puppets will be enabled automatically for local users
# instead of users having to find an access token and run `login-matrix`
# manually.
# If using this for other servers than the bridge's server,
# you must also set the URL in the double_puppet_server_map.
login_shared_secret_map:
example.com: foo
# Whether or not created rooms should have federation enabled.
# If false, created portal rooms will never be federated.
federate_rooms: false
# End-to-bridge encryption support options. You must install the e2be optional dependency for
# this to work. See https://github.com/tulir/mautrix-telegram/wiki/End‐to‐bridge-encryption
encryption:
# Allow encryption, work in group chat rooms with e2ee enabled
allow: false
# Default to encryption, force-enable encryption in all portals the bridge creates
# This will cause the bridge bot to be in private chats for the encryption to work properly.
default: false
# Options for automatic key sharing.
key_sharing:
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow: false
# Require the requesting device to have a valid cross-signing signature?
# This doesn't require that the bridge has verified the device, only that the user has verified it.
# Not yet implemented.
require_cross_signing: false
# Require devices to be verified by the bridge?
# Verification by the bridge is not yet implemented.
require_verification: true
# Whether or not to explicitly set the avatar and room name for private
# chat portal rooms. This will be implicitly enabled if encryption.default is true.
private_chat_portal_meta: false
# Whether or not the bridge should send a read receipt from the bridge bot when a message has
# been sent to Signal. This let's you check manually whether the bridge is receiving your
# messages.
# Note that this is not related to Signal delivery receipts.
delivery_receipts: false
# Whether or not delivery errors should be reported as messages in the Matrix room. (not yet implemented)
delivery_error_reports: false
# Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
# This field will automatically be changed back to false after it,
# except if the config file is not writable.
resend_bridge_info: false
# Provisioning API part of the web server for automated portal creation and fetching information.
# Used by things like mautrix-manager (https://github.com/tulir/mautrix-manager).
provisioning:
# Whether or not the provisioning API should be enabled.
enabled: true
# The prefix to use in the provisioning API endpoints.
prefix: /_matrix/provision/v1
# The shared secret to authorize users of the API.
# Set to "generate" to generate and save a new token.
shared_secret: <redacted>
# The prefix for commands. Only required in non-management rooms.
command_prefix: '!signal'
# Permissions for using the bridge.
# Permitted values:
# user - Use the bridge with puppeting.
# admin - Use and administrate the bridge.
# Permitted keys:
# * - All Matrix users
# domain - All users on that homeserver
# mxid - Specific user
permissions:
'*': user
my.domain: user
'@user-admin:my.domain': admin
logging:
version: 1
formatters:
colored:
(): mautrix_signal.util.ColorFormatter
format: '[%(asctime)s] [%(levelname)s@%(name)s] %(message)s'
normal:
format: '[%(asctime)s] [%(levelname)s@%(name)s] %(message)s'
handlers:
file:
class: logging.handlers.RotatingFileHandler
formatter: normal
filename: ./mautrix-signal.log
maxBytes: 10485760
backupCount: 10
console:
class: logging.StreamHandler
formatter: colored
loggers:
mau:
level: DEBUG
aiohttp:
level: DEBUG
root:
level: DEBUG
handlers: [file, console]
Here is the context and setup:
Actual:
The problem is:
Now I invite @ another-user:my.domain to the room from Element.
@ another-user:my.domain join the room and send a message. The message is visible only on Element.
Expected:
Maybe I missed a configuration somewhere.
Thanks!
I've got installation with signald running as user signald, and mautrix-signal running as user mautrix-signal.
I've got issue with attachments.
When someone sends me a picture, it doesn't appear in matrix and I've got a failed to delete /var/lib/signald/attachment/xxx.
I suppose mautrix try to delete a file generated by signald.
is it possible to ask signald to delete the attachment instead of doing it directly ?
To fix the issue I run both jobs with mautrix-signal user, and ensure path are properly setup in the config file.
Also after the fix the picture is properly working. But previous try is not sync anymore.
is they a way to resync the history to get the missing/failed event?
Should I remove the attachment which failed to delete ?
The install instructions for me were not 100% clear, should I use the same database as matrix synapse or should I create a separate one.
Creating a separate one would have the advantage that it's easier to see all the tables that the bride uses.
Hello,
I have come across couple of bugs (version 0.1.0b2+dev.31c55d25). Not sure if this is a signald issue or the bridge.
I also see an error in the log,
Jan 11 21:01:06 matrix mautrix-signal[36903]: [2021-01-11 21:01:06,908] [WARNING@mausignald] No handlers for RPC request unreadable_message
Jan 11 21:01:11 matrix mautrix-signal[36903]: [2021-01-11 21:01:11,448] [ERROR@mausignald] Exception in RPC event handler
Jan 11 21:01:11 matrix mautrix-signal[36903]: Traceback (most recent call last):
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
Jan 11 21:01:11 matrix mautrix-signal[36903]: obj = attrs_type(**new_items)
Jan 11 21:01:11 matrix mautrix-signal[36903]: TypeError: __init__() missing 1 required positional argument: 'text'
Jan 11 21:01:11 matrix mautrix-signal[36903]: The above exception was the direct cause of the following exception:
Jan 11 21:01:11 matrix mautrix-signal[36903]: Traceback (most recent call last):
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mausignald/rpc.py", line 68, in _run_rpc_handler
Jan 11 21:01:11 matrix mautrix-signal[36903]: await handler(req)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mausignald/signald.py", line 58, in _parse_message
Jan 11 21:01:11 matrix mautrix-signal[36903]: event = event_class.deserialize(event_data)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 282, in deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _dict_to_attrs(cls, data)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
Jan 11 21:01:11 matrix mautrix-signal[36903]: new_items[name] = _try_deserialize(field.type, value, field.default,
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _deserialize(cls, value, default)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _deserialize(cls.__args__[0], value, default)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _dict_to_attrs(cls, value, default, default_if_empty=True)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
Jan 11 21:01:11 matrix mautrix-signal[36903]: new_items[name] = _try_deserialize(field.type, value, field.default,
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _deserialize(cls, value, default)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _deserialize(cls.__args__[0], value, default)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _dict_to_attrs(cls, value, default, default_if_empty=True)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
Jan 11 21:01:11 matrix mautrix-signal[36903]: new_items[name] = _try_deserialize(field.type, value, field.default,
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _deserialize(cls, value, default)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _dict_to_attrs(cls, value, default, default_if_empty=True)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
Jan 11 21:01:11 matrix mautrix-signal[36903]: new_items[name] = _try_deserialize(field.type, value, field.default,
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _deserialize(cls, value, default)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _deserialize(cls.__args__[0], value, default)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
Jan 11 21:01:11 matrix mautrix-signal[36903]: return _dict_to_attrs(cls, value, default, default_if_empty=True)
Jan 11 21:01:11 matrix mautrix-signal[36903]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 122, in _dict_to_attrs
Jan 11 21:01:11 matrix mautrix-signal[36903]: raise SerializerError(
Jan 11 21:01:11 matrix mautrix-signal[36903]: mautrix.types.util.serializable.SerializerError: Missing value for required key text in Quote
lines 321-375/375 (END)
I ran into the exception attached below while debugging another issue, the bridge continued to work as expected but I assume the event was dropped.
[2020-12-20 19:50:57,911] [[email protected]==] Handled Signal message 1608493857202 -> $QrN7jl24BPoCiIB66q_Lt_BjW8X4iXQKDwwwqvSRIG4
[2020-12-20 19:50:57,949] [[email protected]] 127.0.0.1 [20/Dec/2020:19:50:57 +0000] "PUT /transactions/637?access_token=<redacted> HTTP/1.1" 200 158 "-" "Synapse/1.21.2"
[2020-12-20 19:51:00,146] [ERROR@mausignald] Exception in RPC event handler
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
obj = attrs_type(**new_items)
TypeError: __init__() missing 1 required positional argument: 'expiration_start_timestamp'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/mautrix-signal/mausignald/rpc.py", line 68, in _run_rpc_handler
await handler(req)
File "/opt/mautrix-signal/mausignald/signald.py", line 58, in _parse_message
event = event_class.deserialize(event_data)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 282, in deserialize
return _dict_to_attrs(cls, data)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
new_items[name] = _try_deserialize(field.type, value, field.default,
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
return _deserialize(cls, value, default)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
return _deserialize(cls.__args__[0], value, default)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
return _dict_to_attrs(cls, value, default, default_if_empty=True)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
new_items[name] = _try_deserialize(field.type, value, field.default,
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
return _deserialize(cls, value, default)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
return _deserialize(cls.__args__[0], value, default)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
return _dict_to_attrs(cls, value, default, default_if_empty=True)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 122, in _dict_to_attrs
raise SerializerError(
mautrix.types.util.serializable.SerializerError: Missing value for required key expiration_start_timestamp in SentSyncMessage
Relaybot support would probably need to be implemented by using a normal signal account with a dedicated phone number like mautrix-whatsapp does.
Signal does not store message data on its server after messages have been passed to a device. This means that when a new device is registered, chat history is not synced.
The recommended method for transferring history is by producing an encrypted backup file from a device, transferring it and then importing it into another file.
It would be nice if the bridge could consume these files (or a set of files extracted from them) and import the history and users into Matrix.
https://github.com/pajowu/signal-backup-decode is a such a tool which can be used to extract message, user and media data from a Signal backup. I've used it on a 6GB backup and found it works as advertised. Message and user data are placed into an SQLite3 database, while media is dropped into a directory.
Looks like a PR that may change large parts of the output is currently close to merging, so I might recommend we wait before that lands before integrating it. It also means people will need access to a Rust compiler to use this tool - but I don't think this should be a blocker.
I'm getting the following error upon startup with mautrix-signal
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: [2020-12-16 00:10:12,304] [#033[31;1mERROR#033[0m@#033[32mmau.user#033[0m.#033[33m@xxx:example.com#033[0m] Failed to sync contact Address(number='+15555555555', uuid=UUID('[redacted]'))
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: Traceback (most recent call last):
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: File "/home/matrix-synapse/synapse/appservice/mautrix-signal/.venv/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: obj = attrs_type(**new_items)
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: TypeError: __init__() missing 1 required positional argument: 'name'
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: The above exception was the direct cause of the following exception:
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: Traceback (most recent call last):
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: File "/home/matrix-synapse/synapse/appservice/mautrix-signal/mautrix_signal/user.py", line 149, in _sync
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: await self._sync_contact(contact, create_contact_portal)
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: File "/home/matrix-synapse/synapse/appservice/mautrix-signal/mautrix_signal/user.py", line 117, in _sync_contact
Dec 16 00:10:12 matrix matrix-puppet-signal[7701]: profile = await self.bridge.signal.get_profile(self.username, contact.address)
I queried signald directly and it does return a profile without a username. Is there any way to handle this without throwing the error given that I cannot control if a contact has a username or not.
Query
{"id": "[redacted]", "type": "get_profile", "username": "+15555555555", "recipientAddress": {"number": "+15555555555", "uuid": "[redacted]"}}
Response
{"id":"[redacted]","type":"profile","data":{"avatar":"profiles/6sqWm3ddnOtfEl66qwN-Kw","identity_key":"Bdnmjoa3hqHxoadL9X1jNaTCFxKjgXEK03GaYqcQYd01","unidentified_access":"y7umzyJKQlTIXPpLlLx5wPdMPvoXb3BdUGiRpP/E0l0=","unrestricted_unidentified_access":false,"capabilities":{"gv2":false,"storage":false,"gv1-migration":false},"address":{"number":"+15555555555","uuid":"[redacted]"}}}
Additionally, How can you force the bridge to update profile displaynames? It seems I always need to update displaynames manually.
After clean-confirm
for some rooms:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
await self._run_handler(handler, evt)
File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/clean_rooms.py", line 184, in execute_room_cleanup
await BasePortal.cleanup_room(evt.az.intent, room, "Room deleted")
File "/usr/lib/python3.8/site-packages/mautrix/bridge/portal.py", line 111, in cleanup_room
puppet = await cls.bridge.get_puppet(user_id, create=False)
AttributeError: type object 'BasePortal' has no attribute 'bridge'
I get the following error when running sync --profiles
bridge log
Jan 30 14:00:01 matrix mautrix-signal[3599]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mausignald/rpc.py", line 195, in _raw_request
Jan 30 14:00:01 matrix mautrix-signal[3599]: resp_type, resp_data = await self._raw_request(command, **data)
Jan 30 14:00:01 matrix mautrix-signal[3599]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mausignald/rpc.py", line 198, in request
Jan 30 14:00:01 matrix mautrix-signal[3599]: resp = await self.request("get_profile", "profile", username=username,
Jan 30 14:00:01 matrix mautrix-signal[3599]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mausignald/signald.py", line 183, in get_profile
Jan 30 14:00:01 matrix mautrix-signal[3599]: profile = await self.bridge.signal.get_profile(self.username, contact.address)
Jan 30 14:00:01 matrix mautrix-signal[3599]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix_signal/user.py", line 144, in _sync_contact
Jan 30 14:00:01 matrix mautrix-signal[3599]: await self._sync_contact(contact, create_contact_portal,
Jan 30 14:00:01 matrix mautrix-signal[3599]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix_signal/user.py", line 178, in _sync_contacts
Jan 30 14:00:01 matrix mautrix-signal[3599]: Traceback (most recent call last):
Jan 30 14:00:01 matrix mautrix-signal[3599]: [2021-01-30 14:00:01,027] Failed to sync contact Address(number='+1xxxxxx', uuid=UUID('6c5a0556-9080-47aa-addd-a0f2a34d454e'))
Jan 30 13:59:59 matrix mautrix-signal[3599]: mausignald.errors.UnexpectedError: Unexpected error with no message
signald log
Jan 30 13:59:49 matrix signald[3361]: java.lang.NullPointerException: null
Jan 30 13:59:49 matrix signald[3361]: at io.finn.signald.storage.ProfileCredentialStore.update(ProfileCredentialStore.java:80) ~[signald.jar:unspecified]
Jan 30 13:59:49 matrix signald[3361]: at io.finn.signald.actions.RefreshProfileAction.run(RefreshProfileAction.java:70) ~[signald.jar:unspecified]
Jan 30 13:59:49 matrix signald[3361]: at io.finn.signald.Manager.getRecipientProfileKeyCredential(Manager.java:1564) ~[signald.jar:unspecified]
Jan 30 13:59:49 matrix signald[3361]: at io.finn.signald.SocketHandler.getProfile(SocketHandler.java:671) ~[signald.jar:unspecified]
Jan 30 13:59:49 matrix signald[3361]: at io.finn.signald.SocketHandler.handleRequest(SocketHandler.java:240) [signald.jar:unspecified]
Jan 30 13:59:49 matrix signald[3361]: at io.finn.signald.SocketHandler.run(SocketHandler.java:134) [signald.jar:unspecified]
Jan 30 13:59:49 matrix signald[3361]: at java.lang.Thread.run(Thread.java:834) [?:?]
Jan 30 13:59:50 matrix signald[3361]: 13:59:50.578 [socketlistener] ERROR io.finn.signald.SocketHandler - Catching
# apt info signald
Package: signald
Version: 0.12.0
Priority: optional
Section: java
Bridge version, mautrix-signal 0.1.0b2+dev.3852c137
With the latest docker image I get this error message when I or another person texts:
signal | [2021-02-07 12:39:32,868] [ERROR@mausignald] Exception in event handler
signal | Traceback (most recent call last):
signal | File "/opt/mautrix-signal/mausignald/signald.py", line 52, in _run_event_handler
signal | await handler(event)
signal | File "/usr/lib/python3.8/site-packages/mautrix_signal/signal.py", line 50, in on_message
signal | await self.handle_message(user, sender, evt.data_message)
signal | File "/usr/lib/python3.8/site-packages/mautrix_signal/signal.py", line 87, in handle_message
signal | portal = await po.Portal.get_by_chat_id(addr_override or sender.address,
signal | File "/usr/lib/python3.8/site-packages/mautrix/bridge/async_getter_lock.py", line 14, in wrapper
signal | return await fn(cls, *args, **kwargs)
signal | File "/usr/lib/python3.8/site-packages/mautrix_signal/portal.py", line 969, in get_by_chat_id
signal | await portal.insert()
signal | File "/usr/lib/python3.8/site-packages/mautrix_signal/db/portal.py", line 54, in insert
signal | await self.db.execute(q, self.chat_id_str, self.receiver, self.mxid, self.name,
signal | File "/usr/lib/python3.8/site-packages/mautrix/util/async_db/database.py", line 76, in execute
signal | return await conn.execute(query, *args, timeout=timeout)
signal | File "/usr/lib/python3.8/site-packages/asyncpg/connection.py", line 297, in execute
signal | _, status, _ = await self._execute(query, args, 0, timeout, True)
signal | File "/usr/lib/python3.8/site-packages/asyncpg/connection.py", line 1445, in _execute
signal | result, _ = await self.__execute(
signal | File "/usr/lib/python3.8/site-packages/asyncpg/connection.py", line 1454, in __execute
signal | return await self._do_execute(query, executor, timeout)
signal | File "/usr/lib/python3.8/site-packages/asyncpg/connection.py", line 1476, in _do_execute
signal | result = await executor(stmt, None)
signal | File "asyncpg/protocol/protocol.pyx", line 178, in bind_execute
signal | File "asyncpg/protocol/prepared_stmt.pyx", line 120, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg
signal | asyncpg.exceptions._base.InterfaceError: the server expects 10 arguments for this query, 7 were passed
signal | HINT: Check the query against the passed list of arguments.
No portal is created for the chat regardless of who wrote the text.
Hi
I'm trying to link the matrix bridge with my signal account but it raise an mausignald.errors.UnexpectedError: Could not initialize class org.signal.zkgroup.internal.Native
My primary device is a linux laptop that i registered with signal-cli
Here is the step i followed :
link
in the bridge bot chatsignal-cli -u PHONE_NUMBER addDevice --uri DATA_FROM_QRCODE
the command is executed without errorafter that the bot send me the message Unhandled error while handling command: with the following trace stack :
Traceback (most recent call last):
File "/opt/synapse/mautrix-signal/lib/python3.7/site-packages/mautrix/bridge/commands/handler.py", line 399, in handle
await self._run_handler(handler, evt)
File "/opt/synapse/mautrix-signal/lib/python3.7/site-packages/mautrix/bridge/commands/handler.py", line 286, in __call__
return await self._handler(evt)
File "/opt/synapse/mautrix-signal/lib/python3.7/site-packages/mautrix_signal/commands/auth.py", line 58, in link
account = await evt.bridge.signal.link(callback, device_name=device_name)
File "/opt/synapse/mautrix-signal/lib/python3.7/site-packages/mausignald/signald.py", line 76, in link
resp_type, resp = await self._wait_response(req_id)
mausignald.errors.UnexpectedError: Could not initialize class org.signal.zkgroup.internal.Native
Is it a bug from the bridge or is it a problem with the way i use to link to my account ?
Thanks for your work !
Is it possible to link 2 signal accounts to 1 matrix account ?
(So I have both work and private account linked to matrix) ?
I found that if I am messaging a user which also is using the signalbot that they "leave the room" and I cannot get messages through to them. (Although I can receive messages).
Additionally if I try to recreate a room (or private messages) via the signal bot I get the following:
reggiemarr
pm [phone number]
Signal bridge bot
You already have a private chat with [phone number] (Signal): !CjMNvQkJloeraNWxgf:bridge.monster
Unhandled error while handling command. Check logs for more details (ref: 1611502792).
When I go to check the logs I find the following:
root@localhost:~# journalctl -fu matrix-mautrix-signal
-- Logs begin at Sat 2021-01-23 16:58:56 UTC. --
Jan 24 16:53:57 localhost matrix-mautrix-signal[12611]: resp = await self.request("register", "verification_required", username=phone,
Jan 24 16:53:57 localhost matrix-mautrix-signal[12611]: File "/opt/mautrix-signal/mausignald/rpc.py", line 198, in request
Jan 24 16:53:57 localhost matrix-mautrix-signal[12611]: resp_type, resp_data = await self._raw_request(command, **data)
Jan 24 16:53:57 localhost matrix-mautrix-signal[12611]: File "/opt/mautrix-signal/mausignald/rpc.py", line 195, in _raw_request
Jan 24 16:53:57 localhost matrix-mautrix-signal[12611]: return await future
Jan 24 16:53:57 localhost matrix-mautrix-signal[12611]: mausignald.errors.UnexpectedError: Bad response: 400
Jan 24 16:53:57 localhost matrix-mautrix-signal[12611]: [2021-01-24 16:53:57,876] [[email protected]] 172.18.0.4 [24/Jan/2021:16:53:57 +0000] "PUT /transactions/233?access_token=9c30f6b3-d0a7-541c-a6a2-e48dd2762827 HTTP/1.1" 200 158 "-" "Synapse/1.25.0"
Jan 24 16:54:32 localhost matrix-mautrix-signal[12611]: [2021-01-24 16:54:32,512] [[email protected]] Received Matrix event $ynHpaXTlD-mJPAxaECBfQ64liGff9TJqAuNoAiz0cqM from @reggiemarr:bridge.monster in !gdxCwyEIgQzISNPftq:bridge.monster
Jan 24 16:54:32 localhost matrix-mautrix-signal[12611]: [2021-01-24 16:54:32,513] [[email protected]] 172.18.0.4 [24/Jan/2021:16:54:32 +0000] "PUT /transactions/234?access_token=9c30f6b3-d0a7-541c-a6a2-e48dd2762827 HTTP/1.1" 200 158 "-" "Synapse/1.25.0"
Jan 24 16:54:32 localhost matrix-mautrix-signal[12611]: [2021-01-24 16:54:32,612] [[email protected]] 172.18.0.4 [24/Jan/2021:16:54:32 +0000] "PUT /transactions/235?access_token=9c30f6b3-d0a7-541c-a6a2-e48dd2762827 HTTP/1.1" 200 158 "-" "Synapse/1.25.0"
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: [2021-01-24 17:00:08,391] [[email protected]] Received Matrix event $3BMeyBMwJoaEJXvI0LRYexH0SBMxKRuVRp1PAZXObLQ from @reggiemarr:bridge.monster in !gdxCwyEIgQzISNPftq:bridge.monster
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: [2021-01-24 17:00:08,393] [[email protected]] 172.18.0.4 [24/Jan/2021:17:00:08 +0000] "PUT /transactions/236?access_token=9c30f6b3-d0a7-541c-a6a2-e48dd2762827 HTTP/1.1" 200 158 "-" "Synapse/1.25.0"
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: [2021-01-24 17:00:08,880] [[email protected]] 172.18.0.4 [24/Jan/2021:17:00:08 +0000] "PUT /transactions/237?access_token=9c30f6b3-d0a7-541c-a6a2-e48dd2762827 HTTP/1.1" 200 158 "-" "Synapse/1.25.0"
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: [2021-01-24 17:00:08,900] [[email protected]] Unhandled error while handling command pm [phone number] from @reggiemarr:bridge.monster (ref: 1611502792)
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: Traceback (most recent call last):
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 329, in ensure_joined
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: await self.join_room(room_id, max_retries=0)
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 83, in wrapper
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: return await __method(*args, **kwargs)
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/client/api/rooms.py", line 252, in join_roomJan 24 17:00:08 localhost matrix-mautrix-signal[12611]: content = await self.api.request(Method.POST, Path.join[room_id_or_alias],
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/api.py", line 233, in request
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: return await self._send(method, full_url, content, query_params, headers or {})
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/api.py", line 158, in _send
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: raise make_request_error(http_status=response.status,
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: mautrix.errors.request.MUnknown: No known servers
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: The above exception was the direct cause of the following exception:
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: Traceback (most recent call last):
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: await self._run_handler(handler, evt)
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 290, in __call__
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: return await self._handler(evt)
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix_signal/commands/signal.py", line 75, in pm
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: await portal.main_intent.invite_user(portal.mxid, evt.sender.mxid)
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 94, in wrapper
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: await __self.ensure_joined(room_id)
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 351, in ensure_joined
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: raise IntentError(f"Failed to join room {room_id} as {self.mxid}") from e
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: mautrix.errors.base.IntentError: Failed to join room !CjMNvQkJloeraNWxgf:bridge.monster as @signal_4ac31767-acc8-4219-829c-249b7a1c6587:bridge.monster
Jan 24 17:00:08 localhost matrix-mautrix-signal[12611]: [2021-01-24 17:00:08,984] [[email protected]] 172.18.0.4 [24/Jan/2021:17:00:08 +0000] "PUT /transactions/238?access_token=9c30f6b3-d0a7-541c-a6a2-e48dd2762827 HTTP/1.1" 200 158 "-" "Synapse/1.25.0"
I tried looking around commands/signal.py saw there were some recent changes to contact synchronization and such. Anything of note that I could test out ? Or is this something that's expected as things are changing around?
Also I've setup my server using the ansible docker playbook if that matters.
I'm trying to build this according to the bridge setup docs, but perhaps I've borked my environment? Here's what I see:
$ pip install --upgrade https://github.com/tulir/mautrix-signal/tarball/master#egg=mautrix-signal[all]
Collecting mautrix-signal[all]
Using cached https://github.com/tulir/mautrix-signal/tarball/master
Collecting ruamel.yaml<0.17,>=0.15.35
Using cached ruamel.yaml-0.16.12-py2.py3-none-any.whl (111 kB)
Collecting python-magic<0.5,>=0.4
Using cached python_magic-0.4.18-py2.py3-none-any.whl (8.6 kB)
Collecting commonmark<0.10,>=0.8
Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Collecting aiohttp<4,>=3
Using cached aiohttp-3.7.2-cp37-cp37m-manylinux2014_x86_64.whl (1.3 MB)
Collecting yarl<2,>=1
Downloading yarl-1.6.3-cp37-cp37m-manylinux2014_x86_64.whl (294 kB)
|████████████████████████████████| 294 kB 1.6 MB/s
Collecting attrs>=19.1
Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting mautrix==0.8.0rc4
Using cached mautrix-0.8.0rc4-py3-none-any.whl (219 kB)
Collecting asyncpg<0.22,>=0.20
Using cached asyncpg-0.21.0-cp37-cp37m-manylinux1_x86_64.whl (2.7 MB)
Collecting python-olm<4,>=3
Using cached python-olm-3.1.3.tar.gz (27 kB)
Collecting phonenumbers<9,>=8
Using cached phonenumbers-8.12.13-py2.py3-none-any.whl (2.6 MB)
Collecting Pillow<8,>=4
Using cached Pillow-7.2.0-cp37-cp37m-manylinux1_x86_64.whl (2.2 MB)
Collecting pycryptodome<4,>=3
Using cached pycryptodome-3.9.9-cp37-cp37m-manylinux1_x86_64.whl (13.7 MB)
Collecting prometheus_client<0.9,>=0.6
Using cached prometheus_client-0.8.0-py2.py3-none-any.whl (53 kB)
Collecting qrcode<7,>=6
Using cached qrcode-6.1-py2.py3-none-any.whl (31 kB)
Collecting unpaddedbase64<2,>=1
Using cached unpaddedbase64-1.1.0-py2.py3-none-any.whl (3.3 kB)
Collecting ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.9"
Using cached ruamel.yaml.clib-0.2.2-cp37-cp37m-manylinux1_x86_64.whl (547 kB)
Collecting async-timeout<4.0,>=3.0
Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting typing-extensions>=3.6.5
Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting multidict<7.0,>=4.5
Downloading multidict-5.0.2-cp37-cp37m-manylinux2014_x86_64.whl (142 kB)
|████████████████████████████████| 142 kB 2.2 MB/s
Collecting chardet<4.0,>=2.0
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna>=2.0
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting cffi>=1.0.0
Using cached cffi-1.14.3-cp37-cp37m-manylinux1_x86_64.whl (401 kB)
Processing /home/toby/.cache/pip/wheels/56/b0/fe/4410d17b32f1f0c3cf54cdfb2bc04d7b4b8f4ae377e2229ba0/future-0.18.2-py3-none-any.whl
Collecting six
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: mautrix-signal, python-olm
Building wheel for mautrix-signal (setup.py) ... done
Created wheel for mautrix-signal: filename=mautrix_signal-0.1.0b2+dev.unknown-py3-none-any.whl size=70004 sha256=68dfee5c1ba35c2f153636712edba831d2cba4dcf1e79b5410159caff6d7cd87
Stored in directory: /tmp/pip-ephem-wheel-cache-n97ur16y/wheels/0b/20/46/8ed37f67ae01472daaddea2d21820d9d81ebad9c7bf6d87a43
Building wheel for python-olm (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/toby/mautrix-signal-virtualenv-2/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ekd881k/python-olm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8ekd881k/python-olm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-hd2x9s90
cwd: /tmp/pip-install-8ekd881k/python-olm/
Complete output (29 lines):
make: *** No rule to make target '../include/olm/olm.h', needed by 'include/olm/olm.h'. Stop.
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/olm
copying olm/session.py -> build/lib.linux-x86_64-3.7/olm
copying olm/_finalize.py -> build/lib.linux-x86_64-3.7/olm
copying olm/__version__.py -> build/lib.linux-x86_64-3.7/olm
copying olm/pk.py -> build/lib.linux-x86_64-3.7/olm
copying olm/utility.py -> build/lib.linux-x86_64-3.7/olm
copying olm/sas.py -> build/lib.linux-x86_64-3.7/olm
copying olm/account.py -> build/lib.linux-x86_64-3.7/olm
copying olm/__init__.py -> build/lib.linux-x86_64-3.7/olm
copying olm/group_session.py -> build/lib.linux-x86_64-3.7/olm
copying olm/_compat.py -> build/lib.linux-x86_64-3.7/olm
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.7/_libolm.c'
creating build/temp.linux-x86_64-3.7
building '_libolm' extension
creating build/temp.linux-x86_64-3.7/build
creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -I/home/toby/mautrix-signal-virtualenv-2/include/python3.7m -c build/temp.linux-x86_64-3.7/_libolm.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_libolm.o -I../include
build/temp.linux-x86_64-3.7/_libolm.c:573:18: fatal error: olm/pk.h: No such file or directory
#include <olm/pk.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for python-olm
Running setup.py clean for python-olm
Successfully built mautrix-signal
Failed to build python-olm
Installing collected packages: ruamel.yaml.clib, ruamel.yaml, python-magic, commonmark, typing-extensions, multidict, idna, yarl, async-timeout, attrs, chardet, aiohttp, mautrix, asyncpg, pycparser, cffi, future, python-olm, phonenumbers, Pillow, pycryptodome, prometheus-client, six, qrcode, unpaddedbase64, mautrix-signal
Running setup.py install for python-olm ... error
ERROR: Command errored out with exit status 1:
command: /home/toby/mautrix-signal-virtualenv-2/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ekd881k/python-olm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8ekd881k/python-olm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rcyp88ny/install-record.txt --single-version-externally-managed --compile --install-headers /home/toby/mautrix-signal-virtualenv-2/include/site/python3.7/python-olm
cwd: /tmp/pip-install-8ekd881k/python-olm/
Complete output (29 lines):
make: *** No rule to make target '../include/olm/olm.h', needed by 'include/olm/olm.h'. Stop.
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/olm
copying olm/session.py -> build/lib.linux-x86_64-3.7/olm
copying olm/_finalize.py -> build/lib.linux-x86_64-3.7/olm
copying olm/__version__.py -> build/lib.linux-x86_64-3.7/olm
copying olm/pk.py -> build/lib.linux-x86_64-3.7/olm
copying olm/utility.py -> build/lib.linux-x86_64-3.7/olm
copying olm/sas.py -> build/lib.linux-x86_64-3.7/olm
copying olm/account.py -> build/lib.linux-x86_64-3.7/olm
copying olm/__init__.py -> build/lib.linux-x86_64-3.7/olm
copying olm/group_session.py -> build/lib.linux-x86_64-3.7/olm
copying olm/_compat.py -> build/lib.linux-x86_64-3.7/olm
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.7/_libolm.c'
creating build/temp.linux-x86_64-3.7
building '_libolm' extension
creating build/temp.linux-x86_64-3.7/build
creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -I/home/toby/mautrix-signal-virtualenv-2/include/python3.7m -c build/temp.linux-x86_64-3.7/_libolm.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_libolm.o -I../include
build/temp.linux-x86_64-3.7/_libolm.c:573:18: fatal error: olm/pk.h: No such file or directory
#include <olm/pk.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/toby/mautrix-signal-virtualenv-2/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8ekd881k/python-olm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8ekd881k/python-olm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rcyp88ny/install-record.txt --single-version-externally-managed --compile --install-headers /home/toby/mautrix-signal-virtualenv-2/include/site/python3.7/python-olm Check the logs for full command output.
Any guesses?
Using Ubuntu 18.04.5, python 3.7.5, python3.7-dev 3.7.5-2~18.04
The bridge should probably give a nice error message when encountering signal rate limits on register. Currently it prints the following traceback:
Traceback (most recent call last):
File "/opt/mautrix-signal/lib/python3.7/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
await self._run_handler(handler, evt)
File "/opt/mautrix-signal/lib/python3.7/site-packages/mautrix/bridge/commands/handler.py", line 290, in __call__
return await self._handler(evt)
File "/opt/mautrix-signal/lib/python3.7/site-packages/mautrix_signal/commands/auth.py", line 80, in register
username = await evt.bridge.signal.register(phone)
File "/opt/mautrix-signal/lib/python3.7/site-packages/mausignald/signald.py", line 94, in register
voice=voice, captcha=captcha)
File "/opt/mautrix-signal/lib/python3.7/site-packages/mausignald/rpc.py", line 157, in request
resp_type, resp_data = await self._raw_request(command, **data)
File "/opt/mautrix-signal/lib/python3.7/site-packages/mausignald/rpc.py", line 154, in _raw_request
return await future
mausignald.errors.UnexpectedError: Rate limit exceeded: 413
This can be triggered by trying to register with the same phone number ~5 times.
I have a mautrix-signal 0.1.0b2+dev.unknown (installed with pip from this repos master into a venv) instance with signald 0.10.0+git2020-12-10r09ed90b0.59 (from https://updates.signald.org) and matrix-synapse-py3 1.24.0+buster1 (from https://packages.matrix.org/debian) on Debian GNU/Linux 10.
This setup (with older versions) used to able to send and receive messages. Sending message still works fine.
When receiving a message, no message shows up on the matrix side and the following is logged:
[2020-12-10 20:49:51,081] [ERROR@mausignald] Exception in RPC event handler
Traceback (most recent call last):
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
obj = attrs_type(**new_items)
TypeError: __init__() missing 1 required positional argument: 'source_device'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mausignald/rpc.py", line 68, in _run_rpc_handler
await handler(req)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mausignald/signald.py", line 58, in _parse_message
event = event_class.deserialize(event_data)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 282, in deserialize
return _dict_to_attrs(cls, data)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 123, in _dict_to_attrs
f"Missing value for required key {field.name} in {attrs_type.__name__}") from e
mautrix.types.util.serializable.SerializerError: Missing value for required key timestamp_iso in Message
[2020-12-10 20:49:52,519] [ERROR@mausignald] Exception in RPC event handler
Traceback (most recent call last):
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
obj = attrs_type(**new_items)
TypeError: __init__() missing 1 required positional argument: 'source_device'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mausignald/rpc.py", line 68, in _run_rpc_handler
await handler(req)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mausignald/signald.py", line 58, in _parse_message
event = event_class.deserialize(event_data)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 282, in deserialize
return _dict_to_attrs(cls, data)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 123, in _dict_to_attrs
f"Missing value for required key {field.name} in {attrs_type.__name__}") from e
mautrix.types.util.serializable.SerializerError: Missing value for required key timestamp_iso in Message
[2020-12-10 20:49:56,550] [ERROR@mausignald] Exception in RPC event handler
Traceback (most recent call last):
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
obj = attrs_type(**new_items)
TypeError: __init__() missing 3 required positional arguments: 'server_timestamp', 'has_content', and 'is_unidentified_sender'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mausignald/rpc.py", line 68, in _run_rpc_handler
await handler(req)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mausignald/signald.py", line 58, in _parse_message
event = event_class.deserialize(event_data)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 282, in deserialize
return _dict_to_attrs(cls, data)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 123, in _dict_to_attrs
f"Missing value for required key {field.name} in {attrs_type.__name__}") from e
mautrix.types.util.serializable.SerializerError: Missing value for required key timestamp_iso in Message
[2020-12-10 20:49:57,087] [ERROR@mausignald] Exception in RPC event handler
Traceback (most recent call last):
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
obj = attrs_type(**new_items)
TypeError: __init__() missing 1 required positional argument: 'source_device'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mausignald/rpc.py", line 68, in _run_rpc_handler
await handler(req)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mausignald/signald.py", line 58, in _parse_message
event = event_class.deserialize(event_data)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 282, in deserialize
return _dict_to_attrs(cls, data)
File "/opt/matrix-service/mautrix-signal/lib/python3.7/site-packages/mautrix/types/util/serializable_attrs.py", line 123, in _dict_to_attrs
f"Missing value for required key {field.name} in {attrs_type.__name__}") from e
mautrix.types.util.serializable.SerializerError: Missing value for required key timestamp_iso in Message
signald does not log any errors:
Dec 10 20:27:50 agon.one signald[24096]: 20:27:50.829 [main] INFO io.finn.signald.Main - Binding to socket /var/run/signald/signald.sock
Dec 10 20:27:50 agon.one signald[24096]: 20:27:50.914 [main] INFO io.finn.signald.Main - Started signald 0.10.0+git2020-12-10r09ed90b0.59
Dec 10 20:28:14 agon.one signald[24096]: 20:28:14.863 [socketlistener] INFO io.finn.signald.SocketHandler - Client connected
Dec 10 20:28:15 agon.one signald[24096]: 20:28:15.192 [socketlistener] INFO manager-************97 - Creating new manager for ************97 (stored at /var/lib/signald)
Dec 10 20:28:19 agon.one signald[24096]: 20:28:19.680 [socketlistener] INFO manager - Created a manager for ************97
I was able to consistently reproduce this issue with similar error messages every time. I have only a single room bridged to Signal, so this might be specific to this chat (though I have no specific reason to believe it is).
sorry if its maybe a dumb question, but can I bridge a existing room to a existing or new group in signal?
Periodically while running mautrix-signal I get into a state where likely an event results in something unexpected and it hangs the process resulting in chat messages no longer being processed in either direction.
[2020-12-19 05:46:13,540] [[email protected]] 127.0.0.1 [19/Dec/2020:05:46:13 +0000] "PUT /transactions/354?access_token=<redacted> HTTP/1.1" 200 158 "-" "Synapse/1.21.2"
[2020-12-19 05:46:14,257] [[email protected]/+iWXyUgafvbitfb18Uk=] Handled Matrix message $pjX-_STQkNdsfadfp4cBqk2rt4ydTm8sC_KfA6w8eXbLtpctA -> 1608356773537
[2020-12-19 05:47:22,651] [DEBUG@mausignald] Reader disconnected
[2020-12-19 05:47:40,060] [[email protected]] Interrupt received, stopping...
[2020-12-19 05:47:40,061] [[email protected]] Stopping appservice web server
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.8/site-packages/mautrix_signal/__main__.py", line 107, in <module>
SignalBridge().run()
File "/usr/lib/python3.8/site-packages/mautrix/util/program.py", line 84, in run
self._run()
File "/usr/lib/python3.8/site-packages/mautrix/util/program.py", line 203, in _run
self.loop.run_until_complete(self.stop())
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/lib/python3.8/site-packages/mautrix/bridge/bridge.py", line 156, in stop
await super().stop()
File "/usr/lib/python3.8/site-packages/mautrix/util/program.py", line 228, in stop
await asyncio.gather(*(self.shutdown_actions or []))
File "/usr/lib/python3.8/site-packages/mautrix_signal/signal.py", line 145, in stop
await self.disconnect()
File "/opt/mautrix-signal/mausignald/rpc.py", line 48, in disconnect
self._writer.write_eof()
AttributeError: 'NoneType' object has no attribute 'write_eof'
I am running the latest mautrix-signal container as of yesterday where in the container it has this version of the python module:
mautrix_signal-0.1.0b2+dev.29a5f91b.dist-info/.
Ideally at the very least when we run into this condition it wouldn't hang the process.
Let me know what other information I can provide and If I find out more i'll update the bug accordingly.
Thank you for mautrix-signal as well as the other ones it is much appreciated.
If signald gets restarted while mautrix-signal is running, the bridge breaks until mautrix-signal is restarted. Any messages sent from the Matrix while the bridge is broken seem to get lost forever.
[2020-12-02 16:19:37,171] [DEBUG@mausignald] Reader disconnected
[2020-12-02 16:19:52,389] [[email protected]] Received Matrix event <redacted>
[2020-12-02 16:19:52,402] [[email protected]] Exception in Matrix event handler
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/appservice/as_handler.py", line 178, in try_handle
await handler_func(event)
File "/usr/lib/python3.8/site-packages/mautrix/bridge/matrix.py", line 441, in int_handle_event
await self.handle_encrypted(evt)
File "/usr/lib/python3.8/site-packages/mautrix/bridge/matrix.py", line 361, in handle_encrypted
await self.int_handle_event(decrypted)
File "/usr/lib/python3.8/site-packages/mautrix/bridge/matrix.py", line 439, in int_handle_event
await self.handle_message(evt.room_id, evt.sender, evt.content, evt.event_id)
File "/usr/lib/python3.8/site-packages/mautrix/bridge/matrix.py", line 282, in handle_message
await portal.handle_matrix_message(sender, message, event_id)
File "/usr/lib/python3.8/site-packages/mautrix_signal/portal.py", line 193, in handle_matrix_message
await self.signal.send(username=sender.username, recipient=self.chat_id, body=text,
File "/opt/mautrix-signal/mausignald/signald.py", line 134, in send
await self.request("send", "send_results", username=username, messageBody=body,
File "/opt/mautrix-signal/mausignald/rpc.py", line 157, in request
resp_type, resp_data = await self._raw_request(command, **data)
File "/opt/mautrix-signal/mausignald/rpc.py", line 153, in _raw_request
await self._send_request(data)
File "/opt/mautrix-signal/mausignald/rpc.py", line 145, in _send_request
self._writer.write(json.dumps(data).encode("utf-8"))
AttributeError: 'NoneType' object has no attribute 'write'
It looks like SignaldRPCClient
is missing reconnection logic when the read loop terminates.
When other Signal (Android - v5.0.8) users try to add the bridged user to a group chat, they get a response, that "The signal app of the added user does not support the newest version of group conversations and has to be updated".
This happens as long as the the bridge is a linked device. When the bridge is unlinked, other users can again add you to the group chat. The same behavior also happens if the bridge is the primary registered device.
Hi,
I have followed https://github.com/spantaleev/matrix-docker-ansible-deploy and deployed the Signal and Telegram bridges.
Everything works as expected, except E2BE.
I have created an issue on the repo spantaleev/matrix-docker-ansible-deploy#806 but I guess it's more relevant for the issue to be here.
Here's the detail of the error I have :
In short, when I set the allow
and default
booleans, I get the above error.
bridge:
encryption:
allow: true
default: true
The playbooks use dock.mau.dev/tulir/mautrix-signal:latest
for the image — could it be that this image does not have the optional e2be plugin installed ?
I don't really know how to look to debug this
Thanks a lot for your time !
Best
What happened: In one of my signal groups, a contact left the group. The portal room remained unchanged.
Expected behavior: The signal bot removes the leaving contact's mx puppet from the portal room.
Daemon's logs:
Nov 05 20:32:46 majestix matrix-mautrix-signal-daemon[8055]: 20:32:46.116 [OkHttp https://textsecure-service.whispersystems.org/...] DEBUG io.finn.signald.ProtocolLogger - [WebSocketConnection] onMessage() -- incoming request
Nov 05 20:32:46 majestix matrix-mautrix-signal-daemon[8055]: 20:32:46.119 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Our MAC: 79 d7 f5 ff 0c 9e f0 0d 0a 7f
Nov 05 20:32:46 majestix matrix-mautrix-signal-daemon[8055]: 20:32:46.119 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Thr MAC: 79 d7 f5 ff 0c 9e f0 0d 0a 7f
Nov 05 20:32:46 majestix matrix-mautrix-signal-daemon[8055]: 20:32:46.122 [***********55-receiver] DEBUG manager-***********55 - Storing envelope to disk.
Nov 05 20:32:46 majestix matrix-mautrix-signal-daemon[8055]: 20:32:46.145 [***********55-receiver] DEBUG io.finn.signald.storage.AccountData - Saving account to disk
Nov 05 20:32:51 majestix matrix-mautrix-signal-daemon[8055]: 20:32:51.021 [OkHttp https://textsecure-service.whispersystems.org/...] DEBUG io.finn.signald.ProtocolLogger - [WebSocketConnection] onMessage() -- incoming request
Nov 05 20:32:51 majestix matrix-mautrix-signal-daemon[8055]: 20:32:51.021 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Our MAC: 0b 85 f4 70 43 cc 43 28 ac 35
Nov 05 20:32:51 majestix matrix-mautrix-signal-daemon[8055]: 20:32:51.021 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Thr MAC: 0b 85 f4 70 43 cc 43 28 ac 35
Nov 05 20:32:51 majestix matrix-mautrix-signal-daemon[8055]: 20:32:51.022 [***********55-receiver] DEBUG manager-***********55 - Storing envelope to disk.
Nov 05 20:32:51 majestix matrix-mautrix-signal-daemon[8055]: 20:32:51.023 [***********55-receiver] DEBUG io.finn.signald.storage.AccountData - Saving account to disk
Bridge's logs:
Nov 05 20:32:46 majestix matrix-mautrix-signal[8265]: [2020-11-05 20:32:46,160] [TRACE@mausignald] Got data from server: {'type': 'message', 'data': {'username': '<my phone nr>', 'source': {'number': '<leaving contact's phone nr>', 'uuid': '<leaving contact's uuid>'}, 'sourceDevice': 0, 'type': 'UNIDENTIFIED_SENDER', 'timestamp': 1604608363983, 'timestampISO': '2020-11-05T20:32:43.983Z', 'serverTimestamp': 1604608366068, 'serverDeliveredTimestamp': 1604608366070, 'hasLegacyMessage': False, 'hasContent': True, 'isUnidentifiedSender': True, 'dataMessage': {'timestamp': 1604608363983, 'group': {'groupId': 'tlAWCwimNqi8IrGY/chF9Q==', 'members': [{'number': '<user1 phone nr>'}, {'number': '<user2 phone nr>'}, {'number': '<user3 phone nr>'}, {'number': '<user4 phone nr>'}, {'number': '<my phone nr>'}, {'number': '<user5 phone nr>'}], 'name': '\u2068achthundertfünfzehnte Gruppe\u2069', 'type': 'QUIT'}, 'endSession': False, 'expiresInSeconds': 0, 'profileKeyUpdate': False, 'viewOnce': False}}}
Nov 05 20:32:51 majestix matrix-mautrix-signal[8265]: [2020-11-05 20:32:51,031] [TRACE@mausignald] Got data from server: {'type': 'message', 'data': {'username': '<my phone nr>', 'source': {'number': '<leaving user's phone nr>', 'uuid': '<leaving user's uuid>'}, 'sourceDevice': 1, 'type': 'RECEIPT', 'timestamp': 1604608371301, 'timestampISO': '2020-11-05T20:32:51.301Z', 'serverTimestamp': 0, 'serverDeliveredTimestamp': 1604608370975, 'hasLegacyMessage': False, 'hasContent': False, 'isUnidentifiedSender': False}}
In the first entry, the leaving contact is no longer listed in data.dataMessage.group.members
.
Basic support for v2 groups has been merged into signald recently. It seems like some modifications are necessary to use it in clients though. Would be great to see this come to life 😃
You can see the problem here:
Full traceback:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 320, in ensure_joined
await self.join_room(room_id, max_retries=0)
File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 79, in wrapper
return await __method(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/mautrix/client/api/rooms.py", line 252, in join_room
content = await self.api.request(Method.POST, Path.join[room_id_or_alias],
File "/usr/lib/python3.8/site-packages/mautrix/api.py", line 233, in request
return await self._send(method, full_url, content, query_params, headers or {})
File "/usr/lib/python3.8/site-packages/mautrix/api.py", line 158, in _send
raise make_request_error(http_status=response.status,
mautrix.errors.request.MUnknown: No known servers
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
await self._run_handler(handler, evt)
File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 290, in __call__
return await self._handler(evt)
File "/usr/lib/python3.8/site-packages/mautrix_signal/commands/signal.py", line 75, in pm
await portal.main_intent.invite_user(portal.mxid, evt.sender.mxid)
File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 90, in wrapper
await __self.ensure_joined(room_id)
File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 342, in ensure_joined
raise IntentError(f"Failed to join room {room_id} as {self.mxid}") from e
mautrix.errors.base.IntentError: Failed to join room !*******:example.com as @signal_*****:example.com
I received the following error in mautrix-signal.
Jan 10 22:16:38 matrix mautrix-signal[29282]: [2021-01-10 22:16:38,473] [ERROR@mausignald] Exception in RPC event handler
Jan 10 22:16:38 matrix mautrix-signal[29282]: Traceback (most recent call last):
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
Jan 10 22:16:38 matrix mautrix-signal[29282]: obj = attrs_type(**new_items)
Jan 10 22:16:38 matrix mautrix-signal[29282]: TypeError: __init__() missing 1 required positional argument: 'text'
Jan 10 22:16:38 matrix mautrix-signal[29282]: The above exception was the direct cause of the following exception:
Jan 10 22:16:38 matrix mautrix-signal[29282]: Traceback (most recent call last):
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mausignald/rpc.py", line 68, in _run_rpc_handler
Jan 10 22:16:38 matrix mautrix-signal[29282]: await handler(req)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mausignald/signald.py", line 58, in _parse_message
Jan 10 22:16:38 matrix mautrix-signal[29282]: event = event_class.deserialize(event_data)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 282, in deserialize
Jan 10 22:16:38 matrix mautrix-signal[29282]: return _dict_to_attrs(cls, data)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
Jan 10 22:16:38 matrix mautrix-signal[29282]: new_items[name] = _try_deserialize(field.type, value, field.default,
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
Jan 10 22:16:38 matrix mautrix-signal[29282]: return _deserialize(cls, value, default)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
Jan 10 22:16:38 matrix mautrix-signal[29282]: return _deserialize(cls.__args__[0], value, default)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
Jan 10 22:16:38 matrix mautrix-signal[29282]: return _dict_to_attrs(cls, value, default, default_if_empty=True)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
Jan 10 22:16:38 matrix mautrix-signal[29282]: new_items[name] = _try_deserialize(field.type, value, field.default,
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
Jan 10 22:16:38 matrix mautrix-signal[29282]: return _deserialize(cls, value, default)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
Jan 10 22:16:38 matrix mautrix-signal[29282]: return _deserialize(cls.__args__[0], value, default)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
Jan 10 22:16:38 matrix mautrix-signal[29282]: return _dict_to_attrs(cls, value, default, default_if_empty=True)
Jan 10 22:16:38 matrix mautrix-signal[29282]: File "/var/lib/mautrix-signal/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 122, in _dict_to_attrs
Jan 10 22:16:38 matrix mautrix-signal[29282]: raise SerializerError(
Jan 10 22:16:38 matrix mautrix-signal[29282]: mautrix.types.util.serializable.SerializerError: Missing value for required key text in Quote
I try to create rooms in signal, then I can see it in matrix.
when I try to delete them it is ok until I restart mautrix-signal.
I try everything but it keeps recreating the group:
delete the group from my phone in signal
delete the group from my desktop in signal
delete from group on element (matrix) on my desktop
clean the rooms
forget the rooms
when I restart mautrix, those rooms reappear
when I send a message in this room, the signal on desktop receive it
when I try to send it from the phone, a new group is created and I can send/receive anymore.
Here you see the conversation:
Notice that I was already registered on signal in my phone, but I'd love to be able to uninstall it from there and keep only the matrix version.
Full trace:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
await self._run_handler(handler, evt)
File "/usr/lib/python3.8/site-packages/mautrix_signal/commands/auth.py", line 93, in enter_register_code
account = await evt.bridge.signal.verify(username, code=evt.args[0])
File "/opt/mautrix-signal/mausignald/signald.py", line 98, in verify
resp = await self.request("verify", "verification_succeeded", username=username, code=code)
File "/opt/mautrix-signal/mausignald/rpc.py", line 157, in request
resp_type, resp_data = await self._raw_request(command, **data)
File "/opt/mautrix-signal/mausignald/rpc.py", line 154, in _raw_request
return await future
mausignald.errors.UnexpectedError: java.net.SocketTimeoutException: timeout
Version: mautrix-signal 0.1.0b2+dev.0defb3f7
This might be a problem with my setup, but maybe this is a bug.
I've set up everything according to the wiki, but I don't get a QR code back. Docker Logs tell me everything's okay:
docker logs signald
17:48:29.528 [socketlistener] INFO io.finn.signald.SocketHandler - Client connected
17:52:23.699 [socketlistener] INFO io.finn.signald.SocketHandler - Client disconnected
17:52:32.561 [socketlistener] INFO io.finn.signald.SocketHandler - Client connected
17:57:53.779 [socketlistener] INFO io.finn.signald.SocketHandler - Client disconnected
17:58:06.689 [main] INFO io.finn.signald.Main - Binding to socket /signald/signald.sock
17:58:06.823 [main] WARN io.finn.signald.Main - No users are currently defined, you'll need to register or link to your existing signal account
17:58:06.825 [main] INFO io.finn.signald.Main - Started signald 0.12.0+git2021-01-30rce7ef396.5
17:58:11.372 [socketlistener] INFO io.finn.signald.SocketHandler - Client connected
18:01:58.106 [socketlistener] INFO io.finn.signald.SocketHandler - Client disconnected
18:02:06.508 [socketlistener] INFO io.finn.signald.SocketHandler - Client connected
18:26:00.755 [socketlistener] INFO io.finn.signald.SocketHandler - Client disconnected
18:26:07.810 [socketlistener] INFO io.finn.signald.SocketHandler - Client connected
Interestingly the Warning didn't come yet, no matter how often I restart mautrix-signal:
[2021-01-31 18:02:06,302] [[email protected]] Initializing mautrix-signal 0.1.0b2+dev.64bc5c36
[2021-01-31 18:02:06,312] [[email protected]] Initialization complete in 0.56 seconds
[2021-01-31 18:02:06,312] [[email protected]] Running startup actions...
[2021-01-31 18:02:06,313] [[email protected]] Connecting to postgres://synapse:fd6CixUALhpZKF93GXwK@postgres/synapse
[2021-01-31 18:02:06,372] [[email protected]] Starting appservice...
[2021-01-31 18:02:06,372] [[email protected]] Starting appservice web server on 0.0.0.0:29328
[2021-01-31 18:02:06,375] [[email protected]] Ensuring connectivity to homeserver
[2021-01-31 18:02:06,506] [[email protected]] Initializing appservice bot
[2021-01-31 18:02:06,517] [INFO@mausignald] Connected to signald v0.12.0+git2021-01-30rce7ef396.5
[2021-01-31 18:02:06,569] [[email protected]] Startup actions complete in 0.26 seconds, now running forever
[2021-01-31 18:26:00,751] [[email protected]] Interrupt received, stopping...
[2021-01-31 18:26:00,752] [[email protected]] Stopping appservice web server
[2021-01-31 18:26:00,753] [[email protected]] Everything stopped, shutting down
[2021-01-31 18:26:07,615] [[email protected]] Initializing mautrix-signal 0.1.0b2+dev.64bc5c36
[2021-01-31 18:26:07,624] [[email protected]] Initialization complete in 0.56 seconds
[2021-01-31 18:26:07,625] [[email protected]] Running startup actions...
[2021-01-31 18:26:07,625] [[email protected]] Connecting to postgres://synapse:fd6CixUALhpZKF93GXwK@postgres/synapse
[2021-01-31 18:26:07,688] [[email protected]] Starting appservice...
[2021-01-31 18:26:07,688] [[email protected]] Starting appservice web server on 0.0.0.0:29328
[2021-01-31 18:26:07,691] [[email protected]] Ensuring connectivity to homeserver
[2021-01-31 18:26:07,806] [[email protected]] Initializing appservice bot
[2021-01-31 18:26:07,818] [INFO@mausignald] Connected to signald v0.12.0+git2021-01-30rce7ef396.5
[2021-01-31 18:26:07,863] [[email protected]] Startup actions complete in 0.24 seconds, now running forever
Full trace:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
await self._run_handler(handler, evt)
File "/usr/lib/python3.8/site-packages/mautrix_signal/commands/auth.py", line 97, in enter_register_code
account = await evt.bridge.signal.verify(username, code=evt.args[0])
File "/opt/mautrix-signal/mausignald/signald.py", line 109, in verify
resp = await self.request("verify", "verification_succeeded", username=username, code=code)
File "/opt/mautrix-signal/mausignald/rpc.py", line 198, in request
resp_type, resp_data = await self._raw_request(command, **data)
File "/opt/mautrix-signal/mausignald/rpc.py", line 195, in _raw_request
return await future
mausignald.errors.UnexpectedError: Bad response: 400
As others mentioned I was already registered on signal in my phone, but I'd love to be able to uninstall it from there and keep only the matrix version. Any tips / feedback?
Version: mautrix-signal 0.1.0b2+dev.3852c137
When signald is not running, we get the rather unhelpful message below.
Traceback (most recent call last):
File "/home/evan/resources/venv3/lib/python3.7/site-packages/mautrix/util/program.py", line 190, in _run
self.loop.run_until_complete(self.start())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/home/evan/resources/venv3/lib/python3.7/site-packages/mautrix_signal/__main__.py", line 76, in start
await super().start()
File "/home/evan/resources/venv3/lib/python3.7/site-packages/mautrix/bridge/bridge.py", line 151, in start
await super().start()
File "/home/evan/resources/venv3/lib/python3.7/site-packages/mautrix/util/program.py", line 213, in start
await asyncio.gather(*(self.startup_actions or []))
File "/home/evan/resources/venv3/lib/python3.7/site-packages/mautrix_signal/signal.py", line 138, in start
await self.connect()
File "/home/evan/resources/venv3/lib/python3.7/site-packages/mausignald/rpc.py", line 44, in connect
self._reader, self._writer = await asyncio.open_unix_connection(self.socket_path)
File "/usr/lib/python3.7/asyncio/streams.py", line 128, in open_unix_connection
lambda: protocol, path, **kwds)
File "/usr/lib/python3.7/asyncio/unix_events.py", line 232, in create_unix_connection
await self.sock_connect(sock, path)
File "/usr/lib/python3.7/asyncio/selector_events.py", line 464, in sock_connect
return await fut
File "/usr/lib/python3.7/asyncio/selector_events.py", line 469, in _sock_connect
sock.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
As the description says, German umlaut like äüöÄÜÖß
is displayed as ?
in name and received messages.
I'm not sure if it happens with other caracters as well
I read in the features and roadmap that signal stickers going from Signal to Matrix should work.
What happened: Signal stickers from sticker packs within Signal are not sent/received from Signal via Synapse to the client for the reason "failed to bridge sticker".
Expected behavior: Stickers should be interpreted as a picture and transferred from Signal over to the client.
Stickers that are not part of the Signal sticker packs (such as those apps that make stickers looking like your face or whatnot) transfer perfectly in the form of a .png. Is Signal using some kind of in-house solution to stickers rather than sending them as pictures?
Since I'm uncertain what is sensitive data I redacted a few places. Please let me know if I missed something. I'm also not entirely sure what parts in one log aligns with parts of another so I may have posted too many lines. My apologies for that. The mautrix-signal log is the of course the one that states the original issue: "failed to bridge sticker". I am aware the log timings are visually off by an hour because I apparently didn't get the whole daylight saving time correct. The actual timing is correct though.
mautrix-signal logs (sensitive lines redacted to "USER"):
today at 6:12 PM [2020-11-11 17:12:48,912] [[email protected]] Started handling message 1605114767421 by f0a2123e-166e-4279-8796-6e671047cf98
today at 6:12 PM [2020-11-11 17:12:49,256] [[email protected]] Failed to bridge sticker, no incoming filename: Attachment(width=512, height=512, caption=None, preview=None, blurhash='LLSia8~W%g_4^*s,%MR+x]ozV@ad', voice_note=False, content_type='image/webp', custom_filename=None, id='l85ANg_FU3aBX626N2Fz', incoming_filename=None, digest='EiKcBfDgYktjZSO08AE3VsWVFQJx8HvmHgH5Kpjysvk=', outgoing_filename=None)
today at 6:12 PM [2020-11-11 17:12:49,257] [[email protected]] Didn't get event ID for 1605114767421
signald logs:
today at 6:12 PM 17:12:23.404 [Thread-1] DEBUG io.finn.signald.ProtocolLogger - [WebSocketConnection] Sending keep alive...
today at 6:12 PM 17:12:23.517 [OkHttp https://textsecure-service.whispersystems.org/...] DEBUG io.finn.signald.ProtocolLogger - [WebSocketConnection] onMessage() -- response received, but no listener
today at 6:12 PM 17:12:48.806 [OkHttp https://textsecure-service.whispersystems.org/...] DEBUG io.finn.signald.ProtocolLogger - [WebSocketConnection] onMessage() -- incoming request
today at 6:12 PM 17:12:48.807 [**********84-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Our MAC: 08 ed 29 d4 f3 aa 61 55 93 4b
today at 6:12 PM 17:12:48.807 [**********84-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Thr MAC: 08 ed 29 d4 f3 aa 61 55 93 4b
today at 6:12 PM 17:12:48.807 [**********84-receiver] DEBUG manager-**********84 - Storing envelope to disk.
today at 6:12 PM 17:12:48.813 [**********84-receiver] DEBUG io.finn.signald.storage.AccountData - Saving account to disk
today at 6:12 PM 17:12:48.816 [**********84-receiver] DEBUG io.finn.signald.storage.AccountData - Saving account to disk
today at 6:12 PM 17:12:56.363 [OkHttp https://textsecure-service.whispersystems.org/...] DEBUG io.finn.signald.ProtocolLogger - [WebSocketConnection] onMessage() -- incoming request
today at 6:12 PM 17:12:56.364 [**********84-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Our MAC: 22 3d 8e 34 ea 14 48 8b bc c7
today at 6:12 PM 17:12:56.364 [**********84-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Thr MAC: 22 3d 8e 34 ea 14 48 8b bc c7
today at 6:12 PM 17:12:56.365 [**********84-receiver] DEBUG manager-**********84 - Storing envelope to disk.
synapse logs (sensitive lines redacted to "DOMAIN","@signal_USER":
today at 6:12 PM 2020-11-11 18:12:34,447 - synapse.access.http.8008 - 311 - INFO - GET-11817 - 192.168.0.1 - 8008 - {@signalbot:DOMAIN} Processed request: 30.005sec/-0.000sec (0.004sec, 0.001sec) (0.000sec/0.000sec/0) 376B 200 "GET /_matrix/client/r0/sync?timeout=30000&since=s39698_61752_392_3436_1669_12_352_10176_1&filter=0&set_presence=online HTTP/1.1" "Python/3.8 aiohttp/3.6.2" [0 dbevts]
today at 6:12 PM 2020-11-11 18:12:35,264 - synapse.handlers.presence - 348 - INFO - persist_presence_changes-306 - Persisting 11 unpersisted presence updates
today at 6:12 PM 2020-11-11 18:12:57,458 - synapse.rest.media.v1.upload_resource - 85 - INFO - POST-11849 - Uploaded content with URI 'mxc://DOMAIN/beKfuWbCSQrgqKRNCABhTwSi'
today at 6:12 PM 2020-11-11 18:12:57,459 - synapse.access.http.8008 - 311 - INFO - POST-11849 - 192.168.0.1 - 8008 - {@signal_USER:DOMAIN} Processed request: 0.043sec/-0.000sec (0.001sec, 0.004sec) (0.001sec/0.021sec/1) 67B 200 "POST /_matrix/media/r0/upload?filename=cjv9qiQtoRZ1hNOvRbtF&user_id=@signal_USER:DOMAIN HTTP/1.1" "Python/3.8 aiohttp/3.6.2" [0 dbevts]
today at 6:12 PM 2020-11-11 18:12:57,502 - synapse.access.http.8008 - 311 - INFO - GET-11850 - 192.168.0.1 - 8008 - {@signal_USER:DOMAIN} Processed request: 0.003sec/-0.000sec (0.004sec, 0.000sec) (0.000sec/0.000sec/0) 126B 200 "GET /_matrix/client/r0/rooms/%21QKEniOJKClzAoXZHDp%3ADOMAIN/state/m.room.power_levels?user_id=@signal_USER:DOMAIN HTTP/1.1" "Python/3.8 aiohttp/3.6.2" [0 dbevts]
today at 6:12 PM 2020-11-11 18:12:57,713 - synapse.access.http.8008 - 311 - INFO - PUT-11851 - 192.168.0.1 - 8008 - {@signal_USER:DOMAIN} Processed request: 0.178sec/-0.000sec (0.012sec, 0.001sec) (0.005sec/0.017sec/4) 59B 200 "PUT /_matrix/client/r0/rooms/%21QKEniOJKClzAoXZHDp%3ADOMAIN/send/m.room.encrypted/mautrix-python_R103%40T1605114777530?ts=1605114774962&user_id=@signal_USER:DOMAIN HTTP/1.1" "Python/3.8 aiohttp/3.6.2" [0 dbevts]
today at 6:12 PM 2020-11-11 18:12:57,796 - synapse.http.client - 381 - INFO - as-sender-signal-141 - Received response to PUT http://mautrix-signal:29328/transactions/1746?access_token=<redacted>: 200
P.S. I can't believe this works as well as it does. This futuristic bridging stuff is just insane. Good job!
Signal mobile app (Android) gives a 'Read by, 'Delivered to' and 'Sent to' status for a message in group conversation. Element/Matrix incorrectly shows 'Seen by' for all the delivered messages. This should be changed to 'Read by'.
One of my contacts created a new signal group and added me to it. Among the other members of this group, there is 1 number not yet among my contacts (that's the number ending in 34
, mentioned in the daemon logs).
The bridge did not create a portal room for this group. Logs below.
On my main device (phone), I added the new contact to my address book (this may or may not have been necessary). Then I restarted the bridge. Upon starting up, it created a puppet for the new contact and created the group portal room.
Nov 05 09:59:04 majestix matrix-mautrix-signal-daemon[21019]: 09:59:04.790 [OkHttp https://textsecure-service.whispersystems.org/...] DEBUG io.finn.signald.ProtocolLogger - [WebSocketConnection] onMessage() -- incoming request
Nov 05 09:59:04 majestix matrix-mautrix-signal-daemon[21019]: 09:59:04.791 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Our MAC: 74 5f 0c 9b 45 f5 ef bb 3a bc
Nov 05 09:59:04 majestix matrix-mautrix-signal-daemon[21019]: 09:59:04.791 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Thr MAC: 74 5f 0c 9b 45 f5 ef bb 3a bc
Nov 05 09:59:04 majestix matrix-mautrix-signal-daemon[21019]: 09:59:04.793 [***********55-receiver] DEBUG manager-***********55 - Storing envelope to disk.
Nov 05 09:59:04 majestix matrix-mautrix-signal-daemon[21019]: 09:59:04.925 [***********55-receiver] DEBUG io.finn.signald.storage.RecipientStore - not storing unresolved, partial address: ***********34/null
Nov 05 09:59:04 majestix matrix-mautrix-signal-daemon[21019]: 09:59:04.927 [***********55-receiver] DEBUG io.finn.signald.storage.AccountData - Saving account to disk
Nov 05 09:59:04 majestix matrix-mautrix-signal-daemon[21019]: 09:59:04.933 [***********55-receiver] DEBUG io.finn.signald.storage.AccountData - Saving account to disk
Nov 05 09:59:04 majestix matrix-mautrix-signal[21198]: [2020-11-05 09:59:04,941] [TRACE@mausignald] Got data from server: {'type': 'message', 'data': {'username': '<my phone nr>', 'source': {'number': '<group creator's phone nr>', 'uuid': '<group creator's uuid>'}, 'sourceDevice': 0, 'type': 'UNIDENTIFIED_SENDER', 'timestamp': 1604570338831, 'timestampISO': '2020-11-05T09:58:58.831Z', 'serverTimestamp': 1604570344742, 'serverDeliveredTimestamp': 1604570344743, 'hasLegacyMessage': False, 'hasContent': True, 'isUnidentifiedSender': True, 'dataMessage': {'timestamp': 1604570338831, 'group': {'groupId': 'tlAWCwimNqi8IrGY/chF9Q==', 'members': [{'number': '<user1 phone nr>'}, {'number': '<my phone nr>'}, {'number': '<user2 phone nr>'}, {'number': '<user3 phone nr>'}, {'number': '<unknown user phone nr>'}, {'number': '<group creator's phone nr>'}], 'name': '<group name>', 'type': 'UPDATE'}, 'endSession': False, 'expiresInSeconds': 0, 'profileKeyUpdate': False, 'viewOnce': False}}}
Nov 05 09:59:05 majestix matrix-mautrix-signal[21198]: [2020-11-05 09:59:05,095] [TRACE@mausignald] Request daebd09f-9058-43a5-b4f7-2dc8cc9f6111: list_groups {'username': '<my phone nr>'}
Nov 05 09:59:05 majestix matrix-mautrix-signal[21198]: [2020-11-05 09:59:05,095] [TRACE@mausignald] Sent data to server server: {'id': 'daebd09f-9058-43a5-b4f7-2dc8cc9f6111', 'type': 'list_groups', 'username': '<my phone nr>'}
Then nothing at all happened in the bridge. (Other chats work as normal.)
The first entry in the bridge logs above is the only entry at all that contains the group id. In the signal db, in portal.chat_id
, this group id is present, but the rest of the row is empty. (Other groups have mxid
and name
filled in.)
Nov 05 09:59:05 majestix matrix-mautrix-signal-daemon[21019]: 09:59:05.096 [socketlistener] DEBUG io.finn.signald.SocketHandler - {"id": "daebd09f-9058-43a5-b4f7-2dc8cc9f6111", "type": "list_groups", "username": "<my phone nr>"}
Nov 05 09:59:05 majestix matrix-mautrix-signal-daemon[21019]: 09:59:05.315 [OkHttp https://textsecure-service.whispersystems.org/...] DEBUG io.finn.signald.ProtocolLogger - [WebSocketConnection] onMessage() -- incoming request
Nov 05 09:59:05 majestix matrix-mautrix-signal-daemon[21019]: 09:59:05.316 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Our MAC: bd 66 87 40 61 e3 0a 04 81 b9
Nov 05 09:59:05 majestix matrix-mautrix-signal-daemon[21019]: 09:59:05.316 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SignalServiceEnvelope] Thr MAC: bd 66 87 40 61 e3 0a 04 81 b9
Nov 05 09:59:05 majestix matrix-mautrix-signal-daemon[21019]: 09:59:05.317 [***********55-receiver] DEBUG manager-***********55 - Storing envelope to disk.
Nov 05 09:59:05 majestix matrix-mautrix-signal-daemon[21019]: 09:59:05.392 [***********55-receiver] DEBUG io.finn.signald.ProtocolLogger - [SessionBuilder] We've already setup a session for this V3 message, letting bundled message fall through...
Nov 05 09:59:05 majestix matrix-mautrix-signal-daemon[21019]: 09:59:05.393 [***********55-receiver] DEBUG io.finn.signald.storage.AccountData - Saving account to disk
Then a bunch more of these.
Hi there,
installed and configured mautrix-signal today using the docker method (inside a rancher managed kubernetes).
Most things seem to work fine, however I get this error message in the logs:
[2020-11-04 02:49:35,243] [[email protected].@markus:redacted.de] Failed to sync contact Address(number='+49READACTED', uuid=UUID('READACTED'))
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix_signal/user.py", line 123, in _sync
await self._sync_contact(contact, create_contact_portal)
File "/usr/lib/python3.8/site-packages/mautrix_signal/user.py", line 99, in _sync_contact
profile = await self.bridge.signal.get_profile(self.username, contact.address)
File "/opt/mautrix-signal/mausignald/signald.py", line 138, in get_profile
resp = await self.request("get_profile", "profile", username=username,
File "/opt/mautrix-signal/mausignald/rpc.py", line 157, in request
resp_type, resp_data = await self._raw_request(command, **data)
File "/opt/mautrix-signal/mausignald/rpc.py", line 154, in _raw_request
return await future
mausignald.errors.UnexpectedError: javax.crypto.AEADBadTagException: Tag mismatch!
Any idea what this means and how I can fix it?
Hi all,
I've just been setting up mautrix-signal on a Raspberrypi 4 running archlinuxarm.
I'm using an Arch User Repo package called mautrix-signal-git, which is producing a package from a pull off this repo's master branch:
# pacman -Qi mautrix-signal-git
Name : mautrix-signal-git
Version : r60.935e8da-1
[snip]
It's all working fine now, but I had to make a small change to the code to get it the run. When I first tried to create the registration file I was faced with the error in the title, which was further detailed as follows:
# runuser -u mautrix-signal -- python -m mautrix_signal -g -c config.yaml -r registration.yaml
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.8/site-packages/mautrix_signal/__main__.py", line 22, in <module>
from .config import Config
File "/usr/lib/python3.8/site-packages/mautrix_signal/config.py", line 21, in <module>
from mautrix.bridge.config import (BaseBridgeConfig, ConfigUpdateHelper, ForbiddenKey,
ImportError: cannot import name 'ForbiddenKey' from 'mautrix.bridge.config' (/usr/lib/python3.8/site-packages/mautrix/bridge/config.py)
A quick git blame
shows that this line of code has been as it is since initial commit. I grep
ed around for "ForbiddenKey"
a bit, and couldn't find it anywhere. So purely on a hunch I removed the two instances of it in the file:
diff --git a/mautrix_signal/config.py b/mautrix_signal/config.py
index 920cd85..0730d61 100644
--- a/mautrix_signal/config.py
+++ b/mautrix_signal/config.py
@@ -18,8 +18,7 @@ import os
from mautrix.types import UserID
from mautrix.client import Client
-from mautrix.bridge.config import (BaseBridgeConfig, ConfigUpdateHelper, ForbiddenKey,
- ForbiddenDefault)
+from mautrix.bridge.config import (BaseBridgeConfig, ConfigUpdateHelper, ForbiddenDefault)
Permissions = NamedTuple("Permissions", user=bool, admin=bool, level=str)
@@ -36,7 +35,7 @@ class Config(BaseBridgeConfig):
return [
*super().forbidden_defaults,
ForbiddenDefault("appservice.database", "postgres://username:password@hostname/db"),
- ForbiddenDefault("bridge.permissions", ForbiddenKey("example.com")),
+ ForbiddenDefault("bridge.permissions", "example.com"),
]
…and that works fine 😃
Thanks for this useful plugin!
Regards,
Mark.
The Wiki suggest this command to install mautrix-signal:
pip install --upgrade https://github.com/tulir/mautrix-signal/tarball/master#egg=mautrix-signal[all]
Later it says that this installation can be upgraded by rerunning that command. That does not seem to be the case. Even when adding --no-cache-dir
, pip never refetches the HTTPS resource. Using a git+https URL instead does not have this issue. So I would suggest changing this line to:
> pip install --upgrade 'git+https://github.com/tulir/mautrix-signal.git#egg=mautrix-signal[all]'
Please excuse this not being a pull/merge request, I did not see an easy way to edit the Wiki.
So far as I understand, the bridge/signal deployment is intended to share the attachment directory, so there's only ever one copy of the attachments. If that's incorrect, I imagine most of what follows will be as well:
I tried to use a docker-compose deployment making use of the finn/signald docker container (Dockerfile and image
services:
mautrix-signal:
container_name: mautrix-signal
image: dock.mau.dev/tulir/mautrix-signal
restart: unless-stopped
volumes:
- ./bridge:/data
- ./signald:/signald
depends_on:
- signald
signald:
container_name: signald
image: finn/signald
restart: unless-stopped
volumes:
- ./signald:/signald
One of the more significant differences between the two signald docker containers appears to be the directory where attachments are stored (/signald/attachments
vs /var/run/signald/attachments
). So far as I can tell, the mautrix-signal configuration for signald can only be used if the attachment directory has the same path in both the bridge container and the signald container. E.g. with the above docker-compose file and an outgoing_attachment_dir: /signald/attachments
, that path is used when querying signald:
signald | 14:42:15.163 [socketlistener] ERROR io.finn.signald.SocketHandler - Catching
signald | org.asamk.signal.AttachmentInvalidException: /signald/attachments/mautrix-signal-ca29c1ae-fc0f-48a4-a0a7-64f3fe16587d: /signald/attachments/mautrix-signal-ca29c1ae-fc0f-48a4-a0a7-64f3fe16587d (No such file or directory)
signald | at io.finn.signald.SocketHandler.send(SocketHandler.java:255) ~[signald.jar:unspecified]
signald | at io.finn.signald.SocketHandler.handleRequest(SocketHandler.java:137) [signald.jar:unspecified]
signald | at io.finn.signald.SocketHandler.run(SocketHandler.java:106) [signald.jar:unspecified]
signald | at java.lang.Thread.run(Thread.java:748) [?:1.8.0_272]
mautrix-signal | [2020-11-17 14:42:15,164] [[email protected]] Exception in Matrix event handler
mautrix-signal | Traceback (most recent call last):
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix/appservice/as_handler.py", line 178, in try_handle
mautrix-signal | await handler_func(event)
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix/bridge/matrix.py", line 439, in int_handle_event
mautrix-signal | await self.handle_message(evt.room_id, evt.sender, evt.content, evt.event_id)
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix/bridge/matrix.py", line 282, in handle_message
mautrix-signal | await portal.handle_matrix_message(sender, message, event_id)
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix_signal/portal.py", line 193, in handle_matrix_message
mautrix-signal | await self.signal.send(username=sender.username, recipient=self.chat_id, body=text,
mautrix-signal | File "/opt/mautrix-signal/mausignald/signald.py", line 117, in send
mautrix-signal | await self.request("send", "send_results", username=username, messageBody=body,
mautrix-signal | File "/opt/mautrix-signal/mausignald/rpc.py", line 157, in request
mautrix-signal | resp_type, resp_data = await self._raw_request(command, **data)
mautrix-signal | File "/opt/mautrix-signal/mausignald/rpc.py", line 154, in _raw_request
mautrix-signal | return await future
mautrix-signal | mausignald.errors.UnexpectedError: /signald/attachments/mautrix-signal-ca29c1ae-fc0f-48a4-a0a7-64f3fe16587d: /signald/attachments/mautrix-signal-ca29c1ae-fc0f-48a4-a0a7-64f3fe16587d (No such file or directory)
If I change the configuration to match the signald container, signald is happy but the bridge is not:
mautrix-signal | [2020-11-18 02:43:39,886] [[email protected]] Exception in Matrix event handler
mautrix-signal | Traceback (most recent call last):
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix/appservice/as_handler.py", line 178, in try_handle
mautrix-signal | await handler_func(event)
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix/bridge/matrix.py", line 439, in int_handle_event
mautrix-signal | await self.handle_message(evt.room_id, evt.sender, evt.content, evt.event_id)
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix/bridge/matrix.py", line 282, in handle_message
mautrix-signal | await portal.handle_matrix_message(sender, message, event_id)
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix_signal/portal.py", line 188, in handle_matrix_message
mautrix-signal | attachment_path = await self._download_matrix_media(message)
mautrix-signal | File "/usr/lib/python3.8/site-packages/mautrix_signal/portal.py", line 162, in _download_matrix_media
mautrix-signal | with open(path, "wb") as file:
mautrix-signal | FileNotFoundError: [Errno 2] No such file or directory: '/var/run/signald/attachments/mautrix-signal-cf04e03d-0858-41df-a475-91f3de0c51b7'
If I understand this correctly, it would be nice two have two configurations to support a docker-compose deployment: one to specify the path relative to the mautrix-signal container, and one to request from signald. This would enable the mautrix-signal and signald docker containers to put attachments wherever is convenient in the context of the docker container and still be able to communicate.
I send s.o. messages over the bridge and wondered why he didn't response.
Opening the chat in Signal displays "Your safety number with User has changed" and none of my messages were forwarded to signal.
A response like in other mautrix bridges would be good to be sure the sent message was forwarded.
The logs don't show anything as well.
Ran into this with a group chat:
[2020-12-20 21:08:30,196] [ERROR@mausignald] Exception in RPC event handler
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 117, in _dict_to_attrs
obj = attrs_type(**new_items)
TypeError: __init__() missing 1 required positional argument: 'revision'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/mautrix-signal/mausignald/rpc.py", line 68, in _run_rpc_handler
await handler(req)
File "/opt/mautrix-signal/mausignald/signald.py", line 58, in _parse_message
event = event_class.deserialize(event_data)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 282, in deserialize
return _dict_to_attrs(cls, data)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
new_items[name] = _try_deserialize(field.type, value, field.default,
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
return _deserialize(cls, value, default)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
return _deserialize(cls.__args__[0], value, default)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
return _dict_to_attrs(cls, value, default, default_if_empty=True)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 112, in _dict_to_attrs
new_items[name] = _try_deserialize(field.type, value, field.default,
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 133, in _try_deserialize
return _deserialize(cls, value, default)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 175, in _deserialize
return _deserialize(cls.__args__[0], value, default)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 170, in _deserialize
return _dict_to_attrs(cls, value, default, default_if_empty=True)
File "/usr/lib/python3.8/site-packages/mautrix/types/util/serializable_attrs.py", line 122, in _dict_to_attrs
raise SerializerError(
mautrix.types.util.serializable.SerializerError: Missing value for required key revision in GroupV2ID
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.