-
Notifications
You must be signed in to change notification settings - Fork 27
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
Sending fails with error code 404 #182
Comments
Happening to me too. |
So Discord is finally fixing the duplicate messages? Hashtable = memory allocation = annoying. Instead, I'd recommend keeping our current 16-byte random nonce, but append an increasing integer (sequence number, current time, whatever); messages starting with the nonce are from us. More specifically, discord.h:61, add int seq; somewhere in the struct (can't test myself, I no longer use this tool) |
This issue affects me as well. |
Temporary disabled nonces until we have a proper solution. |
Should be properly fixed now, please reopen if there are still issues with sending messages. |
Unless I have failed to properly reload the plugin (I just compiled, installed, then restarted bitlbee with These examples were not associated with 404 errors. An example involving them involved messages at 20:43:18, 20:47:43, 20:48:00 and 20:48:11. Same again (but note the wide gap.) A subsequent message at 21:09:58 was sent successfully. |
@fish-face did you also reconnect your irc client? If you did and still seeing this please get a debug log (see Debugging section in README). |
Running into that issue (messages failing to send, without any error) is what prompted me to update my bitlbee-discord instance. Haven't seen any since, that I know of. |
As of a few hours ago, sending messages often fails with error code 404, sometimes even with 200 (not throwing an error). After some investigation and talking about this issue in #bitlbee, it looks like bitlbee-discord's usage of the same nonce for every message is the culprit. Removing the nonce in discord-http.c, lines 530-531, allows all messages to go through without issue (but leads to other issues of course).
EionRobb on IRC mentioned that purple-discord uses random nonces (as they should be) and inserts them into a hash table for later checking for self messages, so I guess that's the go to approach to handle this issue.
The text was updated successfully, but these errors were encountered: