Author Topic: Discord  (Read 10207 times)

0 Members and 1 Guest are viewing this topic.

Offline Einsiedler

Discord
« on: 26 03 2025, 10:43:06 »
Hey, since a few weeks, i cannot login into discord anymore via Miranda NG. I already tried the latest Version, but its not working. A friend of mine has the same issues .... when i look into the log, it says the following:

[11:35:40 3C88] [Discord_1] CDiscordProto::SetStatus iNewStatus = 40072, m_iStatus = 40071, m_iDesiredStatus = 40071 m_hWorkerThread = 0000000000000000
[11:35:40 2D90] [Discord_1] CDiscordProto::WorkerThread: entering
[11:35:40 2D90] [Discord_1] Executing request #1:
https://discordapp.com/api/v6/auth/login
[11:35:40 2D90] [Discord_1] Connection request to discordapp.com:443 (Flags 11)....
[11:35:40 2D90] [Discord_1] (0000000002246CB0) Connecting to server discordapp.com:443....
[11:35:40 2D90] [Discord_1] (0000000002246CB0) Connecting to ip 162.159.129.233:443 ....
[11:35:40 2D90] [Discord_1] (1784) Connected to discordapp.com:443
[11:35:40 2D90] [Discord_1] (1784 discordapp.com) Starting SSL negotiation
[11:35:40 2D90] [Discord_1] (1784 discordapp.com) SSL negotiation successful
[11:35:40 2D90] [Discord_1] (0000000002246CB0:1784) Data received
HTTP/1.1 400 Bad Request


So, is discord down for miranda ng atm, did they changed something that it is impossible to connect? And can or will this be fixed some day?
 

Offline dartraiden

Re: Discord
« Reply #1 on: 28 03 2025, 15:29:15 »
Try the development version.

The stable version is already 3 months behind the development version
 
The following users thanked this post: Einsiedler

Offline Einsiedler

Re: Discord
« Reply #2 on: 28 03 2025, 22:39:49 »
Hey, thank you, this worked out for me! :) So the development version is atm the only version which is working.

But I have a question regarding the history: In Miranda NG, I have always been using History++. But the history with Discord and Miranda is a little tricky.
Back when the old version of Miranda still worked for me, upon connecting to Discord, all the messages which had been written since the last time it was connected, were loaded.
But If you do a fresh install, like what I now did for testing, Miranda doesn't load the complete history from the server.

That also means that if I were to use my old profile with the new Miranda version, it would leave a gap in the local history, as it's been over a month since I last connected with Miranda, but the new version wouldn't load all the messages that have been exchanged since then.

Therefore I'd like to know if it'd be possible to add a function to Miranda NG like "Load complete history from server", or smth like "Synchronize history" ?
So that the local history would be the same as the history on the server.
 

Offline dartraiden

Re: Discord
« Reply #3 on: 29 03 2025, 06:39:08 »
Right-click by contact -> Load server history

It should load all history
 
The following users thanked this post: Einsiedler

Offline Einsiedler

Re: Discord
« Reply #4 on: 30 03 2025, 21:19:21 »
Thanks again! I didn't even knew that this function already existed .... ops ;)

I tried it, but sadly its not working..... A Friend of mine also tried it. If you click on it, it just happens nothing .... :/

I cannot say if this ever worked, because as I said, I did not knew that this function was already included in the past versions. So maybe its a bug of the Alpha, or its a new bug because discord changed some stuff and because of that also the old miranda versions stopped working connecting to discord.

Could you look into it why its not working?

(btw History++ also is not working, from the point where a History is created. If you click on the Clock/History-Button when History++ is installed, miranda just crashes :(, and yes, I installed the correct development version of History++ for 32-bit, like my installed miranda).
 

Offline dartraiden

Re: Discord
« Reply #5 on: 07 04 2025, 17:07:12 »
H++ is obsolete and written in Delphi, so we cannot debug it.
Use NewStory instead.

Quote
it just happens nothing
Can you make and attach the netlog?
« Last Edit: 07 04 2025, 21:43:59 by dartraiden »
 
The following users thanked this post: Einsiedler

Offline Einsiedler

Re: Discord
« Reply #6 on: 08 04 2025, 11:01:04 »
Thanks for the tip about NewStory. It works and seems almost identical to History++, so it seems like a good replacement :)

About  the netlog: I tried creating a netlog.txt, however all that I can say is that when I select "Load Server History", nothing happens. Nothing will be written into the netlog.txt, and if there is no netlog.txt, none will be created. So it seems that selecting "Load Server History" does nothing at the moment.
 

Offline dartraiden

Re: Discord
« Reply #7 on: 08 04 2025, 17:30:15 »
Are you sure that you checked both "server" and "gateway" connections and enabled "Log to file"?



 

Offline Einsiedler

Re: Discord
« Reply #8 on: 08 04 2025, 19:15:43 »
Ok, Gateway connections was disabled. I enabled it and tried again, but "Load Server History" sill does not add anything to the netlog.txt. I did however get a gateway related entry after a short while, maybe it helps you in a way.

Find attached the netlog.
 

Offline Einsiedler

Re: Discord
« Reply #9 on: 06 05 2025, 20:55:53 »
Hi there, some news:

If a friend of mine tries to load the history with a another friend of him, the netlog.txt will be created and shows the following:

[21:17:36 0C8C] [Discord_1] Executing request #4:
https:// discord.com/api/v9/channels/1257335013268000810/messages
[21:17:37 0C8C] [Discord_1] (0294A1B0:548) Data received

But when he tries the same thing with me, and want to load the server history, nothing will happen, no netlog.txt will be created...

I don't know what to do, and why miranda ng do different things depending on from which contact you are trying to load the server history ...
 

Offline dartraiden

Re: Discord
« Reply #10 on: 08 05 2025, 12:52:15 »
Code: [Select]
void CDiscordProto::OnReceiveHistory(MHttpResponse *pReply, AsyncHttpRequest *pReq)
{
CDiscordUser *pUser = (CDiscordUser*)pReq->pUserInfo;

JsonReply root(pReply);
if (!root) {
if (root.error() == 403) // forbidden, don't try to read it anymore
setByte(pUser->hContact, DB_KEY_DONT_FETCH, true);
return;
}

i.e. if the server refused to send the history once for some reason (error 403), then we create a "don't try to fetch again" key for the contact so as not to irritate server (the server really doesn't like it when the client makes requests that are strange from its point of view, so the fewer unsuccessful requests we make, the less risk we have of being banned)

you can try to delete this key via Database Editor and try to load history again
« Last Edit: 08 05 2025, 12:56:57 by dartraiden »
 
The following users thanked this post: Einsiedler

Offline Einsiedler

Re: Discord
« Reply #11 on: 12 05 2025, 05:06:27 »
Thanks, that helped! The offline messages are now arriving in Miranda NG again. And when clicking "Load Server History," some messages are loaded (it's still not entirely clear when and how many are loaded. In any case, all of the messages from the beginning are never loaded if you create the user from scratch and no history has been created yet). Would it be possible to add such a feature, that you could sync the History from server and miranda ng entirely...?

However, there's a new problem: In the contact list, the icon for the contact now flashes constantly, as if a new message has arrived, and not only when new messages actually arrive.
 

Offline dartraiden

Re: Discord
« Reply #12 on: 12 05 2025, 13:46:47 »
Quote
If you can't get rid of the blinking "New message received" icon, then install the DbChecker plugin, go to Main menu → Database → Check database, enable "Mark all events as read" option, and do a database check.
https://wiki.miranda-ng.org/index.php?title=Changelog/0.96.6
 
The following users thanked this post: Einsiedler