(Unity) WarpClient.GetInstance().Connect(...) returns ConnectionError in facebook

0 votes

In unity editor and standalone, everything works fine, I can connect to appwarp. When I deploy it to facebook apps, WarpClient.GetInstance().Connect(...) request returns WarpResponseResultCode.CONNECTION_ERROR.

Is there any restrictions to connect to appwarp in facebook apps?

asked Mar 17, 2014 in AppWarp by telltale (30 points)

1 Answer

0 votes
 
Best answer
Does it work fine for you on the web player when you run it locally? I am trying to understand if its only an issue with facebook or a general web player plugin issue you are facing. Also have you tried running in different browsers?
answered Mar 17, 2014 by dhruvc (1,099 points)
selected Mar 18, 2014 by telltale
I got the error in Chrome, Safari and Firefox. The web player works fine.
Perhaps its an issue with https. I assume your facebook app is hosted on https. You can run it over http in sandbox mode I believe to narrow down the issue.
I'm pretty sure it is about https. Unity binary url requires https. I submitted the application for review. Then I will try the sandbox mode.
We've narrowed the problem in our end. While we work on it - there is a work-around that you can do.
The problem is that appwarp first does a http based lookup to our location services based on your api key and then establishes a tcp connection with the returned address. the problem is that in the web player (running in https) this is failing.
You can skip this by directly putting in the IP address when you initialize WarpClient eg:

WarpClient.initialize(API_KEY, SECRET_KEY,"50.112.253.86");

Now to get the IP address of your application you can hit the following url
http://control.appwarp.shephertz.com/lookup?api=XYZ

(replace XYZ with your apikey)

This should work - please update the thread with the result.
It works, thanks.
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
...