Search Unity

UniWeb

Discussion in 'Assets and Asset Store' started by simonwittber, May 23, 2013.

  1. William_Lee_Sims

    William_Lee_Sims

    Joined:
    Oct 11, 2014
    Posts:
    40
    Hi!

    Are there any plans to support receiving WebSockets through the WebServer? Or does it already?

    Thanks!
     
  2. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
  3. tataragne

    tataragne

    Joined:
    Aug 15, 2009
    Posts:
    27
    Hello guys ! Is anyone has try to use it with the WebGL / HTML5 export ?
     
  4. Mike-B

    Mike-B

    Joined:
    Nov 18, 2012
    Posts:
    13
    Seems like no answer from the developer for a while..
    Anyway are there any plans to support HTTP authentication methods in uniweb (I am interested in NTLM currently and probably oAuth in the future)?

    Support had been great so far...
    Thanks
     
  5. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,112
    This plugin is crashing my iOS app like no other. Works just fine on Desktop, but will randomly crash on iOS.

    and I'm doing really simple stuff too.

    Basically this:

    Code (CSharp):
    1.    
    2. private IEnumerator SetOnCoroutine(int index, bool state)
    3.     {
    4.         Debug.Log("SetOn: "+index+" "+state);
    5.         if (!string.IsNullOrEmpty(hueIP))
    6.         {
    7.             string url = "http://"+hueIP+"/api/newdeveloper/lights/"+index+"/state";
    8.             HTTP.Request request = new HTTP.Request("PUT", url);
    9.             string text = "{\"on\":"+(state?"true":"false")+"}";
    10.             request.timeout = universalTimeout;
    11.             request.Text = text;
    12.             Debug.Log(url+"   "+text);
    13.             yield return request.Send();
    14.         }
    15.     }
    16.  
    It's sending PUT requests to a phillips HUE.

    Seriously some issues here. Anyone have any quick fixes or can tell if I'm doing something horribly wrong?

    I am at the point where I am going to just need to scrap UniWeb if no one knows anything.
     
    Last edited: Jan 20, 2015
  6. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    191
    Hi there I'm also having a problem: I’m experiencing a very weird crash and I have some reasons to think that it’s related to this library.

    Basically I’m using CamFind and I’m sending the HTTP requests using UniWeb.
    No problems at all: everything will work perfectly and the requests and the answers from the service are handled very well.
    There is a but… actually a very big and weird but; I’ll try to be as much clear as I can.
    I make an iOS build.
    I trigger the requests and I receive the answers and everything is working perfectly.
    I wait 4 to 6 minutes.
    I trigger exactly the same function with the request and at this point the iOS app crashes.
    I’m attaching a screenshot from Xcode about the threads trace.

    The exact same thing is happening also on Android.
    The real incredible thing is that if I'll keep to send requests for 6 minutes one after another, no crashes at all happens.

    I sent and email to the support on the previous Friday but I received no answers yet.
    Hope that someone will give us his/her attention.
     

    Attached Files:

  7. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    191
    I had some weird problem sending directly the JSON so I started using the WWWForm:
    Code (CSharp):
    1. WWWForm form = new WWWForm ();
    2. form.AddField ("on", "" + state);
    and then
    Code (CSharp):
    1. HTTP.Request request = new HTTP.Request (url, form);
    2. // all your other request adds (apart from the text obviously  ;-))
    Anyway, sorry to ask, what line of your code is generating the exception? May you share your stack trace or any other info?

    Cheers
     
  8. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,112

    You know I could share the stack trace. But honestly it crashes in like 3 or 4 different places, seemingly randomly, and no pattern can be discerned. One time crashing deep deep in the memory manager class for Mono itself. So I have to presume that the issue is very core and central to however this is intended to work on iOS. It makes me wonder, does anyone have this working reliably on iOS?

    I tried using WWWForm but that just didn't work in this case? I don't know why, the resulting json may not be formatted correctly.
     
    Last edited: Jan 20, 2015
  9. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    Man, you guys need to work on your support.. i sent in a support email Nov 24th and got a response saing it is being reviewed by staff and still to this day have not gotten a response :(


    I am getting this

    SocketException: An existing connection was forcibly closed by the remote host.
    System.Net.Sockets.Socket+SocketAsyncResult.CheckIfThrowDelayedException ()
    System.Net.Sockets.Socket.EndSend (IAsyncResult asyncResult, System.Net.Sockets.SocketError& errorCode)
    System.Net.Sockets.Socket.EndSend (IAsyncResult result)
    UniExtensions.Network.NetworkStream.EndWrite (IAsyncResult ar) (at Assets/UniWeb/Plugins/Network/NetworkStream.cs:274)
    Rethrow as IOException: EndWrite failure
    UniExtensions.Network.NetworkStream.EndWrite (IAsyncResult ar) (at Assets/UniWeb/Plugins/Network/NetworkStream.cs:276)
    Mono.Security.Protocol.Tls.SslStreamBase.InternalWriteCallback (IAsyncResult ar)

     
  10. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    628
    Hi @simonwittber

    We are currently using Unity Pro 5.0.0b20 and building our project for WebGL. We were previously using Unity Pro 4.6 and UniWeb to handle our HTTP Requests because Unity doesn't offer much liberty concerning this topic and it was working really well with UniWeb.
    But it appears that UniWeb is not working anymore on Unity 5 with WebGL builds.

    I would like to know how can I handle advanced HTTP Requests with Unity Pro 5.0.0b20 and WebGL because Unity's WWW request are too simple.

    Thank you !
     
  11. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    I have given up on this package.. The developer doesn't respond (emails, here, etc). I will find another way to do it.. Shame.. I advise other to do the same .
     
  12. MikeMcDonald

    MikeMcDonald

    Joined:
    Jun 3, 2015
    Posts:
    8
    After upgrading to Unity5.1.1 we are having trouble connecting through SSL. Sometimes it goes through with no problem, sometimes it hangs forever, sometimes it succeeds after the first timeout. Happens in editor, on iPhone, and on Android. Has anyone else experienced this issue? Has anyone found a solution?

    We tracked the issue down to where Uniweb is making the following call on line 181 of Request.cs:

    ssl.AuthenticateAsClient (uri.Host);
     
  13. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    90
  14. diekeure

    diekeure

    Joined:
    Jan 25, 2013
    Posts:
    219
    WebGL isn't supported by BestHTTP either, so why is it worth checking out?
     
  15. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    90
    The pro version does. So far so good. I have my app connecting to Parse's REST Api in webgl using the Pro version.
     
  16. bawenang

    bawenang

    Joined:
    Aug 18, 2012
    Posts:
    102
    Hi, so I was just wondering, can you use this in Editor mode? I have a need to access the net from an EditorWindow. Thanks.
     
  17. stevenchan_playstudios

    stevenchan_playstudios

    Joined:
    Mar 1, 2017
    Posts:
    35
    I am using UniWeb 5.0.1, In UnityEditor, when I request https://, everything is fine.
    But if using Charles/Fiddler Proxy, set UniWeb.Request.Proxy = "http://127.0.0.1:8888", the request is failed, it always fallback to http.
     
  18. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    You cannot mix http and https.
     
  19. stevenchan_playstudios

    stevenchan_playstudios

    Joined:
    Mar 1, 2017
    Posts:
    35
unityunity