Search Unity

Cannot create a working WebGL build

Discussion in 'Web' started by dlatkinson, Mar 22, 2017.

  1. dlatkinson

    dlatkinson

    Joined:
    Mar 22, 2017
    Posts:
    4
    Hi,

    I created a project that works wonderfully in the Unity editor. I have built it as a WebGL application. The build seems to go fine. The files appear to be produced. However, I go to run it in Firefox I get the following error:

    An error occurred running the Unity content on this page. See your browser's JavaScript console for more info. The error was:

    uncaught exception: abort(-1) at jsStackTrace (SolarSystemSimulation.js:1:19540)
    stackTrace (SolarSystemSimulation.js:1:19711)
    abort (SolarSystemSimulation.js:3:27132)
    __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_ (SolarSystemSimulation.js:1:230962)
    zsh (SolarSystemSimulation.asm.js:11:1)
    xsh (SolarSystemSimulation.asm.js:11:1)
    Ifi (SolarSystemSimulation.asm.js:18:1)
    invoke_vii (SolarSystemSimulation.js:1:340668)
    ush (SolarSystemSimulation.asm.js:11:1)
    Efi (SolarSystemSimulation.asm.js:18:1)
    invoke_viiii (SolarSystemSimulation.js:1:340040)
    vrh (SolarSystemSimulation.asm.js:11:1)
    trh (SolarSystemSimulation.asm.js:11:1)
    func [.func] (SolarSystemSimulation.js:1:30524)
    callRuntimeCallbacks (SolarSystemSimulation.js:1:22174)
    ensureInitRuntime (SolarSystemSimulation.js:1:22674)
    doRun (SolarSystemSimulation.js:3:26070)
    run/<@blob:null/9a5da153-4fbe-4242-bdd6-9a84afe70aef:3:26368
    If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

    I am using the latest release of Unity (5.5.2f1) on a Windows 10 machine. It appears from the error message that there is something wrong in the javascript that was created by Unity during the build. I am wondering if this is a known issue with this version if Unity? Is it possibly something in the configuration settings that I need to change either in Unity or in Firefox? Any help would be greatly appreciated.

    Thanks,

    Doug
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    does an empty project work?
    could you try to make a development build?
     
  3. dlatkinson

    dlatkinson

    Joined:
    Mar 22, 2017
    Posts:
    4
    Hi,

    I am not sure exactly what you mean by an empty project. I will be glad to make one, build it and test it if I knew how to do it. I did make a development build and I received the exact same error when I ran the WebGL app.
     
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    I mean a new project.

    could you post the Development build callstack and the browser log?
     
  5. dlatkinson

    dlatkinson

    Joined:
    Mar 22, 2017
    Posts:
    4
    Here is the browser log:
    I also uploaded the file in case it would be easier to look at.

    run() called, but dependencies remain, so not running UnityLoader.js:3545:2
    missing function: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_ UnityLoader.js:3545:2
    -1 UnityLoader.js:3541:3
    -1 UnityLoader.js:3545:2
    Invoking error handler due to
    uncaught exception: abort(-1) at jsStackTrace (SolarSystemSimulation.js:859:12)
    stackTrace (SolarSystemSimulation.js:873:11)
    abort (SolarSystemSimulation.js:18508:43)
    std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >::basic_string(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > const&) [__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_] (SolarSystemSimulation.js:9743:2)
    KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > >::KeyWrapper(KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > const&) [__ZN10KeyWrapperINSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEEC2ERKS7_] (blob:1297173:1)
    dense_hash_map<KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > >, Il2CppClass*, il2cpp::utils::StringUtils::StringHasher<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > >, std::__2::equal_to<KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > >, std::__2::allocator<std::__2::pair<KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > const, Il2CppClass*> > >::set_empty_key(KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > const&) [__ZN14dense_hash_mapI10KeyWrapperINSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEP11Il2CppClassN6il2cpp5utils11StringUtils12StringHasherIS7_EENS1_8equal_toIS8_EENS5_INS1_4pairIKS8_SA_EEEEE13set_empty_keyERSJ_] (blob:1116960:1)
    dynCall_vii (blob:1352515:1)
    invoke_vii (SolarSystemSimulation.js:15590:3)
    Il2CppHashMap<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, Il2CppClass*, il2cpp::utils::StringUtils::StringHasher<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > >, std::__2::equal_to<KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > >, std::__2::allocator<std::__2::pair<KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > const, Il2CppClass*> > >::Il2CppHashMap(unsigned int, il2cpp::utils::StringUtils::StringHasher<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > const&, std::__2::equal_to<KeyWrapper<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > > const&) [__ZN13Il2CppHashMapINSt3__212basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP11Il2CppClassN6il2cpp5utils11StringUtils12StringHasherIS6_EENS0_8equal_toI10KeyWrapperIS6_EEENS4_INS0_4pairIKSG_S8_EEEEEC2EjRKSD_RKSH_] (blob:890348:1)
    dynCall_viiii (blob:1332269:1)
    invoke_viiii (SolarSystemSimulation.js:15558:3)
    Il2CppMetadataCache::Il2CppMetadataCache() [__ZN19Il2CppMetadataCacheC2Ev] (blob:1105242:1)
    __GLOBAL__sub_I_MetadataCache_cpp (blob:1102298:1)
    __GLOBAL__sub_I_MetadataCache_cpp [asm.__GLOBAL__sub_I_MetadataCache_cpp] (SolarSystemSimulation.js:17209:9)
    func [.func] (SolarSystemSimulation.js:1644:3)
    callRuntimeCallbacks (SolarSystemSimulation.js:971:4)
    ensureInitRuntime (SolarSystemSimulation.js:995:2)
    doRun (SolarSystemSimulation.js:18451:3)
    run/<@blob:null/99b794ac-ee06-491d-b85d-ea20d3b21f6c:18466:4
    UnityLoader.js:3419:9

    I am not sure how to get the development build call stack.

    Thanks,

    Doug
     

    Attached Files: