Search Unity

I got some errors when launching my game in web browser

Discussion in 'WebGL' started by Tempest74, Oct 12, 2019.

  1. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    I have tried to play my game on other platforms and I was able to, I have a little js script. I was thinking that this is the cause of my error but after I disabled it the errors still pops up. Any help? 2019-10-12.png 2019-10-12 (1).png
     
  2. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    No help? please
     
  3. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
    You have to make a development build so we can get a human readable stack trace. Otherwise it's more or less impossible to help you.
     
  4. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    827
    To get a browser to print human readable stack traces instead of "wasm-function[number]", the build needs to have been produced with WebAssembly Debug Symbols section intact. By default Unity retains this section when you are doing a Development build, and in Release builds this section is omitted, because it is quite large in size and would bloat up the release builds by quite a bit.

    So in order to get the visible names, you can either do a Development build and debug using that, or you can make a debug symbols -enabled Release build by using a custom Editor export script. I have attached an example export script you can use in this post. If you place that script under Assets/Editor/ (and edit the script to locate the scene files to include in the build), you can then do a debug symbols -enabled Release build by running the dropdown item "HTML5 Export/Wasm+Release+Profiling uncompressed...".

    As a sidenote, builds that have debug symbols enabled are also profilable using the built-in profilers provided in the browsers, e.g. by using https://profiler.firefox.com/ in Firefox.
     

    Attached Files:

  5. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    after opening the index.html file under : D:\GitHub\html5_builds\Web Test_20191018_190531_wasm_release_profiling I got this: upload_2019-10-18_19-20-18.png
    This is the option with your script, it took me sometime to get around, that script is a little broken, if it is yours this is the problem: It does no update the variale that hold the places of my scenes until I reimport my entire project. Anyway, I go on my way doing a development build while trying to find anythink usefull in JS console
     
  6. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    And the development build... upload_2019-10-18_19-32-49.png upload_2019-10-18_19-33-0.png upload_2019-10-18_19-33-20.png
     
  7. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    827
    It is documented in the beginning of the script, and in the post I wrote above - you need to manually edit the script to specify the scenes to export, it does not attempt automatically guess that.

    Glad you were able to get it to work. There is a "ErrorToScreen_Start" and "TestErrors_CallNoRamError" that occurs, that suggests a C# function is running out of memory. Is that from your code?

    Then after it runs out of memory, it goes to run some other computation as a result, and runs out of memory again attempting to handle the initial out of memory error. (at least that's how I interpret this callstack, not 100% sure)
     
  8. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    And what it means? It means that one variable goes overflow? Well, i will google it tomorow
     
unityunity