Search Unity

Bug Cant build WebGL with 2021.3.15f1 and previous!

Discussion in 'Web' started by gatisp09, Dec 7, 2022.

  1. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    Oke so me again. again with problems.
    i have the same game i had in before nothing changed. had to swithc to 2021.3.11f in order to make APK's for my game cause it was not working on 2020 versions..

    now in these versions i cant build WEBGL.. how do i fix this ?

    when i try to build with 2021.3.15f1 i get these errrors i also tried to make with other 2021 versions no success...

    ERRORS:

    FIRST:
    ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: subshaderIndex
    UnityEngine.Shader.FindSubshaderTagValue (System.Int32 subshaderIndex, UnityEngine.Rendering.ShaderTagId tagName) (at <685c48cf8f0b48abb797275c046dda6a>:0)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.IsShaderGraphShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:114)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.StripUnused (UnityEditor.Rendering.BuiltIn.ShaderFeatures features, UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, UnityEditor.Rendering.ShaderCompilerData compilerData) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:284)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.OnProcessShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, System.Collections.Generic.IList`1[T] compilerDataList) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:348)
    UnityEditor.Build.BuildPipelineInterfaces.OnPreprocessShaders (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippet, UnityEditor.Rendering.ShaderCompilerData[] data) (at <63965ae56af7489797f355b7c1211ab2>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)


    SECOND:

    Error building Player: ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: subshaderIndex

    Third:
    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <63965ae56af7489797f355b7c1211ab2>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <63965ae56af7489797f355b7c1211ab2>:0
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    THanks hoping to get fast respons!
     
  2. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    Also, get the same error on Mobile APK builds.. grate work lads :)
     
  3. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    Shader error in '': Parse error: syntax error, unexpected $end at line 380
    Shader error in '': Parse error: Block comment not closed (EOF in comment) at line 380
     
  4. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    anyways i got this error away now i have the same one as for WEBGL


    ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: subshaderIndex
    UnityEngine.Shader.FindSubshaderTagValue (System.Int32 subshaderIndex, UnityEngine.Rendering.ShaderTagId tagName) (at <685c48cf8f0b48abb797275c046dda6a>:0)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.IsShaderGraphShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:114)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.StripUnused (UnityEditor.Rendering.BuiltIn.ShaderFeatures features, UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, UnityEditor.Rendering.ShaderCompilerData compilerData) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:284)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.OnProcessShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, System.Collections.Generic.IList`1[T] compilerDataList) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:348)
    UnityEditor.Build.BuildPipelineInterfaces.OnPreprocessShaders (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippet, UnityEditor.Rendering.ShaderCompilerData[] data) (at <63965ae56af7489797f355b7c1211ab2>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  5. neilw711

    neilw711

    Joined:
    Feb 9, 2013
    Posts:
    12
    I'm getting this error too when I build to Android aab. No idea what to do, any fix for this or what?
     
  6. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    well i switched back to 2021.3.11f1 and the error is gone .. now it just crashes at initial start.. what a disaster..
     
    IndieFist likes this.
  7. neilw711

    neilw711

    Joined:
    Feb 9, 2013
    Posts:
    12
    Interesting. Were you able to build it out without any issues though?
     
  8. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    448
    Just as a best practice, make sure you do a "Clean Build" / Delete the IL2CPP cache whenever you switch editor version. Better yet, just delete the library folder.

    Not saying this is the issue but it can be a symptom of that.
     
    IndieFist likes this.
  9. neilw711

    neilw711

    Joined:
    Feb 9, 2013
    Posts:
    12
    Ok, I was finally able to build when downgrading to 2021.3.11f1 and I found out it was due to the Shader Graph being at 12.1.8. When you downgrade to 3.11f1, it rolls back shader graph to 12.1.7 and the build works just fine. Thanks for the suggestion gatisp09!
     
  10. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    no problem
     
  11. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    520
    It happen to me in 2021.3.15 but works in 2021.3.14 anyone know what shader is the problem?
     
  12. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    520
    i did it but is not working >.<
     
  13. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    Bumping here

    I have the exact same issue, build failed "
    Error building Player: ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: subshaderIndex"

    I just updated to 2021.3.16f1 ....
    Was on 2021.3.14f1 before and all was good
     
    IndieFist likes this.
  14. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    520
    wow i just thinking about udpate to .16 so still the same issue, the problem is the shader, i havent found what shader its, because i got another project working fine under .15
     
  15. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    I cannot find which shader either, Unity doesn't even tell you that in the error so we're blind...
     
    RSH1 likes this.