Search Unity

Best HTTP Released

Discussion in 'Assets and Asset Store' started by BestHTTP, Sep 11, 2013.

  1. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @just_a_joke can you see something suspicious in the logs?
    Also, the default Json encoder may not able to convert to Json string a complex object like this. You can try out the more advanced LitJson encoder:
    Code (CSharp):
    1. signalRConnection.JsonEncoder = new BestHTTP.SignalR.JsonEncoders.LitJsonEncoder();
    A possible workaround can be to pass the object's fields as params, but for this you have to modify your function on server side too.
     
  2. just_a_joke

    just_a_joke

    Joined:
    Apr 20, 2015
    Posts:
    13
    @BestHTTP We unable to find the class "LitJsonEncoder" in the downloaded package. Inside the "JsonEncoders" folder, there are only "DefaultJsonEncoder" and "IJsonEncoder".

    Besides that, is the signalR Call function only accept string as the argument or I could pass in the object class.

    The following is the server-side function structure :-

    Code (CSharp):
    1. private void result (resultItem item)
    2. {
    3.       //some process
    4. }
    Thanks
     
  3. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @just_a_joke The LitJsonEncoder must be in the \Assets\Best HTTP (Pro)\Examples\SignalR\Json Encoders\ folder.

    The Call function accepts objects too, it it has to convert them to json for the SignalR protocol. The default json encoder can deal with simple types(int, floats, etc.) and with little more complex ones (like arrays, Lists, Dictionarys where the generic types are simple too). But for custom classes a more advanced json encoder adapter must be set, or you have to do workarounds:
    -send fields as distinct params
    -add the fields to a Dictionary<string, object> and pass this dictionary to the function.
     
  4. just_a_joke

    just_a_joke

    Joined:
    Apr 20, 2015
    Posts:
    13
    @BestHTTP I tried to parse the class object into json string using the LitJsonEncoder as following :-

    Code (CSharp):
    1. string content = signalRConnection.JsonEncoder.Encode(resultItem);
    But there is an error on the encode which the output for "content" is Max allowed object depth reached while trying to export from type System.Guid. Which one of the object type in the resultItem is Guid

    I tried pass in the object as argument for the Call method which the object class type is exactly the same as the expected class type on the server-side. But the server-side function still not fire.

    Thanks
     
  5. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @just_a_joke You can place this code somewhere in your startup code:
    Code (CSharp):
    1.         LitJson.JsonMapper.RegisterExporter<Guid>((guid, writer) => writer.Write(guid.ToString()) );
    2.         LitJson.JsonMapper.RegisterImporter<string, Guid>((input) => new Guid(input) );
    These are custom GUID => Json and Json => GUID mappers that the LitJson encoder will use.
     
  6. Deleted User

    Deleted User

    Guest

    I am having trouble with HTTPRequest: the requested is getting queued endlessly even after I stop the app. any suggestions?
     
  7. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @hugewindow Can you share more detail? You can turn on more logging for the plugin this way:
    Code (CSharp):
    1. BestHTTP.HTTPManager.Logger.Level = BestHTTP.Logger.Loglevels.All;
    Also, any chances that redirection occurs in one of the requests? A new version already uploaded to the Asset Store that fixes an issue like this.
     
    Last edited: Aug 29, 2015
  8. agriffin

    agriffin

    Joined:
    May 10, 2012
    Posts:
    20
    Hello, I just bought this plugin and I am enjoying it very much! I have a question about server callable methods for SignalR though: what is the best way to deserialize a MethodCallMessage Argument into a typed object? Right now I see it is a Dictionary<string, object>. Do I need to manually map it from the dictionary?

    Thanks!
     
  9. V Marquis

    V Marquis

    Joined:
    Sep 17, 2014
    Posts:
    7
    Hello,
    I have BestHttp Pro.
    All work fine in android and ios but in WebGl plateform (with editor running) I have the following error:

    Ex [HTTPRequest]: CallCallback - Message: URI scheme must start with a letter and must consist of one of alphabet, digits, '+', '-' or '.' character. StackTrace: at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000] in <filename unknown>:0
    at System.Uri.ParseUri (UriKind kind) [0x00000] in <filename unknown>:0
    at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000] in <filename unknown>:0
    at System.Uri..ctor (System.String uriString) [0x00000] in <filename unknown>:0
    at ExitGames.Client.Photon.SocketWebTcp.Connect () [0x0004a] in C:\DropBox\Poker\PhoenixPokerGit\Assets\PhotonLoadbalancingApi\SocketWebTcp.cs:86
    at ExitGames.Client.Photon.TPeer.Connect (System.String serverAddress, System.String appID) [0x00000] in <filename unknown>:0
    at ExitGames.Client.Photon.PhotonPeer.Connect (System.String serverAddress, System.String applicationName) [0x00000] in <filename unknown>:0
    at ExitGames.Client.Photon.LoadBalancing.LoadBalancingClient.Connect () [0x00007] in C:\DropBox\Poker\PhoenixPokerGit\Assets\PhotonLoadbalancingApi\LoadBalancingClient.cs:639
    at Assets.Scripts.Buisness.BasePartyManager.ConnectPhoton (Boolean hideDialogue) [0x0008f] in C:\DropBox\Poker\PhoenixPokerGit\Assets\10 Scripts\Buisness\BasePartyManager.cs:127
    at Assets.Scripts.Buisness.BasePartyManager.OnRequestFinished (BestHTTP.HTTPRequest originalrequest, BestHTTP.HTTPResponse response) [0x000e9] in C:\DropBox\Poker\PhoenixPokerGit\Assets\10 Scripts\Buisness\BasePartyManager.cs:97
    at BestHTTP.HTTPRequest.CallCallback () [0x0000b] in C:\DropBox\Poker\PhoenixPokerGit\Assets\Best HTTP (Pro)\BestHTTP\HTTPRequest.cs:1155
    UnityEngine.Debug:LogError(Object)
    BestHTTP.Logger.DefaultLogger:Exception(String, String, Exception) (at Assets/Best HTTP (Pro)/BestHTTP/Logger/DefaultLogger.cs:89)
    BestHTTP.HTTPRequest:CallCallback() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPRequest.cs:1159)
    BestHTTP.HTTPConnection:HandleCallback() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPConnection.cs:795)
    BestHTTP.HTTPManager:OnUpdate() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPManager.cs:537)
    BestHTTP.HTTPUpdateDelegator:Update() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPUpdateDelegator.cs:67)

    My code is
    Code (CSharp):
    1.  
    2.             var url = PhoenixPokerConst.MasterURL + PhoenixPokerConst.VariablesGlobalPath +
    3.                       PhoenixPokerVariablesGlobal.MasterServerAddress;
    4.             HTTPRequest request = new HTTPRequest(new Uri(url), HTTPMethods.Get, OnRequestFinished);
    5.             request.SetHeader("Content-Type", "application/json; charset=UTF-8");
    6.             request.Send();
    In the url string i have "http://PhoenixPokerWebApi.phoenixgames.fr/api/values/MasterServerAddress"

    Best
     
  10. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @agriffin You see it well. Right now this your only option. Already thinking about adding support for generic callbacks with strongly typed arguments, but the first problem is the SignalR message format, the second one is the AOT compiler for iOS.
     
  11. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664

    @V Marquis Tried you code with the link you provided, but the request runs fine and I received a valid answer.
    However if you pass the address that you receive back from your server to the Uri's constructor, you will receive this error.

    As you can see, the exception is thrown in Photon's code(PhotonPeer.Connect) you called from the callback function(BasePartyManager.OnRequestFinished).
     
  12. agriffin

    agriffin

    Joined:
    May 10, 2012
    Posts:
    20
    It would be awesome if you can figure out a way to implement it but for now I am happy! Thanks for this awesome plugin!
     
  13. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Code (csharp):
    1. Err [WebSocketTransport]: OnError: Read failure   at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    2.   at System.IO.Stream.ReadByte () [0x00007] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Stream.cs:168
    3.   at BestHTTP.WebSocket.Frames.WebSocketFrameReader.Read (System.IO.Stream stream) [0x00000] in /usr/local/pocketui/unity/Assets/Best HTTP (Pro)/BestHTTP/WebSocket/Frames/WebSocketFrameReader.cs:55
    4.   at BestHTTP.WebSocket.WebSocketResponse.ReceiveThreadFunc (System.Object param) [0x0000b] in /usr/local/pocketui/unity/Assets/Best HTTP (Pro)/BestHTTP/WebSocket/WebSocketResponse.cs:238
    5. UnityEngine.Debug:LogError(Object)
    6. BestHTTP.Logger.DefaultLogger:Error(String, String) (at Assets/Best HTTP (Pro)/BestHTTP/Logger/DefaultLogger.cs:76)
    7. BestHTTP.SocketIO.Transports.WebSocketTransport:OnError(WebSocket, Exception) (at Assets/Best HTTP (Pro)/BestHTTP/SocketIO/Transports/WebSocketTransport.cs:198)
    8. BestHTTP.WebSocket.WebSocket:OnInternalRequestCallback(HTTPRequest, HTTPResponse) (at Assets/Best HTTP (Pro)/BestHTTP/WebSocket/WebSocket.cs:223)
    9. BestHTTP.HTTPRequest:CallCallback() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPRequest.cs:1155)
    10. BestHTTP.HTTPConnection:HandleCallback() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPConnection.cs:795)
    11. BestHTTP.HTTPManager:OnUpdate() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPManager.cs:587)
    12. BestHTTP.HTTPManager:OnQuit() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPManager.cs:689)
    13. BestHTTP.HTTPUpdateDelegator:OnDisable() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPUpdateDelegator.cs:83)
    Getting the above in the 5.1.3f1 editor periodically after it rebuilds unrelated code. Anyone else seeing that?
     
  14. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @slumtrimpet
    I receive them too(or, at least reproduce these kind of messages), but they are because Unity doesn't shut down threads when you stop the editor. All requests are keep running. These will stop when 1.) they are finished or 2.) Unity recompiles.
     
  15. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Ah, ok. Thanks for the quick reply. I'll not worry about this one then.
     
  16. illuminat

    illuminat

    Joined:
    Jul 2, 2014
    Posts:
    40
    Hi,

    I get an error on Unity 5.0.1p3 (and also on the newest 5.1.3 build) when including the besthttp dll (basic) in the project. Platform iOS (others work fine), architecture universal, il2cpp, .net full.

    What could be wrong here? Would it be a better fit if i would go with the pro version with code only and no dlls or wouldn't that matter?


    Thanks
     
    Last edited: Sep 2, 2015
  17. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @illuminat Thanks for the detailed report. This error is already fixed in v1.9.1 and uploaded to the Unity Asset Store, but it isn't released yet by Unity. I will send you a private message with a download link for this updated package.
     
  18. illuminat

    illuminat

    Joined:
    Jul 2, 2014
    Posts:
    40
    Perfect, it works. Thank you for the fast answer!
     
  19. ayalasan

    ayalasan

    Joined:
    Dec 10, 2012
    Posts:
    16
    Hey BestHTTP,

    I am getting the following error:

    Request Finished with Error! Array index is out of range.
    at BestHTTP.HTTPResponse.Receive (Int32 forceReadRawContentLength, Boolean readPayloadData) [0x00000] in <filename unknown>:0
    at BestHTTP.HTTPConnection.Receive () [0x00000] in <filename unknown>:0
    at BestHTTP.HTTPConnection.ThreadFunc (System.Object param) [0x00000] in <filename unknown>:0

    any ideas why this could be happening?

    =======

    Just found the answer for this, already in this forum.. sorry for my impacience..

    int retryCount = req.Tag == null ? 0 : (int)req.Tag;
    if (retryCount++ <= /*maxRetry:*/ 3)
    {
    req.Tag = retryCount;

    // send the request again.
    req.Send();
    }
     
    Last edited: Sep 3, 2015
  20. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @ayalasan This error usually occurs when
    1.) The server closed the tcp channel but the plugin tried to receive a response on it. Without going into detail, you can try to lower the MaxConnectionIdleTime (the default is 30 sec, you can try different values):
    Code (CSharp):
    1.  
    2. BestHTTP.HTTPManager.MaxConnectionIdleTime = TimeSpan.FromSeconds(15);
    2.) Sometimes, when the default SSL handler can't decode the secure stream it will result in an error like this. In this case you can use the alternate SSL handler:
    Code (CSharp):
    1. BestHTTP.HTTPManager.UseAlternateSSLDefaultValue = true;
     
  21. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    255
    Hi BestHTTP,
    I just sent you an email about this but this thread is probably a better place for this question:

    Has there been any thought towards supporting PAC files for use with proxy servers? I'm in a situation where this is needed, so I'm wondering if this is something that is on the roadmap or whether we would have to add support for this ourselves, or whether it's even possible in the first place.

    Thanks
     
  22. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
  23. Lord_Pall

    Lord_Pall

    Joined:
    Sep 25, 2009
    Posts:
    52
    I'm stumped. I assume this is something silly, but still stumped.
    Trying to send binary data to socket.io.
    Client =
    byte[] data = new byte[10];
    manager.Socket.Emit("DataUpdate", data);
    (I tried sending encoded strings, and filling out the array too)

    Server (Node)
    socket.on('DataUpdate', function (BufferData)
    {
    console.log("Buffer data is "+BufferData);
    }

    Console output - Buffer data is {"_placeholder":true,"num":0}

    If I send a string it works fine.

    How do I send binary data from Unity to the node instance correctly? Is it already passed in in the event and I'm just using it incorrectly?
     
  24. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Lord_Pall This issue has been fixed in v1.9.1, but I still waiting for its release from the Unity guys. Let me know what version of the plugin you have (Basic/Pro), and i will send you a download link.
     
  25. Lord_Pall

    Lord_Pall

    Joined:
    Sep 25, 2009
    Posts:
    52
    PMed. Thanks for the quick response.
     
  26. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    178
    Hi

    I'm developing an image application that loads images from net, what i want to have is 1 instance of BestHTTP Pro that can be used to send multiple requests, and BestHTTP loads them one by one. I have also the possibility of canceling the request so lets say i made 10 reqeusts and 5 images got loaded and 5 are pending. if i call cancel method then besthttp only cancels those pending requests.
     
  27. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @aammfee
    You can send out multiple requests, but how many will be processed in parallel depends on the value of the HTTPManager.MaxConnectionPerServer property. The default value is 4, but you can change it to 1. This way requests will be processed one by one.
    You can check out my online demo, the "Texture download" sample demonstrates how you can do it: http://bit.ly/1AkM6gi

    To cancel a request you can call the Abort() function on the HTTPRequest objects. It will do what you expect, you can cancel the remaining 5 requests.
     
  28. Ly

    Ly

    Joined:
    Aug 5, 2013
    Posts:
    7
    Hi,
    I'm using BestHTTP 1.9.0 and I just tried to build an iOS version on my project with the new Unity 5.2, but I can't manage to generate XCode project :(

    Here is what I get :

    I tried to add the System.Security.Principal.GenericIdentity class into a link.xml file, switched to .Net 2.0 level, uncheck "Strip Engine Code", all of this at the same time, still the same error.

    Any idea ?
     
  29. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Ly
    I'm currently trying to investigate it. Neither of these two classes are used by the plugin directly, and i don't know yet what depends on these. As I see, your only option is to downgrade to Unity 5.1.
     
  30. Ly

    Ly

    Joined:
    Aug 5, 2013
    Posts:
    7
    Ok, thanks for your quick answer. Btw i'm using Pro version of Unity & BestHTTP. Can you reproduce this error ?
     
    Last edited: Sep 8, 2015
  31. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Ly Yes, I can. But it looks v1.9.2 is working somehow. This version is still in pending status in the Asset Store, so I will send a download link to you in private.
     
  32. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    For me, v1.9.2 compiled with the following settings:
    -IL2CPP + Engine Stipping + .NET 2.0 API compatibility
    -IL2CPP + Engine Stipping + .NET 2.0 Subset API compatibility
    -IL2CPP + .NET 2.0 API compatibility
    -IL2CPP + .NET 2.0 Subset API compatibility
     
  33. Ly

    Ly

    Joined:
    Aug 5, 2013
    Posts:
    7
    Thank you for your link. Sadly, I still can't build my project, I get the exact same error :/

    I removed completely the BestHTTP plugin and re-added with 1.9.2 version, and tried all configurations above.

    Maybe I'm missing something ?
     
  34. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Ly Well, my test project contains only the plugin, maybe is it possible that an other plugin that you use has this issue too?
     
  35. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Ly And of course I can't say for sure yet that 1.9.2 can't trigger this build problem.

    My last working setup:
    upload_2015-9-8_22-47-35.png
     
  36. Ly

    Ly

    Joined:
    Aug 5, 2013
    Posts:
    7
    Thank you for your time, I just managed to isolate and find the issue by comparing my project with a new empty one...

    To fix this, you have to lower the stripping level. Yes, the Mono stripping level. In my project it was 'use micro mscorlib', so I switched to Mono, changed to 'strip byte code', and re-switched to IL2CPP. And voila. Please don't ask me why.

    So it was absolutely not because of your great plugin. Now it works, even with 1.9.0. Sorry for your time loss. And not thank you Unity. Grmbl.
     
  37. ayalasan

    ayalasan

    Joined:
    Dec 10, 2012
    Posts:
    16
    @BestHTTP, which values for MaxConnectionIdleTime would you recommend using?

    For instance I tried with MaxConnectionIdleTime = 15 but the error is still happening.
    I tried MaxConnectionIdleTime = 3 and now the error seems to be gone.

    I am wondering, how little can this value be so that a solid connection is handled between the client and the server?
     
  38. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Ly Hahh, and it works....! :)
     
  39. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @ayalasan It depends. :) If you are sending out requests rapidly, 3 secs can be a lot of time. If you are sending requests here and there, it might be better to disable it completely to free up server resources as soon as possible.

    Also, keep-alive values can be changed on the server too, so you can experiment with different values on the server too. But usually it's easier to change values on the client as server setups may be unavailable for you.
     
  40. arodes

    arodes

    Joined:
    Sep 8, 2015
    Posts:
    5
    Hey @BestHTTP,
    your feature list only says Latest SignalR version supported. But before i buy your product I have to know if SignalR 2 is supported.

    arodes
     
    Last edited: Sep 9, 2015
  41. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @arodes I test the plugin against the latest GitHub version.
     
  42. arodes

    arodes

    Joined:
    Sep 8, 2015
    Posts:
    5
    Thanks for your help.
     
  43. ayalasan

    ayalasan

    Joined:
    Dec 10, 2012
    Posts:
    16
    @BestHTTP alrighty then :)

    Just to round up things a bit more, we are indeed throttling the server(s) quite a bit, we target 2 endpoints every 3 secs or so. Would you say having a MaxConnectionIdleTime = 1 is plausible without affecting or producing any timeouts? I will start fuzzing with client side connections only, since we don't have direct control over the servers.

    Thanks again!
     
  44. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @ayalasan If you are sending out requests less frequently than the MaxConnectionIdleTime (you are sending out requests every 3 secs, but the plugin will close the connection after 1 sec idling), then you should disable it completely:
    Code (CSharp):
    1. BestHTTP.HTTPManager.KeepAliveDefaultValue = false;
     
  45. claver

    claver

    Joined:
    May 29, 2013
    Posts:
    11
    Hi,

    I'm facing an issue on Unity 5.2 on Windows Store Universal 10 platform.
    I've created a project containing only BestHttp 1.9.0.
    I'm getting this error when I build the solution in Visual Studio.

    Task Parameter:Command="C:\Dev\Unity\testBestHttp\wsaBestHTTP\Unity\Tools\AssemblyConverter.exe" -platform=uap -lock="C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\project.lock.json" -bits=64 -path="." -path="..\Players\UAP\x64\Debug" "C:\Dev\Unity\testBestHttp\bin\UWP\x64\Debug\Assembly-CSharp.dll" "C:\Dev\Unity\testBestHttp\bin\UWP\x64\Debug\Assembly-CSharp-firstpass.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.UI.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.Networking.dll" (TaskId:252)
    3> "C:\Dev\Unity\testBestHttp\wsaBestHTTP\Unity\Tools\AssemblyConverter.exe" -platform=uap -lock="C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\project.lock.json" -bits=64 -path="." -path="..\Players\UAP\x64\Debug" "C:\Dev\Unity\testBestHttp\bin\UWP\x64\Debug\Assembly-CSharp.dll" "C:\Dev\Unity\testBestHttp\bin\UWP\x64\Debug\Assembly-CSharp-firstpass.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.UI.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.Networking.dll" (TaskId:252)
    3> System.IO.FileNotFoundException: Assembly "Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" file not found. (TaskId:252)
    3> at Unity.UWPAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters) (TaskId:252)
    3> at Unity.UWPAssemblyResolver.Resolve(AssemblyNameReference name) (TaskId:252)
    3> at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) (TaskId:252)
    3> at Mono.Cecil.TypeReference.Resolve() (TaskId:252)
    3> at Unity.MetadataContainer.ResolveType(TypeReference type) (TaskId:252)
    3> at Unity.MetadataContainer.GetAssemblyForType(TypeReference type) (TaskId:252)
    3> at Unity.AssemblyWrapper.CreateMethodWrapper(MetadataContainer metadata, TypeWrapper typeWrapper, MethodDefinition method) (TaskId:252)
    3> at Unity.AssemblyWrapper.GetCallableMethods(TypeWrapper typeWrapper, TypeDefinition type, Boolean publicOnly) (TaskId:252)
    3> at Unity.AssemblyWrapper.AddType(TypeReference type) (TaskId:252)
    3> at Unity.AssemblyWrapper.CreateMethodWrapper(MetadataContainer metadata, TypeWrapper typeWrapper, MethodDefinition method) (TaskId:252)
    3> at Unity.AssemblyWrapper.GetCallableMethods(TypeWrapper typeWrapper, TypeDefinition type, Boolean publicOnly) (TaskId:252)
    3> at Unity.AssemblyWrapper.AddType(TypeReference type) (TaskId:252)
    3> at Unity.GetTypesStep.Visit(TypeDefinition type) (TaskId:252)
    3> at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type) (TaskId:252)
    3> at Unity.TypeDefinitionDispatcher..ctor(ModuleDefinition module, ITypeDefinitionVisitor visitor) (TaskId:252)
    3> at Unity.GetTypesStep.ProcessModule() (TaskId:252)
    3> at Unity.ModuleStep.Execute() (TaskId:252)
    3> at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext) (TaskId:252)
    3> at Unity.Operation.Execute() (TaskId:252)
    3> at Unity.Program.Main(String[] args) (TaskId:252)
    3>C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\testBestHttp.csproj(242,5): error MSB3073: The command ""C:\Dev\Unity\testBestHttp\wsaBestHTTP\Unity\Tools\AssemblyConverter.exe" -platform=uap -lock="C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\project.lock.json" -bits=64 -path="." -path="..\Players\UAP\x64\Debug" "C:\Dev\Unity\testBestHttp\bin\UWP\x64\Debug\Assembly-CSharp.dll" "C:\Dev\Unity\testBestHttp\bin\UWP\x64\Debug\Assembly-CSharp-firstpass.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.UI.dll" "C:\Dev\Unity\testBestHttp\wsaBestHTTP\testBestHttp\UnityEngine.Networking.dll"" exited with code 1.
    3>Done executing task "Exec" -- FAILED. (TaskId:252)
    3>Done building target "BeforeCompile" in project "testBestHttp.csproj" -- FAILED.: (TargetId:250)

    Any ideas what I'm doing wrong?

    I see people talking about a version 1.9.2, but there's only the version 1.9.0 in the store.
    How can I get it?

    Regards
     
  46. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @claver This is a bug in Unity.
    v1.9.2 submitted to the Asset Store more then a week, but it's sill in Pending status. Already wrote to them to find out the cause of the delay.
     
  47. claver

    claver

    Joined:
    May 29, 2013
    Posts:
    11
    Thanks for your quick reply :)
     
  48. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    Finally v1.9.2 is out in the Asset Store!

    It's a cumulative update, it contains the unreleased v1.9.1 too.

    Release notes:
    1.9.2 (2015.09.03)
    General
    [Improvement] WP8 support is back!
    [Improvement] Improved compatibility with Windows 10 Universal App build for Unity 5.2
    [Improvement] Improved shutdown handling in the editor​

    1.9.1 (2015.08.26)
    General
    [Improvement] Improved error reporting on WSA platforms for TcpClient
    [New Feature] Initial and experimental file:// protocol support​
    Socket.IO
    [Bugfix] Emitting binary data wrongly converted​
    SignalR
    [Improvement] Improved logging​
    ServerSentEvents
    [Bugfix] Improved compatibility​
     
    Last edited: Sep 16, 2015
  49. Dynamoid-Megan

    Dynamoid-Megan

    Joined:
    Apr 16, 2015
    Posts:
    72
    Hello there! @BestHTTP I was wondering if you could shed some light on an error I am getting that prevents networking from working. Only some computers give this error, so I am having a hard time figuring out why it is trying to reference a local file:
    Code (CSharp):
    1. Ex [HTTPRequest]: CallCallback - Message: Object reference not set to an instance of an object  StackTrace:   at NetworkingController.OnRequestFinished (BestHTTP.HTTPRequest request, BestHTTP.HTTPResponse response) [0x0016c] in /Users/laurelin/UnityProjects/Project/Assets/Scripts/Networking/NetworkingController.cs:105
    2.   at BestHTTP.HTTPRequest.CallCallback () [0x0000b] in /Users/laurelin/UnityProjects/Project/Assets/Best HTTP (Pro)/BestHTTP/HTTPRequest.cs:1155
    3. UnityEngine.Debug:LogError(Object)
    4. BestHTTP.Logger.DefaultLogger:Exception(String, String, Exception) (at Assets/Best HTTP (Pro)/BestHTTP/Logger/DefaultLogger.cs:89)
    5. BestHTTP.HTTPRequest:CallCallback() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPRequest.cs:1159)
    6. BestHTTP.HTTPConnection:HandleCallback() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPConnection.cs:795)
    7. BestHTTP.HTTPManager:OnUpdate() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPManager.cs:537)
    8. BestHTTP.HTTPUpdateDelegator:Update() (at Assets/Best HTTP (Pro)/BestHTTP/HTTPUpdateDelegator.cs:67)
    It has come up on 2 computers when 6 others work, Mac and Windows. This error will occur in builds as well as in the Unity editor, and currently one teammate cannot get rid of it even when I try deleting my libraries and rebuilding.
     
  50. BestHTTP

    BestHTTP

    Joined:
    Sep 11, 2013
    Posts:
    1,664
    @Dynamoid Megan The exception occurred in the callback function of a http request. Can you share what's around line 105 in the Assets/Scripts/Networking/NetworkingController.cs?
    One possible reason can be if the request fails, and the response object is null.