Connection Error using AppWarp in Unity (empty scene)

0 votes

Simple problem really. I don't know what I am doing wrong. I keep getting an Unknown Error from onConnectionDone (6) no matter how many times I try to connect.

void Start ()

    {
        WarpClient.initialize(Define.Var.APPWARP_API_KEY, Define.Var.APPWARP_SECRET_KEY);
        WarpClient.GetInstance().AddConnectionRequestListener(NetManager.Instance);
        WarpClient.GetInstance().Connect("taserasdfasf");
    }
 
void Update ()
{
        WarpClient.GetInstance().Update();
}
asked Aug 9, 2015 in AppWarp by Jonathan Bro (15 points)

2 Answers

0 votes
 
Best answer

Hi Jonathan,

It seems you have created the app of type App42 Cloud API from the AppHQ. If so, it will give this error. Please try creating a new app from AppWarp Dashboard and select AppType as AppWarp Realtime Multiplayer Backend.

Let me know if the problem continues.

Thanks.

answered Aug 16, 2015 by rajeev.etc (1,660 points)
selected Aug 17, 2015 by Jonathan Bro
0 votes

Hi,

The code snippet you provided should work. Could you please check on to our sample project for testing.

If problem still continues, could you please share your sample project with us, it will help us to debug the problem. Please share the sample project on support@shephertz.com.

 

Thanks & Regards,

Sumit Balodi

answered Aug 10, 2015 by sumit.balodi (40 points)
I downloaded the Unity-AppWarpViking project and opened it with Unity 5.1.

-The project was made before Unity 5 so the project was first converted to a Unity 5 project.
-I opened the demo scene and pressed play and got an error on Listener.cs line 50 (could not find instance).
-I checked onConnectDone's ConnectEvent eventObj and the result was a 5.
Hi,

OK First of all sorry for the inconvenience, we had upgraded our demos to the Unity's latest version, but since we didn't knew which Unity version are you using, so here provided you the older version's project link.
Below is the link to the latest sample - https://github.com/SumitBShephertz/UnityAppWarpVikingDemo_New/tree/master/ForUnity5.x/Unity-AppWarpViking

Now, connection error (5) happens when, if the underlying TCP connection with AppWarp cloud service is broken.
Please re-check if you have entered correct api key and secret key, also make sure that the respective DLL file is attached in your project.

If your problem still persists, please feel free to contact us.

Thanks & Regards,
Sumit Balodi
Sorry for the late reply.

I tried the new project that you linked above and I was able to connect (code 0). I narrowed down the problem to the API key and Secret key. When I used the Viking Demo's keys in MY project I was able to connect fine, but when I used my keys listed in my dashboard it did not work (Code 5).

App42 Management console APP HQ --> App Manager --> Application Keys

I reset the keys once and tried the new ones, but still the same problem
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...