irungentoo / toxcore

The future of online communications.
https://tox.chat/
GNU General Public License v3.0
8.74k stars 1.27k forks source link

It takes an awfully long time to connect Windows 7 64-bit #1195

Closed ShedoSurashu closed 9 years ago

ShedoSurashu commented 9 years ago

Hi! I just got to installing qTox and noticed that it takes an awful lot of time to connect and indicate me as "online". I've tried both 32-bit and 64-bit builds. I've timed at upwards over 7 minutes before the indicator beside my name lights up. Is this normal behavior? My internet doesn't seem to have any problem either. Ontop of that I can't see any online friends either after my status turns green.

I've also tried uTox to no avail.

Nokta-strigo commented 9 years ago

Having several devices with qTox/uTox/AnTox, often in one LAN, behind a NAT, and sometimes have this problem: device can take several minutes (instead of seconds) to connect (show it's own status as green), and it can show some or all other contacts as offline, even if they are online and see each other. If I don't mistake, this "false offline" is mutual: either two devices see each other online, or both of them don't see the other one. It happens not too often, and seems to be random.

irungentoo commented 9 years ago

What kind of internet do you have?

weedy commented 9 years ago

Third world internet.

ShedoSurashu commented 9 years ago

Having several devices with qTox/uTox/AnTox, often in one LAN, behind a NAT, and sometimes have this problem: device can take several minutes (instead of seconds) to connect (show it's own status as green), and it can show some or all other contacts as offline, even if they are online and see each other. If I don't mistake, this "false offline" is mutual: either two devices see each other online, or both of them don't see the other one. It happens not too often, and seems to be random.

Yeah I think that seems to be the issue. Ever since the bundled modem that came with our internet service provider was replaced last week I've been having the issue.

Nokta-strigo commented 9 years ago

In my case it was DVB-C (something like 8/1 Mbit/s download/upload) with static IP. Then LAN over ethernet/WiFi behind a NAT. Ping to 8.8.8.8 ~24ms, to wiki.tox.im ~134ms.

Nokta-strigo commented 9 years ago

Tried to reproduse this (by reconnecting with qTox many times) now and didn't succeed. Sinse last time I've run into this bug i've changed my internet connection (at the moment it's 3g) and updated all participating qTox clients (not all of them were up to date before :-( ). @ShedoSurashu: try to update your and your friend's clients. May be this bug had already been fixed?

ghost commented 9 years ago

@irungentoo and @weedy Nice to know Tox doesn't support "third world" internet. Is that why Antox and other mobile clients were discontinued? Tox only works on "top first world" internet? Nobody is a rich white male, developers. Open your eyes.

Nokta-strigo commented 9 years ago

@dfortner "Nice to know Tox doesn't support "third world" internet." nobody said it.

ghost commented 9 years ago

Well, it was implied that this doesn't work because of "third world" internet (a pejorative term).

And since then nothing has been done to fix it.

Nokta-strigo commented 9 years ago

Since then nobody approved that there's such a problem on recent releases.

ShedoSurashu commented 9 years ago

@ShedoSurashu: try to update your and your friend's clients. May be this bug had already been fixed?

@Nokta-strigo We always have the latest version of uTox, and we even tried qTox to no avail. I guess I'll wait for this to get fixed someday. For now we're using Bleep at the mean time temporarily. Sorry for not getting back, was swamped with things to do over the past days.

irungentoo commented 9 years ago

@ShedoSurashu Do you have other Tox clients running on your LAN?

Does it work if you disable UDP in the settings?

ShedoSurashu commented 9 years ago

@irungentoo Disabling UDP didn't do anything it seems. And also I'm the only one who has a Tox client running.

LittleVulpix commented 9 years ago

@irungentoo I have a friend with a similar problem. (not sure if I should create a new ticket). I remember there was actually a similar ticket here already, but I cannot find it. I think it got deleted back when that one person left github and closed their account.

Basically what happens is - with the more recent toxcore-based uTox (or any form of tox), the client is not able to stay online for a long time. Usually disconnects after 2-3 minutes. Sometimes hours but sometimes minutes. Internet is stable however (running constant ping shows no anomalies). The old toxcore also has this problem - BUT! when I disable ipv6 and udp, it works just fine. The new toxcore doesn't work well even with those two options disabled. Just for the record, he has no other tox clients running in his lan.

I recall that old ticket and that someone mentioned some routers have problems with tox packets and somehow this is fixed by firmware upgrade of the said routers - but it was also pointed out (in that ticket) that quite often those routers belong to the ISP and you are not allowed to flash any firmware.

I have no issues with getting some kind of debug log going to see what exactly is causing those disconnects - because it is driving my friend insane (and it's making him pretty unhappy with Tox).

Let me know how to do any kind of logging for this type of problem and I'll do it.

Also if this needs a new issue; in which case I'll log it.

LittleVulpix commented 9 years ago

@irungentoo I see you committed some changes which may/may not help with the issues! However, I have one more detail which I think makes your attempt less likely to fix the issue. My friend (the one having DCs with the latest toxcore) only has me on his friend list, meaning your fix ( dfc6be901cae5133286cbb16e6b651ff26bf2311 ) wouldn't really impact him (as he is only using one path at the moment anyway, right?)

irungentoo commented 9 years ago

The fix impacts everyone on the network as the network updates.

Less paths means UDP using peers will need to relay packets to less ips. I'm assuming the high number of ips tox sends packets to is the issue on some routers.

LittleVulpix commented 9 years ago

Thanks! We'll give it a try and report back when tested. I appreciate the quick response :+1:

LittleVulpix commented 9 years ago

@irungentoo The new toxcore works for my friend (without DCs). He still has to disable UDP, otherwise he gets disconnected; but in TCP-only mode, it works (and it did not work before); so I assume your fix worked for him!

Do you have any idea why it would kick him off when he is running in UDP mode? Because it's a pity seeing as when in TCP-only mode, filetransfer speeds become a lot slower as we have to use tox node relays instead of direct connection.

irungentoo commented 9 years ago

@LittleVulpix what build did he try?

LittleVulpix commented 9 years ago

@irungentoo I noticed there is now a "part 2" of the routerkill fix. We built the dll prior to that so we'll try again with that and let you know. There was already improvement in part 1 though (as in, it doesn't DC my friend with TCP-only mode enabled), so that's already good. Anyway we'll try and let you know.

LittleVulpix commented 9 years ago

@irungentoo Me and my friend tried the latest version of libtox (64) and everything is now fine with UDP enabled, when just chatting and also when transferring smaller files. However when we send something big, we experience #1220 instead. He goes offline for ~0.5-1 seconds which causes the transfer to stop (though that can be worked around if the client is good enough), it is still an annoyance. Otherwise though, major improvement.

irungentoo commented 9 years ago

Good, I'll close this then.