matrix-appservice-irc icon indicating copy to clipboard operation
matrix-appservice-irc copied to clipboard

(first?) messages from IRC are occasionally dropped

Open simonmichael opened this issue 4 years ago • 7 comments

Currently (2021-09), in rooms plumbed to Libera, every so often (I see it about once a week), an occasional IRC message will not appear on the matrix side.

So in a recent example, matrix users saw some discussion from IRC, but not the very first comment. I don't know if "first comment" is a factor. I don't know if it also happens with portalled rooms.

I don't have specific incident details right now. Is it possible to tell from logs or other reporting how much this has been happening ? And report it somewhere like https://status.matrix.org ?

simonmichael avatar Sep 04 '21 19:09 simonmichael

In case you are a moderator in the Matrix side you can follow the documentation to allow messages to be seen from Matrix even when not all Matrix users are successfully joined to IRC.

  • https://matrix-org.github.io/matrix-appservice-irc/latest/room_configuration.html#the-orgmatrixappservice-ircconfig-event

I have a personal suspicion that this issue may be caused by bots that follow mentions of rooms and attempt to join every room they see. They have likely exceeded the Libera.Chat limit of 250 channels and thus the bridge fails to join them on Libera.Chat and the bridge as a privacy measure stops relaying messages until it decides to kick the bot. Such bots include:

  • @voyager:t2bot.io
  • @server_stats:nordgedanken.dev
  • @archive:matrix.org (https://github.com/matrix-org/matrix-public-archive/issues/260, https://github.com/matrix-org/matrix-public-archive/issues/264)
    • @matrix-public-archive:evulid.cc

Mikaela avatar Sep 04 '21 19:09 Mikaela

Most messages are transmitted, it's just that sometimes one message within a chat doesn't appear.

simonmichael avatar Sep 04 '21 19:09 simonmichael

Update: this is still happening, in multiple rooms/channels, and I'm not the only one seeing it. It seems to affect only the first message sent by an IRC user after a silence, or perhaps the first message sent by a newly joined IRC user. As a matrix user, you'll see a message from a new nick that seems to refer to previous context, and if you look in an IRC log or persistent IRC client you'll see they had sent one additional message before the one shown.

simonmichael avatar Jan 04 '22 03:01 simonmichael

PS it would be wonderful, and would encourage even faster matrix adoption, if the bridge collected and published statistics on this kind of thing.

simonmichael avatar Jan 04 '22 03:01 simonmichael

With help from #irc:matrix.org I understand @Mikaela's comment better now. This could well be related to the famous "privacy filter" which blocks bridging of IRC messages unless all matrix users are successfully authenticated with the IRC server. Aside from what @Mikaela said, we could imagine all kinds of conditions - authentication lag as a new user joins ? - disabling transmission temporarily.

The suggestion seems to be to disable the privacy filter on a room by room basis, in the admin settings. I guess this is possible for both portalled and plumbed rooms. I'll explore this when I have a chance. I thought it was against Libera policy though...

simonmichael avatar Jan 04 '22 07:01 simonmichael

I can confirm this bug, even in a room (#hcoop) which has very few matrix users (no bots-in-many-rooms). It only happens for plumbed rooms; the portaled room at #hcoop:libera.chat receives all messages from irc. From my observation, it is only ever the first message sent by a user.

I tried disabling the privacy filter (by setting "allowUnconnectedMatrixUsers": true), but the appservice bot changes the setting again too quickly to see if it helps.

smichel17 avatar Apr 05 '22 22:04 smichel17

For what it's worth, I have also observed this in the past and it has resulted in quite unfortunate gaps in communication. It would be really great to nail this; my experience with Matrix has been great but I simply can't afford to use it if I can't trust that I will receive messages intended for me.

bgamari avatar May 31 '23 13:05 bgamari