matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
462 stars 151 forks source link

A user from IRC is ignored #1318

Open erdnaxeli opened 3 years ago

erdnaxeli commented 3 years ago

Describe the bug I recently upgraded to v0.26.0, and a user from IRC is ignored. Actually after rebooting the user was not ignored anymore, but another one was.

By ignored I mean that none of his messages are bridged to matrix. If he leaves or join a bridged room, nothing happens. If he changes his nick, all works, but as soon as he goes back to his previous nick he is ignored again. Querying him from matrix works, but his messages does not come through matrix.

I didn't found anything about him in the debug logs.

To Reproduce no idea

Expected behavior it works

Half-Shot commented 3 years ago

Curious, could you provide logs for the bridge? (ideally the whole lot, feel free to DM me)

erdnaxeli commented 3 years ago

I did see anything in the log, but here are the log around a not bridged message:

INFO:IrcBridge 10.42.200.69 - - [17/May/2021:08:28:00 +0000] "PUT /transactions/5854949?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.33.2"

INFO:IrcBridge 10.42.200.69 - - [17/May/2021:08:28:05 +0000] "PUT /transactions/5854950?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.33.2"

INFO:IrcBridge 10.42.200.69 - - [17/May/2021:08:28:09 +0000] "PUT /transactions/5854951?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.33.2"

INFO:IrcBridge [29nf0znoaz9c0] [M->I] DELAYED  (9999ms)
INFO:IrcBridge [f5orv91m4zk00] [I->M] IGNORE virtual user  (0ms)
INFO:req onMessage: irc.iiens.net from=Balembot (null@irc.iiens.net) to=#balemboy
DEBUG:req action={"type":"message","text":"IN","ts":0}
DEBUG:req Relaying in room(s) !xeIPFcNskNbFjFHqvN:iiens.net
INFO:IrcBridge [-] PUT https://matrix.iiens.net/_matrix/client/r0/rooms/!xeIPFcNskNbFjFHqvN%3Aiiens.net/send/m.room.message/m1621240092532.26 (@irc_Balembot:iiens.net) Body: "{\"msgtype\":\"m.text\",\"body\":\"IN\"}"
INFO:IrcBridge [-] PUT https://matrix.iiens.net/_matrix/client/r0/rooms/!xeIPFcNskNbFjFHqvN%3Aiiens.net/send/m.room.message/m1621240092532.26 (@irc_Balembot:iiens.net) HTTP 200 "{\"event_id\":\"$16212400922046mcqcu:iiens.net\"}"
INFO:IrcBridge [hatjc5wizx400] [I->M] SUCCESS  (104ms)
INFO:IrcBridge 10.42.200.69 - - [17/May/2021:08:28:12 +0000] "PUT /transactions/5854952?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.33.2"

INFO:req onMessage: m.room.message usr=@irc_Balembot:iiens.net rm=!xeIPFcNskNbFjFHqvN:iiens.net id=$16212400922046mcqcu:iiens.net
DEBUG:req Message body: IN
DEBUG:req @irc_Balembot:iiens.net is a virtual user (claimed by irc.iiens.net)
INFO:IrcBridge [cgp2xcc432w00] [M->I] IGNORE virtual user  (6ms)
INFO:IrcBridge 10.42.200.69 - - [17/May/2021:08:28:12 +0000] "PUT /transactions/5854953?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.33.2"

INFO:IrcBridge [f07ma51c9cg00] [I->M] IGNORE virtual user  (0ms)
INFO:IrcBridge [y4ez74y5nm80] [M->I] DEAD  (300001ms)
INFO:req onMessage: irc.iiens.net from=Balembot (null@irc.iiens.net) to=#balemboy
DEBUG:req action={"type":"message","text":"shutdown","ts":0}
DEBUG:req Relaying in room(s) !xeIPFcNskNbFjFHqvN:iiens.net
INFO:IrcBridge [-] PUT https://matrix.iiens.net/_matrix/client/r0/rooms/!xeIPFcNskNbFjFHqvN%3Aiiens.net/send/m.room.message/m1621240094805.27 (@irc_Balembot:iiens.net) Body: "{\"msgtype\":\"m.text\",\"body\":\"shutdown\"}"
INFO:IrcBridge [-] PUT https://matrix.iiens.net/_matrix/client/r0/rooms/!xeIPFcNskNbFjFHqvN%3Aiiens.net/send/m.room.message/m1621240094805.27 (@irc_Balembot:iiens.net) HTTP 200 "{\"event_id\":\"$16212400942047NXbxR:iiens.net\"}"
INFO:IrcBridge [7ojex12bsfc00] [I->M] SUCCESS  (77ms)
INFO:IrcBridge 10.42.200.69 - - [17/May/2021:08:28:14 +0000] "PUT /transactions/5854954?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.33.2"

INFO:req onMessage: m.room.message usr=@irc_Balembot:iiens.net rm=!xeIPFcNskNbFjFHqvN:iiens.net id=$16212400942047NXbxR:iiens.net
DEBUG:req Message body: shutdown
DEBUG:req @irc_Balembot:iiens.net is a virtual user (claimed by irc.iiens.net)
INFO:IrcBridge [chnucxz5z3400] [M->I] IGNORE virtual user  (4ms)
INFO:IrcBridge [83n4rvxnhaw00] [M->I] DELAYED  (10000ms)

Between the two messages "IN" and "shutdown" from "Balembot" a user on IRC side said something.

Half-Shot commented 3 years ago

Hmm, I think this is missing more log lines though. E.g. I'd expect more from the f07ma51c9cg00 request than one line.

erdnaxeli commented 3 years ago

That's the only occurrence:

root@robin:/home/bridge/matrix-appservice-irc [(HEAD détachée sur 0.26.0)] # grep f07ma51c9cg00 debug.log.2021-05-1*
debug.log.2021-05-17:INFO:IrcBridge [f07ma51c9cg00] [I->M] IGNORE virtual user  (0ms)
AlexDaniel commented 3 years ago

I don't want to leave a “me too” comment, but this has been an issue for years now. Last time I observed it was yesterday.

erdnaxeli commented 3 years ago

We just discovered that a second user from IRC is ignored by our bridge.

thomwiggers commented 3 years ago

I've also noticed this happening with new users, such as GuestXXXX nicks. After they renamed to their usual nick they got picked up again

thomwiggers commented 3 years ago

I have recently seen this happen a lot with users previously unknown to Matrix. Funnily enough, I saw that in a channel that was created on IRC by an IRC users, and then joined by a Matrix user, Matrix did give the IRC user admin rights to the channel, but messages from the IRC user didn't come through and neither did it show up in the list to joined users.

plinss commented 3 years ago

Seeing the same thing with a few different users. The last time I saw it, the IRC user was connected via a different Matrix/IRC bridge. i.e. they were using Matrix in room bridged to IRC, but not the same Matrix room and on a different homeserver. My Matrix/IRC bridge (a local instance connected to my homeserver) ignored that user completely.

In theory, my bridge should have just seen them as another IRC user, but I'm wondering if there's something different about the IRC side of Matrix users that causes other bridges to ignore them, like maybe the bridge can detect that they're Matrix users and thinks they'll be in the Matrix side of the room so doesn't relay the messages. In this case, since they weren't using the same bridge, they weren't in the same Matrix room... or it could have just been a coincidence.

erdnaxeli commented 2 years ago

I'm wondering if there's something different about the IRC side of Matrix users that causes other bridges to ignore them

I don't think that's possible, and I my case the ignored users are plain normal IRC users.

erdnaxeli commented 2 years ago

This bug is still happening in v0.30.0. I'm upgrading to v0.31.0 this afternoon.

erdnaxeli commented 2 years ago

Still happenning in v0.33.0.

joepie91 commented 2 years ago

The last time I saw it, the IRC user was connected via a different Matrix/IRC bridge. i.e. they were using Matrix in room bridged to IRC, but not the same Matrix room and on a different homeserver.

Counter-evidence to this: I'm currently seeing the issue (on the pixie.town bridge) with an alt of mine that I know is connected through a regular IRC client. So it's not limited to elsewhere-bridged users.