Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

WebGL Dev mode not giving human readable error

Discussion in 'WebGL' started by vurtual, Jan 12, 2021.

  1. vurtual

    vurtual

    Joined:
    Aug 9, 2020
    Posts:
    2
    Hi, I'm using Unity 2020.2.1f1, and I've hitting problems with my current WebGL build. Basically, the preload just doesn't run as expected, so I checked the console, and all I can see as a possible problem is

    WebGL: INVALID_ENUM: getInternalformatParameter: invalid internalformat

    I've copied this directly from the console of the WebGL Dev build, so I have no idea even which script has the error
     
  2. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    I also cannot run my game build with 2020.2.1f1

    I have this warning:
    1. WebGL.framework.js:2 WebGL: INVALID_ENUM: getInternalformatParameter: invalid internalformat
    2. _glGetInternalformativ @ WebGL.framework.js:2
    Followed by
    1. Exception at:
    2. Error
    3. at jsStackTrace (http://localhost:52008/Build/WebGL.framework.js:2:16493)
    4. at stackTrace (http://localhost:52008/Build/WebGL.framework.js:2:16664)
    5. at http://localhost:52008/Build/WebGL.framework.js:2:3544
    6. at http://localhost:52008/Build/WebGL.wasm:wasm-function[102515]:0x1f56d07
    7. ... a tone of unreadable stacktrace
    And two errors:
    1. exception thrown: undefined - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch. WebGL.loader.js:1:4256
    2. Uncaught undefined - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch. WebGL.framework.js.gz:2:563707
    Only way I found after a day trying, was enabling all debug options, full stacktrace and everything. Ok it showed some warnings I've fixed, but still not playable in release, and unplayable in this debug condition...
    -
    EDIT: checking "Data caching" & "Decompression Fallback", and unchecking "Prebake Collision Meshes" & "Optimize Mesh Data" made my build run !
     
    Last edited: Jan 17, 2021
  3. gopacco

    gopacco

    Joined:
    Jan 2, 2020
    Posts:
    3
    tjgus4398 likes this.
  4. the_programmer_eg

    the_programmer_eg

    Joined:
    Jul 27, 2019
    Posts:
    1
    for me in unity 2020.3.1f1 , it solved by making "WebGL 1.0" the default instead of "WebGL 2.0"
    Project Settings->Player->Other Settings->Rendering->Auto Graphics Api=unchecked , and drag WebGL 1.0 to be upper than WebGL 2.0
    and its done, then use compression type gzip or brotli
     
    RostislavMBicycle likes this.