!ChuQQIVJvwyJujhNIG:synapse.keyvan.pw

Matrix Puppet Bridge

441 Members
https://github.com/matrix-hacks/matrix-puppet-bridge250 Servers

Load older messages


SenderMessageTime
13 Jul 2020
@homebeach:matrix.orghomebeachhas the bridge been still maintained?17:29:57
@zir0h:ziroh.beYannick joined the room.18:45:01
@witchent:matrix.orgwitchent
In reply to @tobias:jachowski.de

Hello all, I'm successfully using matrix-puppet-signal but could not find the following information. Probably someone knows:

  • What exactly is the room "Signal Protocol" for? Will a post in this room be transferred to all my signal contacts?
No, the signal protocol room is for errors and logs. If everything works fine then the only thing that should happen there is if you get a new signal contact (he will join the room). You can hopefully just ignore the room
19:48:42
@witchent:matrix.orgwitchent What do you mean restrict access? You mean set it to invite only? Actually I haven't tested it but I think it should work (We let bots join through invites, so if the appservice-bridge handles it it should work). Feel free to test it and give feedback though. If it is a production server make a backup just in case though, one never knows. 19:50:04
@witchent:matrix.orgwitchent
In reply to @homebeach:matrix.org
has the bridge been still maintained?
Very much so, yes
19:50:18
@witchent:matrix.orgwitchent
In reply to @tobias:jachowski.de
  • And can I restrict the access to the room ?
* What do you mean restrict access? You mean set it to invite only? Actually I haven't tested it but I think it should work (We let bots join through invites, so if the appservice-bridge handles it it should work). Feel free to test it and give feedback though. If it is a production server make a backup just in case though, one never knows.
19:55:50
14 Jul 2020
@rmblror:frikbh.netrmblror

witchent: Hey, I made some progress with getting the signal bridge to work in docker. Putting it in a node:latest container with the right network flag and having it automatically mount everything and run 'node index.js' worked like a charm, and I registered the service and used the bridge for about a day. I was going to do something more robust to handle restarts, and lo, my server had a forced reboot and the whole thing stopped working xD Now when I run 'node index.js' I get the following error repeated a few times before it hangs:
INFO 2020-07-14T09:24:04.356Z Next signed key rotation scheduled for 2020-07-14T09:24:04.356Z
INFO 2020-07-14T09:24:04.356Z refreshSenderCertificate: Getting new certificate...
INFO 2020-07-14T09:24:04.357Z GET https://textsecure-service.whispersystems.org/v1/certificate/delivery?includeUuid=true
INFO 2020-07-14T09:24:04.365Z connect { firstRun: true, connectCount: 0 }
INFO 2020-07-14T09:24:04.366Z Initializing socket and listening for messages
Possibly Unhandled Rejection at: Promise Promise {
<rejected> TypeError: Cannot read property 'split' of undefined
at Object.unencodeNumber (/matrix-puppet-signal/node_modules/signal-desktop/ts/textsecure/Helpers.js:83:40)
at new MessageReceiverInner (/matrix-puppet-signal/node_modules/signal-desktop/ts/textsecure/MessageReceiver.js:37:52)
at new MessageReceiver (/matrix-puppet-signal/node_modules/signal-desktop/ts/textsecure/MessageReceiver.js:1278:23)
at connect (/matrix-puppet-signal/node_modules/signal-client/index.js:1395:21)
at Object.<anonymous> (/matrix-puppet-signal/node_modules/signal-client/index.js:1350:5)
at triggerEvents (/matrix-puppet-signal/node_modules/signal-desktop/js/reliable_trigger.js:77:39)
at Object.trigger (/matrix-puppet-signal/node_modules/signal-desktop/js/reliable_trigger.js:131:17)
at getStorageReady (/matrix-puppet-signal/node_modules/signal-client/index.js:1559:20)

Any ideas?

09:35:19
@witchent:matrix.orgwitchentNever happened to me, so might be a bit hard to debug, but let me dive into the code and see if I get something10:13:32
@witchent:matrix.orgwitchentOkay, so it seems your storage is either not set up or corrupt. It might have something to do with the bridge itself but for now I would assume it is more likely that you/docker accidentally deleted the storage or something like that. Ttry deleting the data folder and relinking and then running it again, and tell me if the error persists10:24:56
@witchent:matrix.orgwitchentOr actually don't delete the data folder, just relink and run again. If that does not work try with deleting the folder. If that also does not help we'll continue looking for the problem10:26:34
@rmblror:frikbh.netrmblrorAlright, I had tried deleting the data directory before and re-registering the service with synapse. It ended up recreating the same data directory with the same contents in data/key and the registration as_token and hs_token. So now I've re-linked it and it seems to communicate with signal correctly. Watching the standard output, I can see when I'm writing and sending messages to myself in signal on my phone, but I don't see it in riot. 13:34:29
@rmblror:frikbh.netrmblrorI get the following: typing event +myphonenumber true Possibly Unhandled Rejection at: Promise Promise { <rejected> Error: Failed to join room at Intent._ensureJoined (/matrix-puppet-signal/node_modules/matrix-appservice-bridge/lib/components/intent.js:667:42) at processTicksAndRejections (internal/process/task_queues.js:93:5) } reason: Error: Failed to join room at Intent._ensureJoined (/matrix-puppet-signal/node_modules/matrix-appservice-bridge/lib/components/intent.js:667:42) at processTicksAndRejections (internal/process/task_queues.js:93:5) INFO 2020-07-14T13:34:11.823Z queueing envelope a9686f14975a43dca041b6ec5d1f1397 INFO 2020-07-14T13:34:11.823Z received unidentified sender message13:35:24
@rmblror:frikbh.netrmblrorThen I tried moving data/puppet-*.db and data/sql and re-registering the service with synapse, and the tokens it generated were different. Restarting synapse and trying again, I got the same error as earlier (the first I wrote). I restored data/sql and got back to the second error I posted.13:48:16
@rmblror:frikbh.netrmblrorI wonder if there's an issue that synapse has @signalbot registered already, and it's seeing this as a new user trying to register in the same namespace? I also don't get any reply about commands not being accepted when I message @signalbot directly13:50:13
@rmblror:frikbh.netrmblrorIs there a good way to quickly erase all record of the signalbot having been there? I could just restart it all the way from scratch and then re-test with various restart conditions that it comes back alive13:55:48
@danastasio:matrix.davidanastasio.comDavid

when I needed to nuke a bot from matrix, I needed to run the following SQL commands on the matrix database. This will delete a LOT of data so make sure its what you want, deleting production data is always dangerous:

delete from room_aliases where room_alias like '%facebook%'
delete from room_memberships where room_id in ( select room_id from room_memberships where user_id like '%facebook%' );
delete from access_tokens where user_id like '%facebook%'

obviously replace facebook with whatever your bot name is

13:59:33
@danastasio:matrix.davidanastasio.comDavid *

when I needed to nuke a bot from matrix, I needed to run the following SQL commands on the matrix database. This will delete a LOT of data so make sure its what you want, deleting production data is always dangerous:

delete from room_aliases where room_alias like '%facebook%'
delete from room_memberships where room_id in ( select room_id from room_memberships where user_id like '%facebook%' );
delete from access_tokens where user_id like '%facebook%'

obviously replace facebook with whatever your bot name is

13:59:50
@witchent:matrix.orgwitchentThe errors you are getting now are from your homeserver, I don't really know what's happening there. I guess you could look at the synapse log and see if something is happening there? The Error is sadly really not helpful :( You might try David's suggestion, but again, backups are really important before messing with the synapse database14:09:31
@witchent:matrix.orgwitchent(I learned it the hard way)14:09:39
@rmblror:frikbh.netrmblrorI think I'll first try renaming @signalbot to something else xD One other thing, I noticed that with each of the contacts it receives while starting up, it goes roughly like this contact received { number: '+friendsnumber', uuid: 'some long signal UUID', name: null, avatar: null, color: 'blue', verified: null, profileKey: ArrayBuffer { [Uint8Contents]: <99 ca many more of these 2char pairs>, byteLength: 32 }, blocked: false, expireTimer: null, inboxPosition: 0 } Could not join user to status room, error: M_UNKNOWN_TOKEN: Unrecognised access token at parseErrorResponse (/matrix-puppet-signal/node_modules/matrix-appservice-bridge/node_modules/matrix-js-sdk/lib/http-api.js:849:13) at /matrix-puppet-signal/node_modules/matrix-appservice-bridge/node_modules/matrix-js-sdk/lib/http-api.js:804:17 at /matrix-puppet-signal/node_modules/matrix-appservice-bridge/node_modules/matrix-js-sdk/lib/http-api.js:738:9 at Request._callback (/matrix-puppet-signal/node_modules/matrix-appservice-bridge/lib/components/client-factory.js:78:13) at Request.self.callback (/matrix-puppet-signal/node_modules/request/request.js:185:22) at Request.emit (events.js:314:20) at Request.<anonymous> (/matrix-puppet-signal/node_modules/request/request.js:1154:10) at Request.emit (events.js:314:20) at IncomingMessage.<anonymous> (/matrix-puppet-signal/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:420:28) at IncomingMessage.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1226:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) { errcode: 'M_UNKNOWN_TOKEN', data: { errcode: 'M_UNKNOWN_TOKEN', error: 'Unrecognised access token', soft_logout: false }, httpStatus: 401 } So maybe it's still something with the token generated in the registration with synapse?14:22:02
@rmblror:frikbh.netrmblrorMy synapse logs get this dumped in with every event from signal on my phone 2020-07-14 14:21:18,765 - synapse.http.server - 482 - WARNING - GET-7282 - Not sending response to request <XForwardedForRequest at 0x7f0d654e0d50 method='GET' uri='/_matrix/client/r0/sync?filter=0&timeout=30000&since=s27390_615547_165_17615_27_23_980_69037_7' clientproto='HTTP/1.0' site=8008>, already disconnected. 2020-07-14 14:21:23,791 - synapse.api.auth - 387 - WARNING - GET-7411 - Invalid macaroon in auth: <class 'synapse.api.auth._InvalidMacaroonException'> 2020-07-14 14:21:23,809 - synapse.api.auth - 508 - WARNING - POST-7414 - Unrecognised appservice access token. 2020-07-14 14:21:27,353 - synapse.api.auth - 387 - WARNING - GET-7422 - Invalid macaroon in auth: <class 'synapse.api.auth._InvalidMacaroonException'> 2020-07-14 14:21:27,372 - synapse.api.auth - 508 - WARNING - POST-7425 - Unrecognised appservice access token. So maybe I've just done something stupid when re-registering the service14:23:57
@rmblror:frikbh.netrmblrorOh I did! 14:29:38
@witchent:matrix.orgwitchentYes, now we're talking :D Okay this error is pretty common when the access token of the bridge does not match the one from synapse14:29:50
@witchent:matrix.orgwitchentSo all you need to do is make sure that the access token for the bridge is valid and synapse is using the correct registration file14:30:16
@witchent:matrix.orgwitchentOh I think matrix.org is slow. So what did you do?14:31:36
@rmblror:frikbh.netrmblrorSo I had a cached command for running the docker container interactively, which was mounting a working dir from my home folder. Then when I restarted synapse, I had it mount signal-registration.yaml from the system directories, which hadn't been the updated. Soooooo, fixing that.... give me a minute 😅14:33:33
@witchent:matrix.orgwitchentSure, hopefully that will do the trick14:34:34
@rmblror:frikbh.netrmblrorYEAH! Awesome, thanks so much! It worked seamlessly with all the old rooms and matrix users that had been generated. Nice!14:42:24
@witchent:matrix.orgwitchentPerfect, glad it worked out :)14:43:36
@witchent:matrix.orgwitchentHave fun14:43:50

There are no newer messages yet.


Back to Room List