Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

To use dlopen, you need to use Emscripten's linking support

Discussion in 'Web' started by Homeak16, Mar 15, 2018.

  1. Homeak16

    Homeak16

    Joined:
    Feb 27, 2017
    Posts:
    19
    Hello,

    I'm trying to make an 3d model viewer in Unity.
    1. It's WebGL.
    2. It must be in runtime.
    3. For begging my target is Obj and FBX.

    Problem:
    I found some code for it, made some improvements and it worked on Windows, standalone.

    On WebGL i get error:

    An error occured running the Unity content on this page. See your browser JavaScript console for more info. The error was:
    uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace
    ...
    ...
    If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.


    I thing this is from multi-threading.

    My questions:
    1. What is "Emscripten's linking support" about?
    2. How can i avoid this error?
    I really don't want to rewrite whole .dll for this.

    I searched on Google, but most of questions about my problem are ignored and stay with no answer for long time.

    Best regards,
    Homeak
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    It would be useful to know the version of Unity. Could you also please include the stacktrace from a development build?
    Thanks
     
  3. unity_fRTMVI3G8kWxwg

    unity_fRTMVI3G8kWxwg

    Joined:
    Jul 19, 2018
    Posts:
    2
    I'm trying to use Google Draco (https://github.com/google/draco) with WebGL build and I get the same issue. I'm running Unity 2018.2.0f2 on Ubuntu 16.04.

    I've compiled the plugin and added it to my project under Assets/Plugins.
     
  4. AlexisL61

    AlexisL61

    Joined:
    May 4, 2018
    Posts:
    1
    I have the same problem
     
  5. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    I get a similar error, but am just trying to open a new browser window. Did you find a solution?
     
  6. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    @AlexisL61 @John-B
    do you have a stacktrace?
    do you have any dll plugins?
     
  7. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    How did you compile the plugin in? What's the compile target?
     
  8. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    Below is what I get with the sample .jslib file (https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html). There are two different errors, though I get that first one even if I don't include/call the .jslib file. I don't have any dll plugins. My .jslib file is just a single function, to open a new browser window, and I get the same error as with the sample code when I call my function. This is with Unity 2018.2.16f1.

    Code (JavaScript):
    1. @DllImport ("plugin") static private function Hello () {};
    2.  
    3. function Start () {
    4.     Hello();
    5. }
    [Log] OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level <OpenGL ES 2.0> ; Context handle 1 (UnityLoader.js, line 4)

    [Error] WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL
    texImage2D
    _glTexImage2D (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:312541)
    wasm-stub
    <?>.wasm-function[7261]
    <?>.wasm-function[7341]
    <?>.wasm-function[7337]
    <?>.wasm-function[7046]
    <?>.wasm-function[4712]
    <?>.wasm-function[4844]
    <?>.wasm-function[4801]
    <?>.wasm-function[9002]
    <?>.wasm-function[8989]
    <?>.wasm-function[8971]
    <?>.wasm-function[6917]
    <?>.wasm-function[6904]
    <?>.wasm-function[6885]
    <?>.wasm-function[6831]
    <?>.wasm-function[6830]
    wasm-stub
    _main
    (anonymous function) (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:456332)
    callMain (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:486776)
    doRun (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:487464)
    run (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:487637)
    runCaller (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:486398)
    removeRunDependency (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:28611)
    (anonymous function) (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:433)
    doCallback (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:92090)
    done (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:92230)
    done (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:75171)
    storeLocalEntry (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:73631)
    (anonymous function) (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:75410)
    onsuccess (blob:http://localhost:51870/b7eb1093-79e6-440f-93a8-ddac09720d7d:2:73981)

    An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
    abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace (spatial_vision_webgl.wasm.framework.unityweb:2:22370)
    stackTrace (spatial_vision_webgl.wasm.framework.unityweb:2:22544)
    onAbort@http://localhost:51870/Build/UnityLoader.js:4:10660
    abort (spatial_vision_webgl.wasm.framework.unityweb:2:488067)
    _dlopen (spatial_vision_webgl.wasm.framework.unityweb:2:200028)
    wasm-stub@[wasm code]
    <?>.wasm-function[35102]@[wasm code]
    <?>.wasm-function[34739]@[wasm code]
    <?>.wasm-function[35652]@[wasm code]
    <?>.wasm-function[35651]@[wasm code]
    <?>.wasm-function[35653]@[wasm code]
    <?>.wasm-function[20412]@[wasm code]
    <?>.wasm-function[36044]@[wasm code]
    wasm-stub@[wasm code]
    dynCall_iiiii@[native code]
    blob:http://localhost:51870/ea7690e2-0375-4990-a4fd-bcdd058c40a4:2:465857
    invoke_iiiii (spatial_vision_webgl.wasm.framework.unityweb:2:351989)
    wasm-stub@[wasm code]
    <?>.wasm-function[34142]@[wasm code]
    <?>.wasm-function[34497]@[wasm code]
    <?>.wasm-function[2340]@[wasm code]
    <?>.wasm-function[2339]@[wasm code]
    <?>.wasm-function[3852]@[wasm code]
    <?>.wasm-function[3847]@[wasm code]
    <?>.wasm-function[6746]@[wasm code]
    <?>.wasm-function[4526]@[wasm code]
    <?>.wasm-function[7489]@[wasm code]
    <?>.wasm-function[6843]@[wasm code]
    <?>.wasm-function[6843]@[wasm code]
    <?>.wasm-function[6838]@[wasm code]
    <?>.wasm-function[6832]@[wasm code]
    <?>.wasm-function[34757]@[wasm code]
    wasm-stub@[wasm code]
    dynCall_v@[native code]
    blob:http://localhost:51870/ea7690e2-0375-4990-a4fd-bcdd058c40a4:2:473268
    browserIterationFunc (spatial_vision_webgl.wasm.framework.unityweb:2:124558)
    runIter (spatial_vision_webgl.wasm.framework.unityweb:2:127635)
    Browser_mainLoop_runner (spatial_vision_webgl.wasm.framework.unityweb:2:126100)​
     
    Last edited: Dec 8, 2018
  9. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    177
    Hey did you ever solve this? We're seeing the same thing.
     
  10. haraman

    haraman

    Joined:
    May 22, 2019
    Posts:
    1
    I'm getting this error too - would really appreciate any tips for solutions.
     
  11. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    Dynamic linking, i.e. @DllImport statements, are not supported by WebAssembly (in a form that would be useful to Unity WebGL plugin builds at least). When compiling plugins, the plugins should be authored to link statically to the project instead.
     
  12. PriyankaMJJOdico

    PriyankaMJJOdico

    Joined:
    Oct 17, 2019
    Posts:
    2
    How to make the plugins authored to link statically to the project instead?????
    i have got this error.



    Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at Error
    at jsStackTrace (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:943:12)
    at Object.stackTrace (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:957:11)
    at Object.onAbort (http://localhost:64343/Build/UnityLoader.js:1138:50)
    at abort (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:27298:20)
    at _dlopen (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:9082:2)
    at __ZN6il2cpp2osL19LoadLibraryWithNameEPKci [il2cpp::eek:s::LoadLibraryWithName(char const*, int)] (wasm-function[35184]:0xb1f7a0)
    at __ZN6il2cpp2os13LibraryLoader18LoadDynamicLibraryERKNS_5utils10StringViewIcEEi [il2cpp::eek:s::LibraryLoader::LoadDynamicLibrary(il2cpp::utils::StringView<char> const&, int)] (wasm-function[35183]:0xb1f6ac)
    at __ZN6il2cpp2os13LibraryLoader18LoadDynamicLibraryERKNS_5utils10StringViewIcEE [il2cpp::eek:s::LibraryLoader::LoadDynamicLibrary(il2cpp::utils::StringView<char> const&)] (wasm-function[35182]:0xb1f606)
    at __ZN6il2cpp2vm13LibraryLoader18LoadDynamicLibraryENS_5utils10StringViewIcEE [il2cpp::vm::LibraryLoader::LoadDynamicLibrary(il2cpp::utils::StringView<char>)] (wasm-function[36767]:0xb537ac)
    at __ZN6il2cpp2vm14PlatformInvoke7ResolveERK16PInvokeArguments [il2cpp::vm::platformInvoke::Resolve(PInvokeArguments const&)] (wasm-function[36954]:0xb5adc0)
    at __Z22il2cpp_codegen_resolveRK16PInvokeArguments [il2cpp_codegen_resolve(PInvokeArguments const&)] (wasm-function[38122]:0xb820ee)
    at __Z30il2cpp_codegen_resolve_pinvokeIPFilELm5ELm6EET_RAT0__KcRAT1__S3_20Il2CppCallConvention13Il2CppCharSetib [int (*il2cpp_codegen_resolve_pinvoke<int (*)(long), 5ul, 6ul>(char const (&) [5ul], char const (&) [6ul], Il2CppCallConvention, Il2CppCharSet, int, bool))(long)] (wasm-function[50277]:0xdc2cae)
    at _Platform_uname_m0769828FE0BC855E1DE4129D7EBE09E999D7AB7D (wasm-function[50276]:0xdc2c2a)
    at dynCall_iii (wasm-function[69259]:0x12088ce)
    at Object.dynCall_iii (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:25866:38)
    at invoke_iii (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:16818:31)
    at _Platform_CheckOS_mE140C06A839F2EA49C9A0FE795A85311E283CC45 (wasm-function[50275]:0xdc2a46)
    at dynCall_vi (wasm-function[69359]:0x12093c0)
    at Object.dynCall_vi (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:26366:37)
    at invoke_vi (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:17818:23)
    at _Platform_get_IsMacOS_m7E1B4DAEFA519F65C50D16CC5DEA7A9FA0EE4D77 (wasm-function[50273]:0xdc289a)
    at _WebProxy_CreateDefaultProxy_m0F1C8D957370920707869349941412B6BC3323A5 (wasm-function[50272]:0xdc27cc)
    at _DefaultProxySectionInternal_GetSystemWebProxy_m7BE3F8E1011DD7156B05BEA3264DB8ED549072C0 (wasm-function[57037]:0xf1f5f0)
    at _DefaultProxySectionInternal_GetDefaultProxy_UsingOldMonoCode_m1FBAB2FA8C0B87ADA0523CAA34F9D5230098A795 (wasm-function[57036]:0xf1f5e7)
    at _GC_call_with_alloc_lock (wasm-function[37548]:0xb70aee)
    at Object.dynCall_ii (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:25781:37)
    at invoke_ii (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:16648:30)
    at _DefaultProxySectionInternal_GetSection_mC140525EBD14DF74602DFCA7AFECE376AFADE34F (wasm-function[57039]:0xf1f73f)
    at _GC_call_with_alloc_lock (wasm-function[37548]:0xb70aee)
    at Object.dynCall_ii (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:25781:37)
    at invoke_ii (blob:http://localhost:64343/4b2965f4-136d-4a9c-b7ff-a60c11c32a0c:16648:30)
    at _WebRequest_get_InternalDefaultWebProxy_m13E2CAB3FE298CF26023A3626454FE989CF687C7 (wasm-function[50316]:0xdc4331)
    at _HttpWebRequest__ctor_m85AA1BD537DCDBF3B1BCD75F6C93C6AA8B831D7F (wasm-function[56631]:0xf0963c)
    at _HttpRequestCreator_Create_mE3E077C98503C150AA328D4EED41FE9F8F518F46 (wasm-function[56630]:0xf0950f)
    at __ZN21InterfaceFuncInvoker1IP12Il2CppObjectiE6InvokeEjP11Il2CppClassS1_i [InterfaceFuncInvoker1<Il2CppObject*, int>::Invoke(unsigned int, Il2CppClass*, Il2CppObject*, int)] (wasm-function[24719]:0x94f84c)
    at _WebRequest_Create_mB04C3982BCF4D3A684678E19209C1023E30180E6 (wasm-function[50279]:0xdc2eb5)
    at _WebRequest_Create_m35EB35D743484ADC1FB4FEB5062B657C849455A9 (wasm-function[50285]:0xdc3698)
    at _XmlDownloadManager_GetNonFileStream_mB254CBDF76657908A88D7170B723A198013C49C8 (wasm-function[47779]:0xd219c3)
    at _XmlDownloadManager_GetStream_mD7A14E8675B8CAE8AC4AF96D53CD430024A60525 (wasm-function[47778]:0xd21928)
    at _XmlUrlResolver_GetEntity_m48F7349856F393B8FF6990C85993D607989E8663 (wasm-function[24504]:0x94aa3c)
    at __ZN16VirtFuncInvoker3IP54XmlAttribute_tEAB5F066D1D6965D6528617BD89826AE7114DEFAP8String_tS3_S3_E6InvokeEjP12Il2CppObjectS3_S3_S3_ [VirtFuncInvoker3<XmlAttribute_tEAB5F066D1D6965D6528617BD89826AE7114DEFA*, String_t*, String_t*, String_t*>::Invoke(unsigned int, Il2CppObject*, String_t*, String_t*, String_t*)] (wasm-function[24494]:0x94a779)
    at _XmlTextReaderImpl_FinishInitUriString_m4D6ED0E17DF96E3F73EAFE089654731DADF19394 (wasm-function[42520]:0xc101ef)
    at _XmlTextReaderImpl__ctor_m567D74D1FE4DC2CFE9F0AA05729AAFD2E6273CB4 (wasm-function[42513]:0xc0faa8)
    at _XmlReaderSettings_CreateReader_m4B3E2B51531AF1649ABC590FEA4ABE27D2BCC36C (wasm-function[42511]:0xc0f8ea)
    at _XmlReader_Create_mC8945E3678ACA2F53393332292140A437549C49B (wasm-function[42509]:0xc0f80a)
    at _XmlReader_Create_mA4C185E282646BCEB4965323B106BE3C76BC4333 (wasm-function[42508]:0xc0f7bf)
    at _XElement_Load_m65B736368A30F87E863A2C6EB3B9133B65A9D528 (wasm-function[33477]:0xadff01)
    at _XElement_Load_m03C46EE887AED551086D7FD650F67E734FE4A476 (wasm-function[33476]:0xadfe6b)
    at _WireCutMaster_CreateModelFromConfig_mBA892C28AF892A62B105AE7D61C0AC332992DA7C (wasm-function[68480]:0x11d2bf0)
    at _WireCutMaster_CreateViews_m1FE6219943D670B803E049E35C7A70C60B0F43C5 (wasm-function[68479]:0x11d1fdb)
     
    Last edited: Oct 18, 2019
    mmmshuddup likes this.
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Thanks for the call stack! It looks like the Mono class libraries that Unity ships with are trying to p/invoke into a native library which i won't work for WebGL. I think that is an issue we need to address on the Unity side. Can you submit a bug report and include this project?
     
    Psyco92 and PriyankaMJJOdico like this.
  14. PriyankaMJJOdico

    PriyankaMJJOdico

    Joined:
    Oct 17, 2019
    Posts:
    2

    Thank you so much for the reply. I wish to get the solution soon so that i can complete with my project. :)
     
  15. tim_lol

    tim_lol

    Joined:
    Jul 25, 2018
    Posts:
    14
    I'm not sure if this is helpful or not, but I got this error after upgrading to Unity 2019.2.9f1. It was previously working in 2019.1.7f1.

    (Also @PriyankaMJJOdico how did you get readable stacktraces like that?)

    Code (CSharp):
    1. To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking
    2. printErr    @    UnityLoader.js:4
    3. onAbort    @    UnityLoader.js:4
    4. abort    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    5. _dlopen    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    6. (anonymous)    @    wasm-043836ee-46653:1
    7. (anonymous)    @    wasm-043836ee-47776:1
    8. (anonymous)    @    wasm-043836ee-34565:1
    9. (anonymous)    @    wasm-043836ee-34564:1
    10. (anonymous)    @    wasm-043836ee-48961:1
    11. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    12. invoke_iiiiii    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    13. (anonymous)    @    wasm-043836ee-28287:1
    14. (anonymous)    @    wasm-043836ee-48987:1
    15. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    16. invoke_viii    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    17. (anonymous)    @    wasm-043836ee-28400:1
    18. (anonymous)    @    wasm-043836ee-28398:1
    19. (anonymous)    @    wasm-043836ee-28397:1
    20. (anonymous)    @    wasm-043836ee-28396:1
    21. (anonymous)    @    wasm-043836ee-39647:1
    22. (anonymous)    @    wasm-043836ee-39650:1
    23. (anonymous)    @    wasm-043836ee-21134:1
    24. (anonymous)    @    wasm-043836ee-48959:1
    25. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    26. invoke_iiiii    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    27. (anonymous)    @    wasm-043836ee-47103:1
    28. (anonymous)    @    wasm-043836ee-47105:1
    29. (anonymous)    @    wasm-043836ee-27757:1
    30. (anonymous)    @    wasm-043836ee-27753:1
    31. (anonymous)    @    wasm-043836ee-28127:1
    32. (anonymous)    @    wasm-043836ee-28130:1
    33. (anonymous)    @    wasm-043836ee-29661:1
    34. (anonymous)    @    wasm-043836ee-23839:1
    35. (anonymous)    @    wasm-043836ee-23843:1
    36. (anonymous)    @    wasm-043836ee-21149:1
    37. (anonymous)    @    wasm-043836ee-48959:1
    38. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    39. invoke_iiiii    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    40. (anonymous)    @    wasm-043836ee-47103:1
    41. (anonymous)    @    wasm-043836ee-48035:1
    42. (anonymous)    @    wasm-043836ee-48034:1
    43. (anonymous)    @    wasm-043836ee-48033:1
    44. (anonymous)    @    wasm-043836ee-46769:1
    45. (anonymous)    @    wasm-043836ee-39496:1
    46. (anonymous)    @    wasm-043836ee-48961:1
    47. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    48. invoke_iiiiii    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    49. (anonymous)    @    wasm-043836ee-39500:1
    50. (anonymous)    @    wasm-043836ee-31244:1
    51. (anonymous)    @    wasm-043836ee-31243:1
    52. (anonymous)    @    wasm-043836ee-31240:1
    53. (anonymous)    @    wasm-043836ee-34798:1
    54. (anonymous)    @    wasm-043836ee-28130:1
    55. (anonymous)    @    wasm-043836ee-28125:1
    56. (anonymous)    @    wasm-043836ee-25656:1
    57. (anonymous)    @    wasm-043836ee-33820:1
    58. (anonymous)    @    wasm-043836ee-45567:1
    59. (anonymous)    @    wasm-043836ee-22835:1
    60. (anonymous)    @    wasm-043836ee-48958:1
    61. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    62. invoke_iiii    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    63. (anonymous)    @    wasm-043836ee-45476:1
    64. (anonymous)    @    wasm-043836ee-45474:1
    65. (anonymous)    @    wasm-043836ee-29771:1
    66. (anonymous)    @    wasm-043836ee-22726:1
    67. (anonymous)    @    wasm-043836ee-48987:1
    68. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    69. invoke_viii    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    70. (anonymous)    @    wasm-043836ee-26662:1
    71. (anonymous)    @    wasm-043836ee-22802:1
    72. (anonymous)    @    wasm-043836ee-38825:1
    73. (anonymous)    @    wasm-043836ee-21362:1
    74. (anonymous)    @    wasm-043836ee-48959:1
    75. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    76. invoke_iiiii    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    77. (anonymous)    @    wasm-043836ee-47103:1
    78. (anonymous)    @    wasm-043836ee-46583:1
    79. (anonymous)    @    wasm-043836ee-5188:1
    80. (anonymous)    @    wasm-043836ee-5187:1
    81. (anonymous)    @    wasm-043836ee-8709:1
    82. (anonymous)    @    wasm-043836ee-8707:1
    83. (anonymous)    @    wasm-043836ee-8711:1
    84. (anonymous)    @    wasm-043836ee-9956:1
    85. (anonymous)    @    wasm-043836ee-20020:1
    86. (anonymous)    @    wasm-043836ee-19994:1
    87. (anonymous)    @    wasm-043836ee-12487:1
    88. (anonymous)    @    wasm-043836ee-11517:1
    89. (anonymous)    @    wasm-043836ee-11266:1
    90. (anonymous)    @    wasm-043836ee-11266:1
    91. (anonymous)    @    wasm-043836ee-11258:1
    92. (anonymous)    @    wasm-043836ee-11252:1
    93. (anonymous)    @    wasm-043836ee-48974:1
    94. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    95. browserIterationFunc    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    96. runIter    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    97. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    98. requestAnimationFrame (async)    
    99. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    100. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    101. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    102. requestAnimationFrame (async)    
    103. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    104. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    105. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    106. requestAnimationFrame (async)    
    107. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    108. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    109. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    110. requestAnimationFrame (async)    
    111. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    112. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    113. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    114. requestAnimationFrame (async)    
    115. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    116. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    117. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    118. requestAnimationFrame (async)    
    119. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    120. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    121. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    122. requestAnimationFrame (async)    
    123. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    124. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    125. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    126. requestAnimationFrame (async)    
    127. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    128. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    129. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    130. requestAnimationFrame (async)    
    131. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    132. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    133. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    134. requestAnimationFrame (async)    
    135. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    136. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    137. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    138. requestAnimationFrame (async)    
    139. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    140. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    141. Browser_mainLoop_runner    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    142. requestAnimationFrame (async)    
    143. requestAnimationFrame    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    144. Browser_mainLoop_scheduler_rAF    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    145. _emscripten_set_main_loop    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    146. (anonymous)    @    wasm-043836ee-11250:1
    147. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    148. callMain    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    149. doRun    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    150. run    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    151. runCaller    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    152. removeRunDependency    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    153. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    154. doCallback    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    155. done    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    156. done    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    157. storeLocalEntry    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    158. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    159. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    160. IndexedDB (async)    
    161. loadRemoteEntry    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    162. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    163. reconcile    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    164. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    165. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    166. IndexedDB (async)    
    167. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    168. success (async)    
    169. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    170. IndexedDB (async)    
    171. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    172. success (async)    
    173. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    174. IndexedDB (async)    
    175. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    176. success (async)    
    177. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    178. IndexedDB (async)    
    179. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    180. success (async)    
    181. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    182. IndexedDB (async)    
    183. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    184. success (async)    
    185. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    186. IndexedDB (async)    
    187. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    188. success (async)    
    189. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    190. IndexedDB (async)    
    191. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    192. success (async)    
    193. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    194. IndexedDB (async)    
    195. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    196. success (async)    
    197. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    198. IndexedDB (async)    
    199. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    200. success (async)    
    201. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8
    202. IndexedDB (async)    
    203. (anonymous)    @    78f78d82-d9b9-401f-8df6-b772427894ab:8

    Code (CSharp):
    1. 78f78d82-d9b9-401f-8df6-b772427894ab:8 Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at Error
    2.     at jsStackTrace (blob:[url]78f78d82-d9b9-401f-8df6-b772427894ab:8:22295)
    3.     at Object.stackTrace (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:22466)
    4.     at Object.onAbort ([url]/Build/UnityLoader.js:4:11023)
    5.     at abort (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:477187)
    6.     at _dlopen (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:161037)
    7.     at wasm-function[46653]:0xe43983
    8.     at wasm-function[47776]:0xe7283a
    9.     at wasm-function[34565]:0xbe473f
    10.     at wasm-function[34564]:0xbe46ac
    11.     at wasm-function[48961]:0xeab98a
    12.     at Object.dynCall_iiiiii (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:452369)
    13.     at invoke_iiiiii (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:327198)
    14.     at wasm-function[28287]:0xaad1a2
    15.     at wasm-function[48987]:0xeabcb3
    16.     at Object.dynCall_viii (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:466230)
    17.     at invoke_viii (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:352820)
    18.     at wasm-function[28400]:0xab8491
    19.     at wasm-function[28398]:0xab7fbe
    20.     at wasm-function[28397]:0xab7f15
    21.     at wasm-function[28396]:0xab7f06
    22.     at wasm-function[39647]:0xca78d3
    23.     at wasm-function[39650]:0xca7944
    24.     at wasm-function[21134]:0x952cbf
    25.     at wasm-function[48959]:0xeab957
    26.     at Object.dynCall_iiiii (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:452003)
    27.     at invoke_iiiii (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:326520)
    28.     at wasm-function[47103]:0xe57591
    29.     at wasm-function[47105]:0xe5778a
    30.     at wasm-function[27757]:0xa8f532
    31.     at wasm-function[27753]:0xa8f212
    32.     at wasm-function[28127]:0xaa5560
    33.     at wasm-function[28130]:0xaa581b
    34.     at wasm-function[29661]:0xafa090
    35.     at wasm-function[23839]:0x9ad72f
    36.     at wasm-function[23843]:0x9ad8b1
    37.     at wasm-function[21149]:0x952f58
    38.     at wasm-function[48959]:0xeab957
    39.     at Object.dynCall_iiiii (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:452003)
    40.     at invoke_iiiii (blob:[url]/78f78d82-d9b9-401f-8df6-b772427894ab:8:326520)
    41.     at wasm-function[47103]:0xe57591
    42.     at wasm-function[48035]:0xe7d896
    43.     at wasm-function[48034]:0xe7d77c
    44.     at wasm-function[48033]:0xe7d536
    45.     at wasm-function[46769]:0xe4848d
    46.     at wasm-function[39496]:0xca3d74
    47.     at wasm-function[48961]:0xeab98a
    48.     at Object.dynCall_iiiiii (blob:[url]78f78d82-d9b9-401f-8df6-b772427894ab:8:452369)
    49.     at invoke_iiiiii (blob:[url]78f78d82-d9b9-401f-8df6-b772427894ab:8:327198)
    50.     at wasm-function[39500]:0xca41a8
    51.     at wasm-function[31244]:0xb50189
     
    Last edited: Oct 22, 2019
  16. xan217

    xan217

    Joined:
    Nov 1, 2019
    Posts:
    1
    Hello people... Someone have an answer for this..???

    I have the same error, in my case, in my project I just have 2 APIs call, nothing more, and the error is rising... I´m not using extra plugins or anything too complex, just UnityWebRequest and JsonUtility to connect with Watson trough URL (because the Watson plugin doesn´t work for WebGL build). If someone can helpme with this, I apreciate really hard. I have a deadline in a month and I need that conection working.

    If you need anything about the code to how I´m handling this, I have no problem in share the whole connection.
     
  17. hholanda

    hholanda

    Joined:
    Jan 26, 2019
    Posts:
    1
    Hello,

    Was having the same problem for WebGL build. Seems to work when I remove:

    Code (CSharp):
    1. using System.Net.WebSockets;
    2. using System.Threading;
    3. using System.Threading.Tasks;
    which I was aware of not being compatible with WebGL build, but I thought that it would be a problem only if I started multithreading (which I was trying to avoid).

    Is this discussion still running? Is there a workaround in this regard?
     
  18. bansheesoft

    bansheesoft

    Joined:
    Oct 3, 2014
    Posts:
    62
    In hopes to save others this nightmare, this worked for me. I also had to rip out Oculus rift items. I had a thread chunk of code of my own I removed. Then it magically worked.

    Thanks for the tip you saved me hours!
     
    mmmshuddup likes this.
  19. jwlondon98

    jwlondon98

    Joined:
    Mar 27, 2015
    Posts:
    12
    Removing System.Net.WebSockets might not be an option for some people, like me. Hopefully Unity fixes this issue soon.
     
  20. bansheesoft

    bansheesoft

    Joined:
    Oct 3, 2014
    Posts:
    62
    I wanted to bump this thread as it again saved me a ton of time. I use Bakery by MR.F. and boy do I recommend it for baking. Worth every penny BY FAR. But I had to add a thread sleep to his rendering pipeline over the net as it spammed the sockets into submission. AND that led to this error again. I just hope I save someone else the time also.

    The chunk of code I had to edit is below.
    The thread sleep is what I had to comment.

    Code (CSharp):
    1.     public static bool SendRenderSequence(byte[] renderSequence)
    2.     {
    3.         Socket soc = null;
    4.         var ipAdd = System.Net.IPAddress.Parse(serverAddress);
    5.         var remoteEP = new IPEndPoint(ipAdd, serverPort);
    6.  
    7.         for(int i=0; i<serverFileList.Count; i++)
    8.         {
    9.            // System.Threading.Thread.Sleep(300);
    10.  
    11.             var fsoc = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
    12.             fsoc.Connect(remoteEP);
    13.             if (!fsoc.Poll(0, SelectMode.SelectWrite)) return false;
    14.  
    15.             var sceneFile = File.ReadAllBytes(ftRenderLightmap.scenePath + "/" + serverFileList[i]);
    16.             int headerSize = 5 + serverFileList[i].Length + 1;
    17.             var buff = new byte[sceneFile.Length + headerSize];
    18.  
    19.             int numTasks = 1;
    20.             System.Buffer.BlockCopy(System.BitConverter.GetBytes(numTasks), 0, buff, 0, 4);
    21.             buff[4] = SERVERTASK_RECEIVEFILE;
    22.             buff[5] = (byte)serverFileList[i].Length;
    23.             for(int j=0; j<serverFileList[i].Length; j++) buff[6+j] = (byte)serverFileList[i][j];
    24.             System.Buffer.BlockCopy(sceneFile, 0, buff, headerSize, sceneFile.Length);
    25.  
    26.             fsoc.Send(buff);
    27.             fsoc.Close();
    28.         }
    29.  
    30.         soc = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
    31.         soc.Connect(remoteEP);
    32.         if (!soc.Poll(0, SelectMode.SelectWrite)) return false;
    33.         soc.Send(renderSequence);
    34.         soc.Close();
    35.         return true;
    36.     }
     
    SciCodeStudio likes this.
  21. estradap

    estradap

    Joined:
    Jun 6, 2017
    Posts:
    6
    Is there a bug report tracking this issue? We are seeing the same thing. Our code base is multiplatform and we use ConcurrentDictionary for several data structures. Are they supported in WebGL builds or do we need to use conditional compilation on ConcurrentDictionary to replace it with Dictionary?
     
  22. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    583
  23. jerotv

    jerotv

    Joined:
    Dec 6, 2017
    Posts:
    3
    Hello,
    I made a simple test to insert new data in my database hosted in a webserver. I´m using a php file hosted also in the webserver which take the data from a Unity form and put in into the database, users table..
    It works when running from Unity editor. The external database is updated as expected. Then I built the app to WEBGL and here it is again the Emscripten´s error, which has been notified in March 2018 and as far as I can see in this thread, nobody has come through the solution.

    I will add that there´s no problem with SELECT queries . It works before and after building as I successfully tested a login form.

    this is the error:

    Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at Error
    at jsStackTrace ()
    at Object.stackTrace ()
    at Object.onAbort ()
    at abort ()
    at _dlopen ()
    at wasm-function[34119]:0x92cd3e
    at wasm-function[33750]:0x91d855
    at wasm-function[20888]:0x67e822
    at wasm-function[20887]:0x67e797
    at wasm-function[20886]:0x67e76c
    at wasm-function[20889]:0x67e943
    at wasm-function[14811]:0x57eae5
    at wasm-function[35019]:0x957832
    at Object.dynCall_iii ()
    at invoke_iii ()
    at wasm-function[20880]:0x67e4aa
    at wasm-function[20879]:0x67e400
    at wasm-function[32391]:0x8e3389
    at wasm-function[32398]:0x8e36d7
    at wasm-function[16125]:0x5bbf5a
    at wasm-function[21766]:0x6a1bcf
    at wasm-function[21790]:0x6a2dff
    at wasm-function[19353]:0x642b6a
    at wasm-function[19354]:0x642b80
    at wasm-function[14800]:0x57dcb5
    at wasm-function[19160]:0x639fe5
    at wasm-function[15146]:0x58a82e
    at wasm-function[35044]:0x957b54
    at Object.dynCall_viiii ()
    at invoke_viiii ()
    at wasm-function[18658]:0x611cf4
    at wasm-function[19099]:0x638887
    at wasm-function[19305]:0x6406c2
    at wasm-function[19304]:0x64008d
    at wasm-function[19303]:0x63ff9b
    at wasm-function[19298]:0x63f927
    at wasm-function[15493]:0x598377
    at wasm-function[19130]:0x6398e9
    at wasm-function[16307]:0x5c1909
    at wasm-function[35021]:0x957862
    at Object.dynCall_iiiii ()
    at invoke_iiiii ()
    at wasm-function[32958]:0x8fb477
    at wasm-function[33376]:0x90bee1
    at wasm-function[2575]:0x12cb5d
    at wasm-function[2574]:0x12cac9
    at wasm-function[7649]:0x307ce8
    at wasm-function[7633]:0x306755
    at wasm-function[10145]:0x42d5ec
    at wasm-function[10144]:0x42d306


    before building (I use a Text object to display the insert query, which is correct) --> this update the database hosted in a webserver from IONOS.

    running-from-unity.jpg


    after built it in webgl (Unity version 2018.4.17f1) I got the famous error:

    running-online.png



    And here part of the code I´m using:

    IEnumerator CreateUser(string username, string password, string email, string mac)
    {

    //id = GameObject.Find("LastID").GetComponent<LastIDUsers>().siguiente_id.ToString();
    id = this.GetComponent<LastIDUsers>().siguiente_id.ToString();

    //these are the variables that will be posted in php file:
    WWWForm form = new WWWForm();
    form.AddField("idPost", id);
    form.AddField("usernamePost", username);
    form.AddField("passwordPost", password);
    form.AddField("emailPost", email);
    form.AddField("macPost", mac);


    WWW www = new WWW(LoginURL, form);
    yield return www;
    showQuery.GetComponent<Text>().text = www.text;
    }[/code]

    and the php file:

    Code (CSharp):
    1. <?php
    2. $host_name = '[B]**********[/B]';
    3. $database = '[B]**********'[/B];
    4. $user_name = '[B]**********[/B]';
    5. $password = [B]'**********[/B]';
    6.  
    7. $pdo = new PDO("mysql:host=$host_name; dbname=$database;", $user_name, $password);
    8.  
    9. //variables para la inserción que vienen de un formulario de Unity (scrip DataInserter)
    10. $id = $_POST["idPost"];
    11. $username = $_POST["usernamePost"];
    12. $email = $_POST["emailPost"];
    13. $password = $_POST["passwordPost"];
    14. $mac = $_POST["macPost"];
    15.  
    16. echo "INSERT INTO users (id, username, password, email, mac)
    17.        VALUES ('".$id."','".$username."','".$password."','".$email."','".$mac."')";
    18.  
    19. $sql = "INSERT INTO users (id, username, password, email, mac)
    20.        VALUES ('".$id."','".$username."','".$password."','".$email."','".$mac."')";
    21. if ($pdo->exec($sql) === 1)
    22.   echo "New record created successfully";
    23. ?>
    24.  
    25.  
    26. Can anyone help me with this? I can provide the whole project if needed.
    27.  
    28. Thanks for your time,
    29. Jerónimo Trigueros.
     
    Last edited: Feb 23, 2020
  24. deba124

    deba124

    Joined:
    Feb 20, 2018
    Posts:
    3
    If you are using [DllImport("_Internal")] then you have used only one underscore before the internal word, but actually there is double underscore [DllImport("__Internal")], so use this, and the problem will be solved.
     
    vivekjha_hash, brandav and Ikun like this.
  25. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    583
    That's definitely not the problem in my case. It works just fine in 2019.1.14 but not in any 19.2.X or 19.3.X.

    https://forum.unity.com/threads/runtime-errors-in-newer-versions-of-unity.835693/
     
  26. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    583
    Last edited: Mar 25, 2020
  27. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    583
  28. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Twyker_gp likes this.
  29. saniller

    saniller

    Joined:
    May 7, 2019
    Posts:
    1
    The same problem was solved by changing use of ConcurrentDictionary to Dictionary.
     
  30. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
  31. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Hello, PriyankaMJJOdico.

    In your specific case the issue is caused by the XElement.Load(string uri), which relies on the xml file being loaded synchronously from the web and therefore it internally uses multi-threading functionality which is currently not supported on WebGL. Downloading a file synchronously without multi-threading is also not supported in WebGL because synchronous XMLHttpRequest is currently in a deprecation state.
    The workaround would be to download the xml file in advance (i.e. using UnityWebRequest) and then parse it directly from the string using XElement.Load(TextReader textReader). This approach also doesn't involve any platform checks which originally caused the mentioned dlopen() error.
     
  32. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Hello, jerotv.

    I tried to run your code on 2018.4.17f1 and it seems to work just fine. There might have been some other code which causes the error. Could you create a bug report and attach the original project there so that your issue can be investigated?
     
  33. Jamsa78

    Jamsa78

    Joined:
    Mar 29, 2017
    Posts:
    96
    I also have this problem.

    I'm using Unity 2019.3.13f1, building a webgl program, trying to connect to my mysql database(<- hosted elsewhere, testbuild running on localhost).

    My code:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.Networking;
    5. using System;
    6. using MySql.Data.MySqlClient;
    7. using System.Data;
    8.  
    9. public class SaveLoadOnline : MonoBehaviour
    10. {
    11.     public string LoadURL = "";
    12.     public string XMLDoc;
    13.  
    14.     private float progress;
    15.  
    16.     public string BeginLoad(int intMXID)
    17.     {
    18.         string cs = @"server=*;userid=*;
    19.           password=*;database=*"; //super secret
    20.  
    21.         MySqlConnection conn = null;
    22.  
    23.         try
    24.         {
    25.             conn = new MySqlConnection(cs);
    26.             conn.Open();
    27.  
    28.             MySqlCommand cmd = new MySqlCommand();
    29.             cmd.Connection = conn;
    30.             cmd.CommandText = "SELECT xmlFile FROM GC3_Matrix WHERE MXID=" + intMXID;
    31.             cmd.Prepare();
    32.          
    33.             IDataReader reader = cmd.ExecuteReader();
    34.  
    35.             while (reader.Read())
    36.             {
    37.                 XMLDoc = reader["xmlFile"].ToString();
    38.             }
    39.         }
    40.         catch (MySqlException ex)
    41.         {
    42.             Debug.Log("Error: " + ex.ToString());
    43.         }
    44.     }
    45. }
    The error (browser: chrome):
    Code (CSharp):
    1. 75d31edc-a126-44ec-ba8a-e88e75bae33e:9406 Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at Error
    2.     at jsStackTrace (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:942:12)
    3.     at Object.stackTrace (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:956:11)
    4.     at Object.onAbort (http://localhost:54898/Build/UnityLoader.js:1139:50)
    5.     at abort (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:26847:20)
    6.     at _dlopen (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:9141:2)
    7.     at __ZN6il2cpp2osL19LoadLibraryWithNameEPKci [il2cpp::os::LoadLibraryWithName(char const*, int)] (<anonymous>:wasm-function[53592]:0xcc2636)
    8.     at __ZN6il2cpp2os13LibraryLoader18LoadDynamicLibraryERKNS_5utils10StringViewIcEEi [il2cpp::os::LibraryLoader::LoadDynamicLibrary(il2cpp::utils::StringView<char> const&, int)] (<anonymous>:wasm-function[53591]:0xcc2542)
    9.     at __ZN6il2cpp2os13LibraryLoader18LoadDynamicLibraryERKNS_5utils10StringViewIcEE [il2cpp::os::LibraryLoader::LoadDynamicLibrary(il2cpp::utils::StringView<char> const&)] (<anonymous>:wasm-function[53590]:0xcc249c)
    10.     at __ZN6il2cpp2vm13LibraryLoader18LoadDynamicLibraryENS_5utils10StringViewIcEE [il2cpp::vm::LibraryLoader::LoadDynamicLibrary(il2cpp::utils::StringView<char>)] (<anonymous>:wasm-function[55452]:0xd009ad)
    11.     at __ZN6il2cpp2vm14PlatformInvoke7ResolveERK16PInvokeArguments [il2cpp::vm::PlatformInvoke::Resolve(PInvokeArguments const&)] (<anonymous>:wasm-function[55552]:0xd04c33)
    12.     at __Z22il2cpp_codegen_resolveRK16PInvokeArguments [il2cpp_codegen_resolve(PInvokeArguments const&)] (<anonymous>:wasm-function[56584]:0xd271d0)
    13.     at __Z30il2cpp_codegen_resolve_pinvokeIPFiPcjELm13ELm14EET_RAT0__KcRAT1__S4_20Il2CppCallConvention13Il2CppCharSetib [int (*il2cpp_codegen_resolve_pinvoke<int (*)(char*, unsigned int), 13ul, 14ul>(char const (&) [13ul], char const (&) [14ul], Il2CppCallConvention, Il2CppCharSet, int, bool))(char*, unsigned int)] (<anonymous>:wasm-function[22483]:0x69475a)
    14.     at _ManifestEtw_EventRegister_mE0FD847E8BE55184054D11D9CB65145D5DD7EC9A (<anonymous>:wasm-function[38772]:0x99587b)
    15.     at dynCall_iiiiii (<anonymous>:wasm-function[57238]:0xd5b2d5)
    16.     at Object.dynCall_iiiiii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:25565:41)
    17.     at invoke_iiiiii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:16761:34)
    18.     at _EventProvider_Register_m44CAC9D9F9EA2B0E4E3883128A19E1B70C254EE2 (<anonymous>:wasm-function[27475]:0x767df7)
    19.     at dynCall_viii (<anonymous>:wasm-function[57354]:0xd5bf12)
    20.     at Object.dynCall_viii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:26145:39)
    21.     at invoke_viii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:17921:25)
    22.     at _EventSource_Initialize_m19DBF37360307BE0AF8E5F4D48CDFBB11C2DFD01 (<anonymous>:wasm-function[27523]:0x76c067)
    23.     at _EventSource__ctor_mF8965DE244C1780B06C51E727B299E74A0798A4B (<anonymous>:wasm-function[27521]:0x76bb8f)
    24.     at _EventSource__ctor_mB386B8134304A663129B2AE557487685C91A927B (<anonymous>:wasm-function[27520]:0x76bad8)
    25.     at _EventSource__ctor_m609A5F8A53C64F1F7E5CEEE5427E77F4D3F4B52A (<anonymous>:wasm-function[27519]:0x76bac9)
    26.     at _DataCommonEventSource__ctor_mB3A5E13106C7709000DFE6FE06C7C1994C7CD516 (<anonymous>:wasm-function[52319]:0xc87776)
    27.     at _DataCommonEventSource__cctor_mA77AD17B370848C9A7417CF10004C868C6DE7E43 (<anonymous>:wasm-function[52320]:0xc877b1)
    28.     at __Z66RuntimeInvoker_FalseVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017PFvvEPK10MethodInfoPvPS4_ [RuntimeInvoker_FalseVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017(void (*)(), MethodInfo const*, void*, void**)] (<anonymous>:wasm-function[19328]:0x62e951)
    29.     at dynCall_iiiii (<anonymous>:wasm-function[57237]:0xd5b2ba)
    30.     at Object.dynCall_iiiii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:25560:40)
    31.     at invoke_iiiii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:16751:33)
    32.     at __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException [il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)] (<anonymous>:wasm-function[54500]:0xce1d01)
    33.     at __ZN6il2cpp2vm7Runtime9ClassInitEP11Il2CppClass [il2cpp::vm::Runtime::ClassInit(Il2CppClass*)] (<anonymous>:wasm-function[54503]:0xce1ebf)
    34.     at __Z33il2cpp_codegen_runtime_class_initP11Il2CppClass [il2cpp_codegen_runtime_class_init(Il2CppClass*)] (<anonymous>:wasm-function[56552]:0xd26ffc)
    35.     at _DbConnectionStringBuilder_set_ConnectionString_mEAF27EF8CB4E264F684CEA5A61ED7F275FCEC6A9 (<anonymous>:wasm-function[52282]:0xc86006)
    36.     at dynCall_viii (<anonymous>:wasm-function[57354]:0xd5bf12)
    37.     at Object.dynCall_viii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:26145:39)
    38.     at invoke_viii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:17921:25)
    39.     at _MySqlConnectionStringBuilder__ctor_mD9F0E76A5A68CCCA497380568776E3619C7DDE7E (<anonymous>:wasm-function[22641]:0x69d213)
    40.     at dynCall_viii (<anonymous>:wasm-function[57354]:0xd5bf12)
    41.     at Object.dynCall_viii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:26145:39)
    42.     at invoke_viii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:17921:25)
    43.     at _MySqlConnection_set_ConnectionString_m34BC359FF748EB304A40519F07600CCCE1F841BC (<anonymous>:wasm-function[22825]:0x6a88ab)
    44.     at __ZN18VirtActionInvoker1IP67MySqlInfoMessageEventArgs_t813C019E1155D1A222F686A606A80B973D22CACDE6InvokeEjP12Il2CppObjectS1_ [VirtActionInvoker1<MySqlInfoMessageEventArgs_t813C019E1155D1A222F686A606A80B973D22CACD*>::Invoke(unsigned int, Il2CppObject*, MySqlInfoMessageEventArgs_t813C019E1155D1A222F686A606A80B973D22CACD*)] (<anonymous>:wasm-function[21296]:0x65d42c)
    45.     at _MySqlConnection__ctor_m5D68A30D265A9B46C47876ADDE223D0D496B4591 (<anonymous>:wasm-function[22645]:0x69d513)
    46.     at dynCall_viii (<anonymous>:wasm-function[57354]:0xd5bf12)
    47.     at Object.dynCall_viii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:26145:39)
    48.     at invoke_viii (blob:http://localhost:54898/75d31edc-a126-44ec-ba8a-e88e75bae33e:17921:25)
    49.     at _SaveLoadOnline_BeginLoad_mAA7788ED737889962D56CCCEAF89134B3BD353FD (<anonymous>:wasm-function[56626]:0xd2eae9)
    50.     at _RTNodeEditor_Start_m0D6B3B1425138DC2A79B01BF908C4136D5AE2B72 (<anonymous>:wasm-function[52631]:0xc97d57)
    51.     at __Z65RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017PFvvEPK10MethodInfoPvPS4_ [RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017(void (*)(), MethodInfo const*, void*, void**)] (<anonymous>:wasm-function[19344]:0x62ec88)
    Any tips as to make it work would be VERY nice. :) :)
     
  34. Ikun

    Ikun

    Joined:
    May 29, 2016
    Posts:
    1
    I was trying to print a message to console and this helped solve the issue with that. Thanks. Will check if the other features work or not
     
  35. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    583
    It's been nearly a year since this error was introduced and Unity is now on LTS 2019.4.4 with no fix in sight for this! What's going on?
     
  36. blackfox_studio

    blackfox_studio

    Joined:
    Apr 8, 2019
    Posts:
    40
    Still happening in Unity 2019.3.1.15f1 while deploying on WebGL

    Code (CSharp):
    1. Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at Error
    2.     at jsStackTrace (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:22313)
    3.     at Object.stackTrace (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:22484)
    4.     at Object.onAbort (http://127.0.0.1:8000/Build/UnityLoader.js:4:11118)
    5.     at abort (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:557852)
    6.     at _dlopen (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:186247)
    7.     at <anonymous>:wasm-function[74483]:0x16b5f3e
    8.     at <anonymous>:wasm-function[75933]:0x16f5d68
    9.     at <anonymous>:wasm-function[66821]:0x14a1228
    10.     at <anonymous>:wasm-function[66993]:0x14a42ac
    11.     at <anonymous>:wasm-function[36156]:0xe47c6c
    12.     at <anonymous>:wasm-function[36154]:0xe46be4
    13.     at <anonymous>:wasm-function[36151]:0xe46adc
    14.     at <anonymous>:wasm-function[36150]:0xe464ee
    15.     at <anonymous>:wasm-function[29198]:0xd15526
    16.     at dynCall_iiiii (<anonymous>:wasm-function[77085]:0x172d911)
    17.     at Object.dynCall_iiiii (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:522390)
    18.     at invoke_iiiii (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:363788)
    19.     at <anonymous>:wasm-function[75093]:0x16d32b7
    20.     at <anonymous>:wasm-function[74403]:0x16b2aa4
    21.     at <anonymous>:wasm-function[5211]:0x249e9d
    22.     at <anonymous>:wasm-function[5210]:0x249dc6
    23.     at <anonymous>:wasm-function[8858]:0x388679
    24.     at <anonymous>:wasm-function[8855]:0x38749b
    25.     at <anonymous>:wasm-function[11318]:0x490583
    26.     at <anonymous>:wasm-function[9169]:0x3ae0f4
    27.     at <anonymous>:wasm-function[11703]:0x4bc8eb
    28.     at <anonymous>:wasm-function[11414]:0x499bc6
    29.     at <anonymous>:wasm-function[11414]:0x499bdb
    30.     at <anonymous>:wasm-function[11409]:0x4996e4
    31.     at <anonymous>:wasm-function[11402]:0x4976c3
    32.     at dynCall_v (<anonymous>:wasm-function[77111]:0x172ddc4)
    33.     at Object.dynCall_v (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:535693)
    34.     at browserIterationFunc (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:190486)
    35.     at Object.runIter (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:193547)
    36.     at Browser_mainLoop_runner (blob:http://127.0.0.1:8000/c9e045eb-6027-49e5-8d61-c2182c9a7b47:8:192009)
     
  37. rakonecomputers

    rakonecomputers

    Joined:
    Jun 29, 2020
    Posts:
    11
    And still happening in Unity 2019.2.5f1. This is all you need to make it crash:

    1. Create a 2D WebGL project.
    2. Add a panel to the scene.
    3. Add the following script to the panel.

    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using System.Xml;
    6.  
    7. public class crashtest : MonoBehaviour{
    8.  
    9.     XmlTextReader Reader;
    10.     XmlDocument Doc;
    11.     // Start is called before the first frame update
    12.     void Start()
    13.     {
    14.         string feedURL = "https://www.nasa.gov/rss/dyn/breaking_news.rss";
    15.         Reader = new XmlTextReader(feedURL);
    16.         Doc = new XmlDocument();
    17.         Doc.Load(Reader);
    18.     }
    19. }
    20.  

    4. Build as WebGL and Run (runs fine in the IDE)
    5. Enjoy the crash:

    Invoking error handler due to Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking")
     
    VonTala and MNNoxMortem like this.
  38. rakonecomputers

    rakonecomputers

    Joined:
    Jun 29, 2020
    Posts:
    11
    Found a solution that appears to work (doesn't crash anyway)


    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using System.Net;
    5. using System.Xml;
    6. using UnityEngine;
    7.  
    8. public class Morecrashing : MonoBehaviour
    9. {
    10.  
    11.     void Start()
    12.     {
    13.         string feed = "https://www.nasa.gov/rss/dyn/breaking_news.rss";
    14.         string xmlStr;
    15.         using (var wc = new WebClient())
    16.         {
    17.             xmlStr = wc.DownloadString(feed);
    18.         }
    19.         var Doc = new XmlDocument();
    20.         Doc.LoadXml(xmlStr);
    21.     }
    22. }
    23.  
     
  39. blackfox_studio

    blackfox_studio

    Joined:
    Apr 8, 2019
    Posts:
    40
    Any update on a fix?
     
  40. blackfox_studio

    blackfox_studio

    Joined:
    Apr 8, 2019
    Posts:
    40
    Still happening on 2019.4.5f1. On 2020.1 is not even possible to build it as it gets stuck

    Code (CSharp):
    1. Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at Error
    2.     at jsStackTrace (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:22313)
    3.     at Object.stackTrace (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:22484)
    4.     at Object.onAbort (http://127.0.0.1:8001/Build/UnityLoader.js:4:11118)
    5.     at abort (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:603325)
    6.     at _dlopen (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:186369)
    7.     at <anonymous>:wasm-function[82289]:0x186e6a5
    8.     at <anonymous>:wasm-function[83729]:0x18ae02c
    9.     at <anonymous>:wasm-function[48568]:0x1109308
    10.     at <anonymous>:wasm-function[48567]:0x110929d
    11.     at <anonymous>:wasm-function[48565]:0x110917d
    12.     at <anonymous>:wasm-function[30801]:0xdd4f42
    13.     at dynCall_iiiii (<anonymous>:wasm-function[84886]:0x18e61e8)
    14.     at Object.dynCall_iiiii (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:557117)
    15.     at invoke_iiiii (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:370267)
    16.     at <anonymous>:wasm-function[82892]:0x188b65d
    17.     at <anonymous>:wasm-function[82187]:0x186a917
    18.     at <anonymous>:wasm-function[5428]:0x271495
    19.     at <anonymous>:wasm-function[5427]:0x2713be
    20.     at <anonymous>:wasm-function[10543]:0x46531d
    21.     at <anonymous>:wasm-function[10541]:0x464943
    22.     at <anonymous>:wasm-function[14057]:0x5f6120
    23.     at <anonymous>:wasm-function[5211]:0x260b7b
    24.     at <anonymous>:wasm-function[10546]:0x465a8a
    25.     at <anonymous>:wasm-function[10538]:0x464040
    26.     at <anonymous>:wasm-function[10539]:0x4643fb
    27.     at <anonymous>:wasm-function[10534]:0x463915
    28.     at <anonymous>:wasm-function[11810]:0x4d6671
    29.     at <anonymous>:wasm-function[11809]:0x4d635a
    30.     at <anonymous>:wasm-function[11807]:0x4d6241
    31.     at <anonymous>:wasm-function[11803]:0x4d5c26
    32.     at <anonymous>:wasm-function[11796]:0x4d575b
    33.     at <anonymous>:wasm-function[11659]:0x4c2e48
    34.     at _main (<anonymous>:wasm-function[11658]:0x4c29df)
    35.     at Object._main (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:537501)
    36.     at Object.callMain (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:602113)
    37.     at doRun (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:602789)
    38.     at run (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:602957)
    39.     at runCaller (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:601732)
    40.     at Object.removeRunDependency (blob:http://127.0.0.1:8001/41db4bc0-6950-49f0-a059-0878610467d6:8:28733)
    41.     at processDataJob (http://127.0.0.1:8001/Build/UnityLoader.js:4:5421)
    42.     at i.callback (http://127.0.0.1:8001/Build/UnityLoader.js:3:19246)
     
  41. wechat_os_Qy00eQZpMOQqPck_98OziwOak

    wechat_os_Qy00eQZpMOQqPck_98OziwOak

    Joined:
    Aug 1, 2020
    Posts:
    3
    When I use mujoco's Unity Plugin (http://www.mujoco.org/book/unity.html#Gaming) to build a webgl project, the following error appears:

    Code (CSharp):
    1. To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking
    2. printErr @ scene_web.loader.js:31
    3. abort @ scene_web.framework.js:14
    4. _dlopen @ scene_web.framework.js:8920
    5. __ZN6il2cpp2osL19LoadLibraryWithNameEPKci @ scene_web.wasm:1
    6. __ZN6il2cpp2os13LibraryLoader22LoadDynamicLibraryImplERKNS_5utils10StringViewIcEEi @ scene_web.wasm:1
    7. __ZN6il2cpp2os13LibraryLoader22LoadDynamicLibraryImplERKNS_5utils10StringViewIcEE @ scene_web.wasm:1
    8. __ZN6il2cpp2os13LibraryLoader18LoadDynamicLibraryENS_5utils10StringViewIcEEi @ scene_web.wasm:1
    9. __ZN6il2cpp2os13LibraryLoader18LoadDynamicLibraryENS_5utils10StringViewIcEE @ scene_web.wasm:1
    10. __ZN6il2cpp2vm14PlatformInvoke7ResolveERK16PInvokeArguments @ scene_web.wasm:1
    11. __Z22il2cpp_codegen_resolveRK16PInvokeArguments @ scene_web.wasm:1
    12. __Z30il2cpp_codegen_resolve_pinvokeIPFivELm12ELm15EET_RAT0__KcRAT1__S3_20Il2CppCallConvention13Il2CppCharSetib @ scene_web.wasm:1
    13. _MJP_mjp_initialize_m499C5BFB3237988EC9E8E6944F0C2ACEA26F16B7 @ scene_web.wasm:1
    14. _MJP_Initialize_m645E8252176D721BDFDA0596CA389E37DFBECB1C @ scene_web.wasm:1
    15. _MJSimulate_Start_m4252A207F9335502481C9CD886361DF47FDA434F @ scene_web.wasm:1
    16. __Z65RuntimeInvoker_TrueVoid_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5PFvvEPK10MethodInfoPvPS4_ @ scene_web.wasm:1
    17. dynCall_iiiii @ scene_web.wasm:1
    18. (anonymous) @ scene_web.framework.js:24365
    19. invoke_iiiii @ scene_web.framework.js:15899
    20. __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException @ scene_web.wasm:1
    21. _il2cpp_runtime_invoke @ scene_web.wasm:1
    22. __Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb @ scene_web.wasm:1
    23. __ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb @ scene_web.wasm:1
    24. __ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtrP21ScriptingExceptionPtr @ scene_web.wasm:1
    25. __ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtr @ scene_web.wasm:1
    26. __ZN13MonoBehaviour16DelayedStartCallEP6ObjectPv @ scene_web.wasm:1
    27. __ZN18DelayedCallManager6UpdateEi @ scene_web.wasm:1
    28. __ZZ23InitPlayerLoopCallbacksvEN50EarlyUpdateScriptRunDelayedStartupFrameRegistrator7ForwardEv @ scene_web.wasm:1
    29. ......
    30. scene_web.framework.js:3319 DllNotFoundException: Unable to load DLL 'mjplugin155': The specified module could not be found.
    31.  
    How should I solve it?
    But why the demo can work on web?
    https://github.com/Unity-Technologies/marathon-envs/tree/v3.0.0

    Thanks
     
  42. blackfox_studio

    blackfox_studio

    Joined:
    Apr 8, 2019
    Posts:
    40
    Looks like there is no way to run a project using Photon on WebGL. Always the same error
     
  43. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    583
  44. dredknight

    dredknight

    Joined:
    Sep 6, 2018
    Posts:
    37
    Same thing I got a 2D project that loads a SQLite plugin.
    Pretty much that is it but the error appears :(.

    Code (CSharp):
    1.  
    2. An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
    3. uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace (webGL.wasm.framework.unityweb:8:22313)
    4. stackTrace (webGL.wasm.framework.unityweb:8:22484)
    5. onAbort@http://localhost:51528/Build/UnityLoader.js:4:11118
    6. abort (webGL.wasm.framework.unityweb:8:492492)
    7. _dlopen (webGL.wasm.framework.unityweb:8:173887)
    8. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[55571]:0x1062c49 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[57001]:0x10a2f4e)
    9. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[54132]:0x101ea31 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[54131]:0x101e9a8)
    10. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[58121]:0x10d89b7
    11. UnityModule [UnityModule/Module.dynCall_iiiiii] (webGL.wasm.framework.unityweb:8:467868)
    12. invoke_iiiiii (webGL.wasm.framework.unityweb:8:343559)
    13. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[38609]:0xcaa6fc (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[31330]:0xb01689)
    14. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[58150]:0x10d8d4d
    15. UnityModule [UnityModule/Module.dynCall_viiiiii] (webGL.wasm.framework.unityweb:8:484471)
    16. invoke_viiiiii (webGL.wasm.framework.unityweb:8:374386)
    17. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[38779]:0xcb32b1 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[23195]:0x8fee02)
    18. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[25489]:0x9a54c9 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[21252]:0x8d0ea1)
    19. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[58120]:0x10d899c
    20. UnityModule [UnityModule/Module.dynCall_iiiii] (webGL.wasm.framework.unityweb:8:467484)
    21. invoke_iiiii (webGL.wasm.framework.unityweb:8:342830)
    22. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[56165]:0x1080a09 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[55470]:0x105f415)
    23. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[4146]:0x19b121 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[4145]:0x19b04a)
    24. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10076]:0x3cfb34 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10074]:0x3cfa25)
    25. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10124]:0x3d1ec3 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10114]:0x3d1158)
    26. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[7447]:0x2a739c (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10098]:0x3d0ab7)
    27. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[4466]:0x1ba3fe (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[4464]:0x1ba2fe)
    28. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[9112]:0x37df44 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[9104]:0x37c4f9)
    29. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[9105]:0x37c8b3 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[9100]:0x37bdd1)
    30. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10352]:0x3eba85 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10351]:0x3eb76f)
    31. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10349]:0x3eb656 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10345]:0x3eb043)
    32. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10338]:0x3eab78 (blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10204]:0x3d8a1d)
    33. @blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44 line 8 > WebAssembly.instantiate:wasm-function[10203]:0x3d85b4
    34. UnityModule [UnityModule/Module._main] (webGL.wasm.framework.unityweb:8:455790)
    35. callMain (webGL.wasm.framework.unityweb:8:491282)
    36. doRun (webGL.wasm.framework.unityweb:8:491955)
    37. run (webGL.wasm.framework.unityweb:8:492134)
    38. runCaller (webGL.wasm.framework.unityweb:8:490909)
    39. removeRunDependency (webGL.wasm.framework.unityweb:8:28417)
    40. UnityModule/</unityFileSystemInit</<@blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44:8:7189
    41. doCallback (webGL.wasm.framework.unityweb:8:101257)
    42. done (webGL.wasm.framework.unityweb:8:101405)
    43. done (webGL.wasm.framework.unityweb:8:84338)
    44. storeLocalEntry (webGL.wasm.framework.unityweb:8:82806)
    45. UnityModule/reconcile/</<@blob:http://localhost:51528/f9a95a28-cdf9-452c-9b91-596747f03a44:8:84570
    46. UnityModule [UnityModule/loadRemoteEntry/req.onsuccess] (webGL.wasm.framework.unityweb:8:83156)
     
  45. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    The issue is that SQLite plugin attempts to dynamically load code on the web, which is not possible in Unity WebAssembly builds. To fix this, SQLite authors should update their plugin to be WebGL friendly by statically linking in all the needed code.

    The same goes for other plugins (Photon, mujoco, etc.)

    The error message that was present with the crash "To use dlopen, you need to use Emscripten's linking support, see ..." was awkward since the Emscripten compiler is at too low level to understand the root issue. The dynamic linking support in Emscripten has too many drawbacks to be feasible to be used at large scale like Unity is.
     
    blackfox_studio likes this.
  46. blackfox_studio

    blackfox_studio

    Joined:
    Apr 8, 2019
    Posts:
    40
    Thanks a lot, so I guess I will need to contact the guys at Exit Games (Photon) to report this problem..till then no WebGL client for us, but at least now we know where is the problem.
     
  47. Twyker

    Twyker

    Joined:
    Nov 10, 2016
    Posts:
    12
    I'm using PUN 2 in WebGL and it works fine for me.
     
    MNNoxMortem likes this.
  48. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    @jukka_j, Photon does a check if our native libs can be loaded dynamically.
    We don't load them from a web resource and we try/catch errors caused by: Marshal.PrelinkAll(typeof(DiffieHellmanCryptoProviderNative));

    We use this for a while and tested in (e.g.) Unity 2017.4.7 (the oldest we still support) on WebGL. No issues.
    Do we have to avoid the PrelinkAll? Will it be enough to conditionally skip the code execution at runtime?
     
  49. HeraticGalaxy

    HeraticGalaxy

    Joined:
    Aug 23, 2014
    Posts:
    31
    Still an issue as of 2019.4.16f1 - come on Unity what's the solution?!
     
  50. VonTala

    VonTala

    Joined:
    Feb 17, 2015
    Posts:
    10
    2020.1.12... Same error.
    No DLL for this project and it is crying for :

    DLopen.

    Why unity is so bad at webGl ?