Troubleshoot connectivity issues between the GameDriver client API and Agent
Symptom
Failed to connect to the running Unity Editor or standalone build.
Error(s)
In the test, you may see the following error:
System.Exception: Failed to connect to localhost:19734 ---> System.Exception: Unable to locate any UnityEditor instances with a GDIOAgent configured.
In the Unity Editor console, or Player.log file (for standalone execution):
Only one usage of each socket address (protocol/network address/port) is normally permitted.
UnityEngine.Debug:LogError (object)
gdio.unity_agent.GDIOLogger:Error (object)
gdio.unity_agent.GDIOAgent:Awake ()
Solution(s)
One or more of the following may be occurring:
Possible cause | Solution |
Multiple instances of the Unity Editor are open, causing port 19734 to be taken/listening. |
Be sure to close all except the active editor used for testing. |
The GameDriver agent is attached to more than one open scene. | Only attach the GameDriver agent to one scene in your project. Typically this is the first scene to be loaded. |
Symptom
The test connects and immediately disconnects from the standalone player or editor.
Error(s)
No warnings or errors occur.
Solution
This can happen when updating the GameDriver version, but not the API DLLs in the test to match. The versions need to match between these in order to avoid unwanted behavior. Be sure to always update or refresh your test-side DLLs after a GameDriver upgrade.
Symptom
The test terminates during the OneTimeSetUp stage.
Error(s)
In the test, you may see:
OneTimeSetUp: System.NullReferenceException : Object reference not set to an instance of an object.
The Unity console and Player.log may show no errors.
Solution(s)
One or more of the following may be occurring:
Possible cause | Solution |
Under investigation. Please email us at support@gamedriver.io if this occurs consistently/frequently. |
Close and reopen the Unity Editor/project. |