bitrave / azure-mobile-services-for-unity3d

A suite of Azure Mobile Services plugins for Unity3D, cross platform with common interfaces, with examples
Other
67 stars 34 forks source link

Not working with WebGL #35

Open mikaelhogstrom opened 8 years ago

mikaelhogstrom commented 8 years ago

Unfortunately this does not work with WebGL for me.

If I was to hazard a guess it would be that the keyword in this stack trace is "Thread". Maybe the RestSharp.dll uses some threading that is not allowed in WebGL?

Is there a way around this? Can we make an alternative RestSharp.dll that will work for WebGL as well?

It works fine in the editor but after I build I get the following error when trying to log in:

Uncaught abort(-1) at Error at jsStackTrace (blob:https%3A//dl.dropboxusercontent.com/94e83208-c972-46aa-bed9-e0d096f7e1f9:1270:13) at stackTrace (blob:https%3A//dl.dropboxusercontent.com/94e83208-c972-46aa-bed9-e0d096f7e1f9:1287:22) at abort (blob:https%3A//dl.dropboxusercontent.com/94e83208-c972-46aa-bed9-e0d096f7e1f9:3681978:44) at _pthread_create (blob:https%3A//dl.dropboxusercontent.com/94e83208-c972-46aa-bed9-e0d096f7e1f9:9573:59) at ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2 [il2cpp::os::ThreadImpl::Run(undefined?F?, void, void_)](blob:https%3A//dl.dropboxusercontent.com/94e83208-c972-46aa-bed9-e0d096f7e1f9:68398:9) at _ZN6il2cpp2os6Thread3RunEPFvPvES2 il2cpp::os::Thread::Run(undefined?F?, void, void) at ZN6il2cpp2vm21ThreadPoolCompartment13QueueWorkItemEP17Il2CppAsyncResult il2cpp::vm::ThreadPoolCompartment::QueueWorkItem(Il2CppAsyncResult?*) at __ZN6il2cpp2vm10ThreadPool5QueueEP14Il2CppDelegatePPvS3_P12Il2CppObject il2cpp::vm::ThreadPool::Queue?S(void***) at _il2cpp_delegate_begin_invoke (blob:https%3A//dl.dropboxusercontent.com/94e83208-c972-46aa-bed9-e0d096f7e1f9:33134:8) at _WaitCallback_BeginInvoke_m1_6100 (blob:https%3A//dl.dropboxusercontent.com/94e83208-c972-46aa-bed9-e0d096f7e1f9:2833795:8)

ghost commented 8 years ago

This really needs to be reimplemented using Unity standard technologies like WWW class and JsonUtility. WebGL is very restrictive and right now I believe only WWW can make calls via WebGL builds