Author Topic: TNServer.exe does not work in Windows 8.1  (Read 5805 times)

sberghici

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
TNServer.exe does not work in Windows 8.1
« on: November 23, 2013, 06:11:09 PM »
I hate Microsoft!
I've recently upgraded my desktop to Windows 8.1 and after that TNServer.exe stopped working. Same executable works fine on all other Microsoft OS including W7, W8, Server 8 R2.
Error message is:
"... has failed the verification step" (like client and server have different versions but this not the case)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNServer.exe does not work in Windows 8.1
« Reply #1 on: November 23, 2013, 08:48:05 PM »
That seems strange. What gets sent instead of the verification?

sberghici

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
Re: TNServer.exe does not work in Windows 8.1
« Reply #2 on: November 23, 2013, 11:17:22 PM »
That seems strange. What gets sent instead of the verification?
I did not get so deep but the code even does not hit verification, the following line returns false:
if (packet == Packet.RequestID)


bitcrusher

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: TNServer.exe does not work in Windows 8.1
« Reply #3 on: November 24, 2013, 04:28:16 PM »
hello I been using windows 8.1 for a while now and TNServer.exe works for me, not that it helps you much but just popped in to say it does work on windows 8.1.

sberghici

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
Re: TNServer.exe does not work in Windows 8.1
« Reply #4 on: November 25, 2013, 12:48:06 AM »
I figured out the problem.
Way to reproduce:
In ExapmpleMenu.cs update the Start() function:

  1.         void Start ()
  2.         {
  3.                 if (Application.isPlaying)
  4.                 {
  5.                         // We don't want mobile devices to dim their screen and go to sleep while the app is running
  6.                         Screen.sleepTimeout = SleepTimeout.NeverSleep;
  7.  
  8.                         // Make it possible to use UDP using a random port
  9.                         TNManager.StartUDP(Random.Range(10000, 50000));
  10.                         TNManager.Connect("192.168.0.193:5127");
  11.                        
  12.                         string playerName;
  13.                         if(PlayerPrefs.HasKey("PlayerName")){
  14.                                 playerName = PlayerPrefs.GetString("PlayerName");      
  15.                         }
  16.                         TNManager.client.BeginSend(Packet.RequestChannelList);
  17.                         TNManager.client.EndSend();
  18.                 }
  19.         }

After that it works with any version of windows except 8.1
If you remove PlayerPrefs section - it works. If you remove TNManager.client.BeginSend - it works. Actually it was my bug - TNManager.client.BeginSend/EndSend should not be there in Start() function. I've commented these 2 lines and it works fine now(I do it in Update every 5 seconds).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNServer.exe does not work in Windows 8.1
« Reply #5 on: November 25, 2013, 07:56:31 PM »
That's correct. The Connect() call is delayed, so you need to wait for the OnNetworkConnect notification before proceeding.