Jaehyuk-Lee / DFAssist

FFXIV Duty Finder & F.A.T.E. Assist
https://jaehyuk-lee.github.io/DFAssist
The Unlicense
46 stars 22 forks source link

Not working - stuck at wait for client connection #14

Closed rinamarielle closed 5 years ago

rinamarielle commented 5 years ago

stuck @ waiting for client connection

so far the two different error messages I've recieved are: <W: Error requesting Web service: The request was aborted: Could not create SSL/TLS secure channel.> <N: Error while Receiving Packet: The IAsyncResult object was not returned from the corresponding asynchronous method on this class.

rinamarielle commented 5 years ago

Also to add, it works fine for my big brother. I suspect that since there was one big, and one smaller windows update not too long ago, that they may have messed with something, since it's after those updates I've started experiencing issues

rinamarielle commented 5 years ago

accidentally closed it when commenting xD new to github, sorry about that xD

DieMoe233 commented 5 years ago

Please check your Windows Firewall

rinamarielle commented 5 years ago

Checked, and on the allowed apps through list windows defender firewall, DFAssist had only the public networks checked, changed it to allow it for private networks too, but still stuck on waiting on Client Connection / same errors

Jaehyuk-Lee commented 5 years ago

<W: Error requesting Web service: The request was aborted: Could not create SSL/TLS secure channel.> This is normal. I don't know why but auto-update don't works at the first request. This error is about that. You can get update at the next request.(interval: 30 minutes)

I'm checking for this: <N: Error while Receiving Packet: The IAsyncResult object was not returned from the corresponding asynchronous method on this class.

Although I don't know how to solve it yet, I found where the code makes problem.

File: DFAssist/App/Network/Network.cs Function: private void OnReceive(IAsyncResult ar) this function is making that issue.

Jaehyuk-Lee commented 5 years ago

@rinamarielle I made test version to solve that issue. Since I'm not having that issue, could you test this version?

rinamarielle commented 5 years ago

https://imgur.com/a/oSqp9R6

Did a test now and it was the same with this version, but troubleshooted a bit with my brother and we found that somehow the game had lots of duplicated connections.. (See screenshot)

After uninstalling the latest Logitech Gaming hub app this duplication disappeared and the game only shows two tcp connections again and DFAssist works again :D

If the app could ignore these other connections it should probably work as intended even if vendors do weird things like this :)

Jaehyuk-Lee commented 5 years ago

Thank you. I would like to add some filter for connections but I'm wondering how to determine what connection is real-working connection. I'm thinking about adding data center ip list on this application, but like 4.58 adding new data center, people will not be able to connect to new data center with DFAssist. Or maybe ....

  1. check if connection list includes data center ip.
  2. if includes, remove other connections except data center ip.
  3. else, do same as now.

This is not perfect but it'll work fine until SE adds new data center.

Ozurian commented 5 years ago

@Jaehyuk-Lee

For the error with requesting web service on the first update check that happens because while you use the correct fix, you apply it after the first attempt towards the server is made, so you only need to modify WebApi.cs and move the fix up a bit:

ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
ServicePointManager.DefaultConnectionLimit = 9999;

var url = string.Format(urlfmt, args);
var request = (HttpWebRequest)WebRequest.Create(url);
request.UserAgent = "DFA";
request.Timeout = 10000;
request.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);

This is because WebRequest.Create(url); does a negotiate towards the server :)

Jaehyuk-Lee commented 5 years ago

@Ozurian Ah, thank you! This works well!

ihaloemail commented 5 years ago

I'm wondering if the "Logitech Gaming hub app" is causing my issue of "Waiting for Client Connection" too. I've gone through all the firewall solutions and none of those seem to work.

Any word on how to resolve this issue without uninstalling the Logitech Gaming Hub application?

Jaehyuk-Lee commented 5 years ago

@ihaloemail test this version. if this version works, the reason it wasn't working is that your game client have more than 2 connections including invalid connections. The exe file I linked above, won't get auto update. I'm considering adding game server(data center) ip check in the live version but as I said before...

Thank you. I would like to add some filter for connections but I'm wondering how to determine what connection is real-working connection. I'm thinking about adding data center ip list on this application, but like 4.58 adding new data center, people will not be able to connect to new data center with DFAssist. Or maybe ....

  1. check if connection list includes data center ip.
  2. if includes, remove other connections except data center ip.
  3. else, do same as now.

This is not perfect but it'll work fine until SE adds new data center.

SE adding new data center makes problem. So, checking data center IP is not yet applied.

ihaloemail commented 5 years ago

Getting the Following Error:

[09:43:12] P: Finding FFXIV Process... [09:43:12] P: FFXIV Process Selected: ffxiv_dx11:2016 [09:43:12] N: Starting Network Reading... [09:43:12] N: Could not find Game Server Connection [09:43:12] U: Current Version: v20190102.1_GAMESERVER_IPCHECK [09:43:12] U: Up-to-date Version: v20190102.1 [09:43:12] [09:43:13] D: Using Latest D/F Data(Version 20181229.1). [09:43:42] N: Starting Network Reading... [09:43:42] N: Could not find Game Server Connection [09:44:12] N: Starting Network Reading... [09:44:12] N: Could not find Game Server Connection

@ihaloemail test this version. if this version works, the reason it wasn't working is that your game client have more than 2 connections including invalid connections. The exe file I linked above, won't get auto update. I'm considering adding game server(data center) ip check in the live version but as I said before...

Thank you. I would like to add some filter for connections but I'm wondering how to determine what connection is real-working connection. I'm thinking about adding data center ip list on this application, but like 4.58 adding new data center, people will not be able to connect to new data center with DFAssist. Or maybe ....

  1. check if connection list includes data center ip.
  2. if includes, remove other connections except data center ip.
  3. else, do same as now.

This is not perfect but it'll work fine until SE adds new data center.

SE adding new data center makes problem. So, checking data center IP is not yet applied.

Jaehyuk-Lee commented 5 years ago

how about the live version? does it capture any connection?

Ozurian commented 5 years ago

@ihaloemail

Do you also see lots of extra connections to the game if you use a program to view this? The one used in the earlier screenshot is found here https://processhacker.sourceforge.io/ Just run it and swap to the network tab and you can filter on filename for the game.

On a PC with the Gaming Hub app it had quite a few more like the screenshot shows vs only two as expected without.

@Jaehyuk-Lee It seems these connections always use remote port 9010 however, so maybe it would work if DFAssist simply ignored any connections with port 9010? That should be easier for now vs updating data center IPs I would think

ihaloemail commented 5 years ago

how about the live version? does it capture any connection?

No connections captured on the live version

ihaloemail commented 5 years ago

@ihaloemail

Do you also see lots of extra connections to the game if you use a program to view this? The one used in the earlier screenshot is found here https://processhacker.sourceforge.io/ Just run it and swap to the network tab and you can filter on filename for the game.

On a PC with the Gaming Hub app it had quite a few more like the screenshot shows vs only two as expected without.

@Jaehyuk-Lee It seems these connections always use remote port 9010 however, so maybe it would work if DFAssist simply ignored any connections with port 9010? That should be easier for now vs updating data center IPs I would think

I see 36 Items using ProcessHacker filtered by 'FFXIV'. 34 of them using port 9010 TCP; 2 using 55023 TCP

Jaehyuk-Lee commented 5 years ago

I've installed Logitech G HUB and tested with DFAssist. This application makes additional connection to the computer itself. Test version I've linked(DFAssist_GAMESERVER_IPCHECK) works fine with this Logitech problem. (this version filters every remote IP excluding data center's IP)

[live version] [12:22:17] N: 게임서버 연결 감지: 127.0.0.1:2198 -> 127.0.0.1:9010 [12:22:17] N: 게임서버 연결 감지: 127.0.0.1:2202 -> 127.0.0.1:9010 [12:22:17] N: 게임서버 연결 감지: 127.0.0.1:2254 -> 127.0.0.1:9010 [12:22:17] N: 게임서버 연결 감지: 127.0.0.1:2261 -> 127.0.0.1:9010 [12:22:17] N: 게임서버 연결 감지: 192.168.0.2:2262 -> 183.111.189.41:55021 [12:22:17] N: 게임서버 연결 감지: 192.168.0.2:2263 -> 183.111.189.41:55021

[test version] [12:29:58] N: 게임서버 연결 감지: 192.168.0.2:2262 -> 183.111.189.41:55021 [12:29:58] N: 게임서버 연결 감지: 192.168.0.2:2263 -> 183.111.189.41:55021

@ihaloemail 's problem must be something different. maybe similar.

other version I made to filter remote 9010 port is working fine with Logitech G HUB too. another version I made to filter local connection is also working fine with Logitech G HUB.

@ihaloemail Could you test those version? (except DFAssist_GAMESERVER_IPCHECK) block 9010 port block local connection

Jaehyuk-Lee commented 5 years ago

I've added filter to remote IP 127.0.0.1 to live version. This may solve most problems like this issue. If this issue have been solved, leave comment or close this issue please.

ihaloemail commented 5 years ago

it works! ty so much Jaehyuk~

also as an Enhancement request: I'd love for an option to minimize to taskbar (so I don't have that extra icon)

Jaehyuk-Lee commented 5 years ago

@ihaloemail You mean, you don't want tray icon? this or do you want to close the window and it works background(which is already working).

ihaloemail commented 5 years ago

oh gotcha. yeah just want the tray icon only! thanks

Jaehyuk-Lee commented 5 years ago

ok! have a good time gaming!