-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#3031] Update mautrix-signal to the go version (signalgo merged to signal) #3041
[#3031] Update mautrix-signal to the go version (signalgo merged to signal) #3041
Conversation
This is awesome, thank you! |
roles/custom/matrix-bridge-mautrix-signalgo/templates/config.yaml.j2
Outdated
Show resolved
Hide resolved
Thanks for your reviews! The entry has a strikethrough decoration but remains available for legacy purposes and enjoys the user to move to the updated component. |
Thank you for working on this. Sorry, I made a claim in #3031 that the go bridge is a drop-in replacement. Some users in the signal bridge matrix room reported that this may not be the case. (They needed to wipe the database.) It is inconclusive. |
It is the case, it's therefore the reason that pushed me to use 'signalgo' and not 'signal' as an identifier. I feel like the old one must remain for legacy purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything runs correctly, the bridge links successfully, but no messages are getting received. I'm getting this issue that seems to be some sort of encoding/decoding problem going on when trying to save it to the database. I'll try to debug it tomorrow.
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 DBG Message received from ffffffff-0000-0000-b1aa-d0b5eb343ee2 (group: <nil>) user_id=@user:example.com
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 DBG fetchContactThenTryAndUpdateWithProfile: updating existing contact for uuid: ffffffff-0000-0000-b1aa-d0b5eb343ee2 component=signalmeow
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 INF profileKey is nil component=signalmeow
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 ERR fetchContactThenTryAndUpdateWithProfile: error retrieving profile for uuid: ffffffff-0000-0000-b1aa-d0b5eb343ee2 error="profile key not found" component=signalmeow
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 DBG Waiting for message chat_id=ffffffff-0000-0000-b1aa-d0b5eb343ee2
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 DBG StoreContactDetailsAsContact: creating new contact for uuid: aaaaaaaa-1111-1111-9a02-bffc54960129 component=signalmeow
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 DBG StoreContactDetailsAsContact: no avatar found for uuid: aaaaaaaa-1111-1111-9a02-bffc54960129 component=signalmeow
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 DBG StoreContactDetailsAsContact: storing contact for uuid: aaaaaaaa-1111-1111-9a02-bffc54960129 component=signalmeow
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 ERR StoreContactDetailsAsContact: error storing contact error="pq: invalid byte sequence for encoding \"UTF8\": 0xb9" component=signalmeow
Dec 15 12:56:21 matrix matrix-mautrix-signalgo[69090]: Dec 15, 2023 12:56:21 ERR StoreContactDetailsAsContact error error="pq: invalid byte sequence for encoding \"UTF8\": 0xb9" component=signalmeow
roles/custom/matrix-bridge-mautrix-signalgo/templates/config.yaml.j2
Outdated
Show resolved
Hide resolved
group_vars/matrix_servers
Outdated
matrix_mautrix_signalgo_metrics_enabled: "{{ prometheus_enabled }}" | ||
|
||
# Postgres is the default, except if not using internal Postgres server | ||
matrix_mautrix_signalgo_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}" |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's true that it maybe lacks of some details that could be added to the documentation for example, but in fact I have tested to switch from the managed pgsql to sqlite or external pgsql and it works - as few as it is documented by your link.
As this is also missing for the other bridges, maybe this should be the concern of dedicated issue?
-- Documenting / Refactoring-Unifying the bridges db settings
vim inventory/host_vars/domain.tld/vars.yml
#
## Other bridges are using the default config
# (default) Managed PGSQL
matrix_mautrix_signalgo_enabled: true
# force sqlite
matrix_mautrix_signalgo_enabled: true
matrix_mautrix_signalgo_database_engine: sqlite
# force external PGSQL
matrix_mautrix_signalgo_enabled: true
matrix_mautrix_signalgo_database_engine: postgres
matrix_mautrix_signalgo_database_username: # default: 'matrix_mautrix_signalgo'
matrix_mautrix_signalgo_database_password: # default: 'some-password'
matrix_mautrix_signalgo_database_hostname: # default: ''
matrix_mautrix_signalgo_database_port: # default: 5432
matrix_mautrix_signalgo_database_name: # default: 'matrix_mautrix_signalgo'
matrix_mautrix_signalgo_database_sslmode: # default: disable
Yes, I am on it! (I have also seen the other reviews, will focus on the messaging issue first) |
Co-authored-by: lon <[email protected]>
I have tested with the correct sqlite backend and it worked perfectly! (A good start I'd say)
Maybe an issue in the PG configuration in the filed of a table? |
As far as I know mautrix-signalgo is intended to be merged into mautrix-signal once it is stable, so I'm not sure how this should be handled by the playbook. |
If mautrix-signalgo would be replacing mautrix-signal (very) soon, I suppose the best path forward would be to avoid the confusion of having 2 roles that would ultimately do the same thing, and instead just wait for it to happen. Given that they'd be merging into mautrix-signal, I suppose they will also provide a smooth migration path for users of the existing bridge, so hopping on that train would be best. |
Thanks for the information! As the 1st bridge is not currently usable, I have pushed this role to "re-enable" the use of Signal. If I get it right, the legacy bridge will be replaced by the new one, so in a way having a role to already prepare and test it seems fair, what you'd think? (cf. the Postgres issue #3041 (review)) And this way newcomers would be able to install it already. Then when the "new" will be merged in the "old", the signalgo role will simply move the data to the signal folder/database. |
This merge just landed. I think this PR should be modified to be compatible with current configurations without the "go" in "signalgo". |
According to this message, https://matrix.to/#/!mautrix-signal-v6:maunium.net/$8dzs8sw6Ypi7P41CaA2poAlMs1J_ooLAMBytcTwFZT0?via=maunium.net&via=matrix.org&via=ahouansou.cz the author has not tested it thoroughly with synapse and/or postgresql. I believe it's probably an encoding error; the bytes in the log correspond to invalid values for utf-8. |
What do you mean, this PR should replace the |
On my previous installation I have installed it with Pg 14 and it worked out of the box, maybe a change or regression in PG16? |
I switched to this branch a few days ago and must say it works pretty well! Migration went smooth. Had to unlink and relink my devices twice before everything worked and room names get lost until a contact writes their first message to you after migrating, but those are kinks of the new signal bridge I guess, nothing to do with this playbook. Can't wait to see it merged to main! |
Very glad to hear it!
Did you migrate from the Python code? |
Yes, I had the python version before, but a problem with linked devices forced me to relink my bridge to my signal account. Since that does not work anymore in the current state of the python bridge, I decided to give this branch a spin. |
Thank you for this branch @pm-McFly. It works flawlessly for days now. I was on a fresh install. |
This fails on my server since it's an ARM64 server.
It looks like you hardcode the architecture on to the docker container version in main.yaml matrix-docker-ansible-deploy/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml Line 12 in c873516
I was able to get it to work on my server by putting This will at least help it work with amd64 & arm64 architectures since it looks like those are the 2 docker images that are created. |
Thanks for raising this issue up! It's fixed. matrix-docker-ansible-deploy/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml Line 12 in e5d31b5
For the time being it seems that the docker images are not versioned anymore... Maybe this will change in the futur and fix this "hard-coding" need. I have also updated the image version to latest (with successful tests/build) fix revision. If you want you can use |
Thanks. Yeah, hopefully they start adding version tags to the git repo. Until then though, just using |
The only thing is that I don't want to follow the latest just because some commit might be leading to some issues... -hence the non versioning yet. So I am picking only the version that are successful commits (with build and tests passing I mean) Also, the rest of the repo is not following the latest but specific versions, so I don't want to diverge too much |
.. because matrix_mautrix_signal_version is used in other places which do not expect it. For example: `matrix_mautrix_signal_container_image_self_build_branch` Related to: #3041
I'm not sure that the new implementation is ready for the mass-migration of the user base which the recent merge into |
.. because matrix_mautrix_signal_version is used in other places which do not expect it. For example: `matrix_mautrix_signal_container_image_self_build_branch` Related to: spantaleev#3041
Fixes spantaleev#3088 Looks like the migration to the Go-based Signal bridge hardcoded the `signalbot` username instead of using the variable we had. Related to: spantaleev#3041
.. because matrix_mautrix_signal_version is used in other places which do not expect it. For example: `matrix_mautrix_signal_container_image_self_build_branch` Related to: spantaleev#3041
Fixes spantaleev#3088 Looks like the migration to the Go-based Signal bridge hardcoded the `signalbot` username instead of using the variable we had. Related to: spantaleev#3041
I recently tried updating my Ansible Playbook and ran into this error with signal:
How do I get past this? Other notes / tips / FYI's:
|
In your vars file set the bridge version to If no issues, remove the line and re-run one last time for final upgrade. You should then be good to go... At least as far as I understand from the logs:
|
Thank you for the pointer! I wound up removing the Signal Mautrix database and the corresponding /mautrix-signal/ folder so that it started over fresh. I'm betting this would have worked but unfortunately I didn't see your message in time. |
Sorry for the late reply, then! |
As mentioned in issue #3031, mautrix-signal is about to be deprecated.
After testing an installation with the mautrix-signal enabled I was surprised to not even be able to complete a login or a register action.
This PR aims to provide the configuration and documentations files for mautrix-signalgo bridge.
Please let me know if I forgot to update anything.
Kindly,