Search Unity

Unity web player error.

Discussion in 'Editor & General Support' started by shippuden123, Sep 30, 2020.

  1. shippuden123

    shippuden123

    Joined:
    Sep 30, 2020
    Posts:
    2
    Hello, I'm trying to play a game on my browser but I get this error:​
    "An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was: RangeError: invalid array length"
    upload_2020-9-30_17-55-18.png

    Console:

    upload_2020-9-30_17-52-46.png


    I realized that there are already several users with the same problem, but only have solutions such as clearing the browser's cache or using another one, unfortunately that doesn't work.

    BS: My browser is FIREFOX, I have Windows 10 64 bits, 4 GB of ram, and the FIREFOX browser is 64 bits.​
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    According to a developer at Unity, the error often means you don't have enough memory available to allocate. With just 4GB of memory in your machine, that doesn't surprise me. See the below thread, comment #13

    https://forum.unity.com/threads/webgl-rangeerror-invalid-array-length.327589/

    As to why the developers of the game may need to allocate so much memory, you'd have to talk to them.
     
  3. shippuden123

    shippuden123

    Joined:
    Sep 30, 2020
    Posts:
    2

    No, I'm sure it doesn't have to do with RAM, because I did a test with the official launcher of the game and it flowed perfectly ... This error only occurs to me when I use a browser.


    Unfortunately, the other games do not have an official Launcher, so I would like a solution.
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    With WebGL all data for the game has to be stored in memory since they don't have an on disk footprint. In a standalone launcher only what needs to be in memory is copied into memory. Also, with WebGL the browser is actually in charge of how much memory is available (WebGL requests memory from the browser instead of from the operating system). What you said actually reinforces that it is probably a memory issue instead of what you think it does.