Unity basic App42 examples don't seem to work because of an incorrectly formulated HTTP request (400)

0 votes
Hi,

When I try to run basic examples in Unity, I got the following error

Received HTTP code 400 from proxy after CONNECT.

At first, I thought my proxy settings were the problem, but after further investigation, I could see in Wireshark that the HTTP request generated is https://api.shephertz.com:443api.shephertz.com:443. From what I can see the host is good but the second part of the URL is wrong.

Thanks.
asked Mar 3, 2014 in App42 Cloud API-BaaS by Antoine Routon (10 points)

1 Answer

0 votes
Can you please let me know which sample and which version of App42 Unity SDK you are using?

Also, console log would be a great help to debug it further.
answered Mar 4, 2014 by ajay123 (899 points)
Hi,

Thanks for your help.

I have the same problem with both SDK 2.2.2 and 2.3. I use the basic UserTest sample. The same sample works perfectly fine on an opened network, so it must be linked to the proxy.

The log I get is :

Exception : com.shephertz.app42.paas.sdk.csharp.App42Exception: Received HTTP code 400 from proxy after CONNECT
UnityEngine.Debug:Log(Object)
AssemblyCSharp.UserResponse:OnException(Exception) (at Assets/Scripts/UserResponse.cs:49)
com.shephertz.app42.paas.sdk.csharp.connection.<execute>d__3:MoveNext()
com.shephertz.app42.paas.sdk.csharp.connection.<WaitForRequest>d__0:MoveNext()

Like I said, this makes sense as it seems the adress that is tried to be accessed is wrong (https://api.shephertz.com:443api.shephertz.com:443).

It me also be worth it to note that I have set Windows environment variables HTTP_PROXY and HTTPS_PROXY to my proxy address. If I dont, I get another error:

Exception : com.shephertz.app42.paas.sdk.csharp.App42Exception: Unknown SSL protocol error in connection to api.shephertz.com:443
UnityEngine.Debug:Log(Object)
AssemblyCSharp.UserResponse:OnException(Exception) (at Assets/Scripts/UserResponse.cs:49)
com.shephertz.app42.paas.sdk.csharp.connection.<execute>d__3:MoveNext()
com.shephertz.app42.paas.sdk.csharp.connection.<WaitForRequest>d__0:MoveNext()

Thanks for your help
Looks like port setting for proxy is not correctly done. Somehow its value is going to be same as host in the config. Can you please recheck it with proxy setting and confirm that if other sites are running properly.
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
...