ArgumentException: Can't use encryption yet. Exchange keys first.

Hi,

I am trying to set up my game again, that was recently wiped from my dedicated server. It was previously set up by my developer but he is busy now and won't be able to do it for awhile so I am trying to set it up myself.

I think I connected successfully to my server with photon control as I managed to connect to the game (as whenever I don't have photon control running I would get an error and the login page won't popup, so I believe it is connecting properly) but when I try to login I get this error in Unity:

ArgumentException: Can't use encryption yet. Exchange keys first.
ExitGames.Client.Photon.PhotonPeer.OpCustom (ExitGames.Client.Photon.OperationRequest operationRequest, Boolean sendReliable, Byte channelId, Boolean encrypt)
DEngine.Unity.Photon.Connecting.SendOperation (ExitGames.Client.Photon.OperationRequest request, Boolean sendReliable, Byte channelId, Boolean encrypt)
DEngine.Unity.Photon.PhotonManager.SendOperation (ExitGames.Client.Photon.OperationRequest request, Boolean sendReliable, Byte channelId, Boolean encrypt)
DEngine.Unity.Photon.PhotonController.SendOperation (Byte opCode, System.Collections.Generic.Dictionary`2 parameters, Boolean sendReliable)
WorldmapNet.SendSignIn (System.String username, System.String password) (at Assets/Scripts/Network/WorldmapNet.cs:1199)
LoginManager.Login_click () (at Assets/Scripts/LoginManager.cs:125)
UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) (at /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent.cs:153)
UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) (at /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent.cs:634)
UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) (at /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent.cs:769)
UnityEngine.Events.UnityEvent.Invoke () (at /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:53)
UnityEngine.UI.Button.Press () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:35)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:44)
UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:52)
UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:269)
UnityEngine.EventSystems.EventSystem:Update()


I am not a coder so I'm not sure what to do, managed to set up PhotonControl in my dedicated server and managed to get it running, also have allowed the required ports from this list on my server:

https://doc.photonengine.com/en-us/realtime/current/reference/tcp-and-udp-port-numbers

The game also requires MySQL of which I installed and managed to execute the backup database. Does it require XAMPP for it to work fully?

I think it has to do something with the database not connecting. Also when I connect to the MySQL Administrator I am logging in as 127.0.0.1 which is the localhost. In the server information the server IP is 127.0.0.1 and in the Client IP it is my dedicated server IP, I was wondering if the server IP is meant to be my dedicated server IP for it work online?

Hope you guys can help me out.

Thank you!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @PHANEEZY,

    Thank you for choosing Photon!

    What client SDK are you using?
    I have seen this "DEngine.Unity.Photon" namespace before. Where does it come from? I'm not aware of this 3rd party Photon integration/framework/SDK.

    The issue you are encountering is due to the fact that you are trying to call some operation on a Photon server before ending authentication properly. If you use our SDKs you do not need to worry about this. Otherwise you can read more about it here.
  • Hi,

    Thanks for the reply :)

    I'm not sure about the SDK part as I'm not a coder, bought this source code and the seller set it up for me but the dedicated server had a wipe so I have to set it up again because the seller isn't available. All I know is I have the server file that contains the photoncontrol file. Is there anything else I need to download to put on my server?

    Is anyone able to maybe login into my dedicated server and help me set it up? Happy to pay you. Please PM me and we can discuss more about it.

    Thank you!
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @PHANEEZY,

    You still did not answer my question about where can we find this 3rd party SDK.
    Maybe the guy(s) behind it should give you support or assistance.

    You can download the Server SDK here and find the docs here.