Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

UniWeb

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

  1. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    Wow that is very strange. Are you able to recreate the problem in a small project and send it to me?
     
  2. MUXIAN

    MUXIAN

    Joined:
    Jan 15, 2013
    Posts:
    6
    Hi, I don't think sending a small project to you is necessary because this situation just happens in the sample codes inside the package. I was using wireshark to monitoring the networking. It turns out that the first http request of upgrading never send out to server. However if I kill the application, this request will reach server. It all only happens on my iphone using my company wifi. My mac using company wifi ok, my iphone using 4G ok, my iphone using home wifi ok, my iphone using friend's wifi ok..

    Really really strange.. do you have a clue?
     
  3. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    Do you use a HTTP proxy when on company wifi?
     
  4. MUXIAN

    MUXIAN

    Joined:
    Jan 15, 2013
    Posts:
    6
    Just test on my colleague's iphone. it works too..... how come only not working on my iphone with this wifi... I dont have access to the company wifi setting.
     
  5. MUXIAN

    MUXIAN

    Joined:
    Jan 15, 2013
    Posts:
    6
    What makes it more interesting is that if I use my browser and websocket echo test to connect. It works too. Just now working using the UniWeb scripts.
     
  6. MUXIAN

    MUXIAN

    Joined:
    Jan 15, 2013
    Posts:
    6
    I just updated to uniweb3.0 and now I have this problem building:

    Cross compilation job socketex.tcpclient.dll failed.
     
  7. MUXIAN

    MUXIAN

    Joined:
    Jan 15, 2013
    Posts:
    6
    I updated my phone from 7.0.6 to 7.1 and I updated uniweb to 3.0b. ( I had to remove the socketex.tcpclient.dll in order to build on IOS). And now my iphone using company wifi is working fine..

    I guess it could be the 7.0.6 system problem.
     
  8. Fragmental

    Fragmental

    Joined:
    Jun 30, 2013
    Posts:
    61
    I'm receiving this error involving ssl certification and "Unsupported hash algorithm". I copied it to paste bin because it's very long.

    The server recently updated their certification for heartbleed, so that might be related somehow.
     
    Last edited: Apr 16, 2014
  9. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    Thanks for the report, this is now fixed.
     
  10. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    Are you able to send me the URL which causes this error?
     
  11. cometeor

    cometeor

    Joined:
    May 20, 2011
    Posts:
    64
    It's a very weird problem, I tested the circumstance bellow:
    iOS, Http or Websocket, WiFi or 3G: fine
    Android, Http or Websocket, WiFi: fine
    Android, Http, 3G: fine
    Android, Websocket, 3G:Could not connect, and no exception throwed or error reported.
    Any idea?
     
  12. cometeor

    cometeor

    Joined:
    May 20, 2011
    Posts:
    64
    And the amount of data transferred was very large on android + 3g, compared to other normal cases, about 1x times.
    I received about 20kb data when connected successfully, but above 300kb when android + 3g, still can not connect.
     
  13. Fragmental

    Fragmental

    Joined:
    Jun 30, 2013
    Posts:
    61
  14. cometeor

    cometeor

    Joined:
    May 20, 2011
    Posts:
    64
    After investigated the data received, I found my websocket connection was hijacked by isp, which replaced handshake package by it's page...
    ToT
    How to overcome this? It's not work even I use ssl.
     
  15. Fragmental

    Fragmental

    Joined:
    Jun 30, 2013
    Posts:
    61
    My bug report received an update. It appears to be fixed in a future version of unity. All I have to do now is wait.

    http://fogbugz.unity3d.com/default.asp?602783_4ddsl9l014uuvquo
     
  16. Evil-Dog

    Evil-Dog

    Joined:
    Oct 4, 2011
    Posts:
    134
    Hi there! I've having some issues with Uniweb right now. It's working in my old project but I made a copy of that project to switch to another UI system. But in both project I send the same URL through the HTTP object but in my new project http.exception is null, http.response.status is fine, http.response.message is OK and but http.response.text, which is where I normally get the data from the server, is null. That's my problem right now. I get the data in the old project but in the new project I get null with no error, with the same URL
    Ideas?
     
  17. Hertox82

    Hertox82

    Joined:
    May 6, 2014
    Posts:
    3
    Hi Simon,
    Do you know why when i do a request in HTTP everything works right but when i try to do a request in HTTPS i have this kind of error?

    ocketPolicyClient1: Incoming GetPolicyStreamForIP
    SocketPolicyClient1: About to BeginConnect to 46.252.194.187:843
    SocketPolicyClient1: About to WaitOne
    SocketPolicyClient1: Socket connected
    Mono.Security.Protocol.Tls.TlsException: Couldn't complete EndRead
    at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
    at System.Net.Security.SslStream.EndAuthenticateAsClient (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
    at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, SslProtocols sslProtocolType, Boolean checkCertificateRevocation) [0x00000] in <filename unknown>:0
    at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost) [0x00000] in <filename unknown>:0
    at HTTP.Request.GetClient (System.String host, Int32 port, Boolean useSsl) [0x00000] in <filename unknown>:0
    at HTTP.Request.<Send>m__22 (System.Object t) [0x00000] in <filename unknown>:0

    thank you in advance :D
     
  18. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    Sounds like something is interfering with your connection. Are you able to do a TCP dump of the traffic?
     
  19. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    Can you send me the URL?
     
  20. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    Is your issue related to this error?

    http://fogbugz.unity3d.com/default.asp?602783_4ddsl9l014uuvquo
     
  21. Hertox82

    Hertox82

    Joined:
    May 6, 2014
    Posts:
    3
    May be, I don't know because ,in my request, i just put only my url with https... Is it possible that i must implement in Request.cs ValidateServerCertificate() ?
     
  22. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    I don't think so. You only want to implement this if you want to implement your own custom validation.
     
  23. Hertox82

    Hertox82

    Joined:
    May 6, 2014
    Posts:
    3
    mmm... and what is probably the reason for this behavior?
     
  24. kaiber

    kaiber

    Joined:
    Mar 4, 2013
    Posts:
    15
    Getting "Error building Player: Exception: Error: type `System.Net.Sockets.NetworkStream` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at HTTP.Request HTTP.Request::BuildFromStream(System.String,System.Net.Sockets.NetworkStream)."

    When I try and build for Windows Phone 8. Any ideas?
     
  25. Evil-Dog

    Evil-Dog

    Joined:
    Oct 4, 2011
    Posts:
    134
    Sorry I should have posted an update here, the mistake was my own entirely. So no worry about it, it was .text instead of .Text because I integrated a new UI system and searche-replaced all .text properties hehe really stupid, especially when you're not in #pragma strict mode in javascript, which I now will be until I die haha
     
  26. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    226
    Latest version of UniWeb is now released, 3.0.7.

    This version includes a prebuilt DLL for your convenience, and a new WP8 DLL.
     
  27. dimitroff

    dimitroff

    Joined:
    Apr 3, 2013
    Posts:
    106
    Hi,
    Is is possible to do a custom POST request, without using the WWWForm, for the paramaters. I want to do some OAuth posting to Tumblr and WWWForm is messing up with my encoding. Could you show me an example, if it is possible I will def buy the plug-in.

    Kamen
     
  28. Fragmental

    Fragmental

    Joined:
    Jun 30, 2013
    Posts:
    61

    Apparently the "future version of unity" that is fixed is Unity 5. As far as I know, Unity 5 won't be released until sometime in 2015. I would like to get this working before then, if I can find a way. I think the bug is the same as this one https://bugzilla.xamarin.com/show_bug.cgi?id=8788 Does anyone have any ideas?
     
  29. gdagley

    gdagley

    Joined:
    Jul 29, 2013
    Posts:
    6
    I would be interested in finding out a solution for this too. I don't see how Unity can not provide some sort of solution for this. If SSL is broken, it seems like that is a pretty big deal. I see that there seems to be some discussion from your link to fogbugz bug report, but it does not look promising at this point.
     
  30. Fragmental

    Fragmental

    Joined:
    Jun 30, 2013
    Posts:
    61
    I found the issue in the issue tracker. You can vote on it here http://issuetracker.unity3d.com/issues/when-trying-to-authenticate-ssl-with-an-http-rest-server-i. If I had known how it would show up on the issue tracker, I would have tried to give it a better title. I'm kind of hoping they decide it's easy enough to fix to just include it in a minor release.

    I made a pull request on github here https://github.com/Unity-Technologies/mono/pull/134 I don't know if it Unity accepts pull requests or if it's the right branch.

    I created a question as well here http://answers.unity3d.com/questions/726397/unsupported-hash-algorithm-4.html with the relevant information.

    Sorry if I'm hijacking the thread at all.
     
    Last edited: Jun 13, 2014
  31. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    I get this on OSX builds... Works fine on windows and in the editor
     

    Attached Files:

  32. Ciprian

    Ciprian

    Joined:
    Jul 9, 2013
    Posts:
    27
    Can you please add a retryCount property for the Request class?

    In case it fails the first time, to try again until the retryCount is reached
     
  33. Ciprian

    Ciprian

    Joined:
    Jul 9, 2013
    Posts:
    27
    I would like to report a bug on UniWeb when targeting WebPlayer

    I am using Unity Pro 4.5.1f3 for webplayer in a facebook app

    If there is a UniWeb request in progress (or any other socket connection for that reason) and try to reload the browser, or close it, the tab will hang.

    The only way to resume the tab reloading is to Force Quit the Chrome Helper process on Mac. I assume a similar situation is on Windows too

    For a repro case, I assume that a server that is slow to respond (with a delay of a few seconds) and simply reloading the webplayer html page will do the trick

    As a solution, you need to find a way to automatically close the active socket connections on ApplicationQuit
     
  34. gdagley

    gdagley

    Joined:
    Jul 29, 2013
    Posts:
    6
    I voted for the issue and see that the pull request was accepted and merged. Now to hope that they release a minor update to the 4.3 branch with this in it.

    Thanks for tracking this down!
     
  35. Ciprian

    Ciprian

    Joined:
    Jul 9, 2013
    Posts:
    27
    Can you please give me a feedback on the bug report presented here? It's seriously ruining the experience for our facebook players..

    Thank you
     
  36. Ciprian

    Ciprian

    Joined:
    Jul 9, 2013
    Posts:
    27
    Does this plugin still have support? I wrote about a serious bug that is freezing the browsers on WebPlayer and got no response after almost 2 weeks..
     
  37. ChaeHeeHyun

    ChaeHeeHyun

    Joined:
    Apr 13, 2013
    Posts:
    4
    HOW To Socket.io Sample?


    SocketIOClientExample


    node.js

    var io = require('socket.io').listen(8081);

    io.sockets.on('connection', function (socket) {
    socket.emit('news', { hello: 'world' });
    socket.on('my other event', function (data) {
    console.log(data);
    });
    });

    error message
    Websocket is not supported with this server.
    UnityEngine.Debug:LogError(Object)
    HTTP.SocketIO.<EstablishConnection>c__IteratorE:MoveNext() (at Assets/UniWeb/Plugins/HTTP/SocketIO/SocketIOConnection.cs:149)
     

    Attached Files:

  38. paulbaker

    paulbaker

    Joined:
    Aug 29, 2012
    Posts:
    58
    Hi,

    Doesn't compile on WP8. In TcpClient.cs, DnsEndPoint doesn't exist.
     
  39. ChaeHeeHyun

    ChaeHeeHyun

    Joined:
    Apr 13, 2013
    Posts:
    4
    400 error !!!
     

    Attached Files:

  40. ChaeHeeHyun

    ChaeHeeHyun

    Joined:
    Apr 13, 2013
    Posts:
    4
    The answer is that?
     
  41. eddieone

    eddieone

    Joined:
    Jul 19, 2014
    Posts:
    8
    I'm also interested in the same question.
     
  42. Fragmental

    Fragmental

    Joined:
    Jun 30, 2013
    Posts:
    61
    Bug fix is out in 4.5.3! It's working for me. They didn't bother to mention it in the release notes, though.
     
  43. ChaeHeeHyun

    ChaeHeeHyun

    Joined:
    Apr 13, 2013
    Posts:
    4
    I solved the problem by socket.io@0.9.17.
    But you will not answer.
    So unkind.
     
  44. gavi

    gavi

    Joined:
    Mar 30, 2013
    Posts:
    10
    Hello Simon,
    I began using WniWeb on Unity 4.6 beta.
    I can't access HTTPS pages (in PC/Android platforms).
    What is the plan/timeline for UniWeb on 4.6?
    thanks in advance.
     
  45. gavi

    gavi

    Joined:
    Mar 30, 2013
    Posts:
    10
    Simon, another question: I am trying to send a POST request to a HTTPS server. It expects no headers and a body with a JSON. It also expects authentication in the URL ( HTTPS:code@theirserver.com ).
    I see in their log that they do receive my JSON as a POST and the JSON "looks good" by they can't interpret it. I am told that the issue is in how I encode the body. What is the best way to encode a body? I was using: byte[] body = Encoding.UTF8.GetBytes(myJson);
     
  46. neerajcrespo

    neerajcrespo

    Joined:
    Aug 16, 2014
    Posts:
    1
    Can anyone tell me, if Uniweb has extended support to Windows Store App.
    It works fine for WindowsPhone 8 But I want the same to working with Metro App too.
    I dont know whats the replacement for TcpClient, Network Stream etc for windows store.
    Thanks In Advance.
     
  47. samvis

    samvis

    Joined:
    Oct 14, 2014
    Posts:
    6
    Hi,
    when I use UniWeb as a replacement of WWW class for simple http get requests, do I need to run policy server or I just need to put crossdomain.xml file to server? For WWW class, I need only crossdomain.xml. Thanks.
     
  48. rileydabozo

    rileydabozo

    Joined:
    Feb 16, 2014
    Posts:
    8
    What exactly is UniWeb used for?
     
  49. shuoyang

    shuoyang

    Joined:
    Oct 23, 2014
    Posts:
    1
    Hi simon:

    Just downloaded uniweb, thanks.

    It appears that we have a problem with the websocket client. If the server sends message immediately when connection is open, the client does not get the callback fired.

    Though, after the client has sent a message to the server, the client's able to receive the message echoed back. I've tested this with chrome's javascript client and as soon as connection is established, the message is received by the client.

    Any thoughts?

    Thanks.
     
  50. pasq

    pasq

    Joined:
    Sep 20, 2012
    Posts:
    14
    Hey demid,

    Have you managed to solve this issue? We're experiencing the same problem on iOS..
     
unityunity