sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
291 stars 27 forks source link

Plugin constantly fails to get backlogs with error 400 #204

Closed Layerex closed 4 years ago

Layerex commented 4 years ago

So, that is it. That is what happens every startup: https://hastebin.com/geqobojiho.makefile Updating to the latest version didn't help

sm00th commented 4 years ago

I don't see this with my accounts. Is this persistent for you?

Layerex commented 4 years ago

Yes, it fails to fetch backlog every time I join any discord chat. Is it a problem with my account or irssi?

sm00th commented 4 years ago

Well, as I said I don't see it with mine. You might be being ratelimited if you are trying to join a lot of channels at once. You can try running in debug mide (see readme for instructions). Hopefully messages alobg with 400 response will give us a clue on what is going on.

Layerex commented 4 years ago

Log of a bad request error looks like that: https://hastebin.com/bogiqigeko.makefile. It gives no clues to me. I have tried to decode unicode text in "limit" section. It makes no sense. Also I tried different irc client(weechat) - it didn't solve the issue either.

sm00th commented 4 years ago

The text in limit section says that the int value needs to be less than 100. You didn't include the request that was sent, but my guess is that you max_backlog is set to something big and discord doesn't like that.

Layerex commented 4 years ago

Yes, max_backlog was set to 500, I changed it to 100. The errors disapeared, but message history is still not fetched. Is something wrong or I just don't get it?

sm00th commented 4 years ago

It fetches since last unread message and up-to max_backlog, so if you are not getting those there must be no new unread messages

Layerex commented 4 years ago

Understood. My problem is solved, so I am closing the issue. But I think adding some option like backlog_read_messages would be worth it