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

Question Errors in WebGL build, into webbrowser

Discussion in 'Web' started by sylvain, Sep 10, 2023.

  1. sylvain

    sylvain

    Joined:
    Feb 19, 2013
    Posts:
    46
    Hi,

    I have a WebGL project working well in Editor, in Play mode, but generates dozen of errors per second in javascript console, in a web browser (same errors in Firefox or Chrome). Probably one error per frame.

    The error is in tjhe Javascript console is :
    Code (CSharp):
    1. ScenarioMapEditor-WEBGL.framework.js.gz:10 ArgumentNullException: Value cannot be null.
    2. Parameter name: shader
    I suspect there is a call to a supposed shader, which is NULL, but not sure. My C# code does not manipulate shaders.

    I built with "Development Build" ON, but not helpful.

    I was able to use profiler but was not able to find where the error is triggered...

    Any idea will be greatly appreciated !!!


    Capture d’écran 2023-09-10 à 11.18.11.png Capture d’écran 2023-09-10 à 11.18.11.png
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,347
    To the left of "ArgumentNullException" there is a triangle button. Does this reveal more info?
    If this prints out a callstack but without debugging info (method name, line number) try building with full exception support enabled - you can change this somewhere in Player Settings for the WebGL platform.

    I can imagine you may be using a shader (through a material which may come from a 3rd party asset) that isn't compatible with WebGL. But that is just a guess.
     
  3. sylvain

    sylvain

    Joined:
    Feb 19, 2013
    Posts:
    46
    Thanks for your quick reply.
    I open the triangle and I get the screenshot. Not very clear for me.
     

    Attached Files:

  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,347
    The exception handling was set to "full" in this case?

    If not try again with this setting:
    upload_2023-9-10_14-17-31.png