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

Resolved Simple App crashes after Unity logo and progress bar, blank screen

Discussion in 'WebGL' started by WildRikku, May 16, 2022.

  1. WildRikku

    WildRikku

    Joined:
    May 10, 2022
    Posts:
    8
    HI everyone,

    I am trying to run my first ever Unity project as WebGL build. I use Build & Run and always end up with a blank gray screen in my browser that displays the Unity logo and a short progress bar briefly (the progress bar fills) then both disappear and the gray screen stays empty. I would expect the gray screen to show what I see in the Unity Editor when I press the Play button. I have plenty of output in the console which I will post below after my specs.
    • Unity Editor 2021.3.2f1
    • WebGL Publisher 4.2.3
    • Manjaro Linux
    • Chrome 101.0.4951.64
    Code (JavaScript):
    1. navigator.mediaDevices support available
    2. WebGL.loader.js:1 [UnityCache] 'http://localhost:40383/Build/WebGL.data.gz' successfully downloaded and stored in the indexedDB cache
    3. WebGL.framework.js.gz:3 [UnityMemory] Configuration Parameters - Can be set up in boot.config
    4.  
    5. WebGL.framework.js.gz:3     "memorysetup-temp-allocator-size-audio-worker=65536"
    6.  
    7. WebGL.framework.js.gz:3     "memorysetup-temp-allocator-size-background-worker=32768"
    8.  
    9. WebGL.framework.js.gz:3     "memorysetup-bucket-allocator-granularity=16"
    10.  
    11. WebGL.framework.js.gz:3     "memorysetup-bucket-allocator-bucket-count=8"
    12.  
    13. WebGL.framework.js.gz:3     "memorysetup-bucket-allocator-block-size=4194304"
    14.  
    15. WebGL.framework.js.gz:3     "memorysetup-bucket-allocator-block-count=1"
    16.  
    17. WebGL.framework.js.gz:3     "memorysetup-main-allocator-block-size=16777216"
    18.  
    19. WebGL.framework.js.gz:3     "memorysetup-thread-allocator-block-size=16777216"
    20.  
    21. WebGL.framework.js.gz:3     "memorysetup-gfx-main-allocator-block-size=16777216"
    22.  
    23. WebGL.framework.js.gz:3     "memorysetup-gfx-thread-allocator-block-size=16777216"
    24.  
    25. WebGL.framework.js.gz:3     "memorysetup-cache-allocator-block-size=4194304"
    26.  
    27. WebGL.framework.js.gz:3     "memorysetup-typetree-allocator-block-size=2097152"
    28.  
    29. WebGL.framework.js.gz:3     "memorysetup-profiler-bucket-allocator-granularity=16"
    30.  
    31. WebGL.framework.js.gz:3     "memorysetup-profiler-bucket-allocator-bucket-count=8"
    32.  
    33. WebGL.framework.js.gz:3     "memorysetup-profiler-bucket-allocator-block-size=4194304"
    34.  
    35. WebGL.framework.js.gz:3     "memorysetup-profiler-bucket-allocator-block-count=1"
    36.  
    37. WebGL.framework.js.gz:3     "memorysetup-profiler-allocator-block-size=16777216"
    38.  
    39. WebGL.framework.js.gz:3     "memorysetup-profiler-editor-allocator-block-size=1048576"
    40.  
    41. WebGL.framework.js.gz:3     "memorysetup-temp-allocator-size-main=4194304"
    42.  
    43. WebGL.framework.js.gz:3     "memorysetup-job-temp-allocator-block-size=2097152"
    44.  
    45. WebGL.framework.js.gz:3     "memorysetup-job-temp-allocator-block-size-background=1048576"
    46.  
    47. WebGL.framework.js.gz:3     "memorysetup-job-temp-allocator-reduction-small-platforms=262144"
    The numbers at the line beginnings indicate that the error appeared multiple times.

    I already tried re-importing all assets and a clean build.

    I also tried building and running the FPS Micro Game for WebGL but it crashed in the browser with memory access out of bounds and a black screen.

    I followed this tutorial from Unity Learn: https://learn.unity.com/tutorial/creating-and-publishing-webgl-builds
    Basically I added the one screen I have and left all options unchanged.

    I'm currently puzzled what to do next and appreciate your help.
     
  2. WildRikku

    WildRikku

    Joined:
    May 10, 2022
    Posts:
    8
    The log is not displayed correctly, apparently there is some problem with JavaScript syntax highlighting. I also cannot edit my post. So here is the complete log:

    WebGL.loader.js:1 [UnityCache] 'http://localhost:40383/Build/WebGL.data.gz' successfully downloaded and stored in the indexedDB cache
    WebGL.framework.js.gz:3 [UnityMemory] Configuration Parameters - Can be set up in boot.config

    WebGL.framework.js.gz:3 "memorysetup-temp-allocator-size-audio-worker=65536"

    WebGL.framework.js.gz:3 "memorysetup-temp-allocator-size-background-worker=32768"

    WebGL.framework.js.gz:3 "memorysetup-bucket-allocator-granularity=16"

    WebGL.framework.js.gz:3 "memorysetup-bucket-allocator-bucket-count=8"

    WebGL.framework.js.gz:3 "memorysetup-bucket-allocator-block-size=4194304"

    WebGL.framework.js.gz:3 "memorysetup-bucket-allocator-block-count=1"

    WebGL.framework.js.gz:3 "memorysetup-main-allocator-block-size=16777216"

    WebGL.framework.js.gz:3 "memorysetup-thread-allocator-block-size=16777216"

    WebGL.framework.js.gz:3 "memorysetup-gfx-main-allocator-block-size=16777216"

    WebGL.framework.js.gz:3 "memorysetup-gfx-thread-allocator-block-size=16777216"

    WebGL.framework.js.gz:3 "memorysetup-cache-allocator-block-size=4194304"

    WebGL.framework.js.gz:3 "memorysetup-typetree-allocator-block-size=2097152"

    WebGL.framework.js.gz:3 "memorysetup-profiler-bucket-allocator-granularity=16"

    WebGL.framework.js.gz:3 "memorysetup-profiler-bucket-allocator-bucket-count=8"

    WebGL.framework.js.gz:3 "memorysetup-profiler-bucket-allocator-block-size=4194304"

    WebGL.framework.js.gz:3 "memorysetup-profiler-bucket-allocator-block-count=1"

    WebGL.framework.js.gz:3 "memorysetup-profiler-allocator-block-size=16777216"

    WebGL.framework.js.gz:3 "memorysetup-profiler-editor-allocator-block-size=1048576"

    WebGL.framework.js.gz:3 "memorysetup-temp-allocator-size-main=4194304"

    WebGL.framework.js.gz:3 "memorysetup-job-temp-allocator-block-size=2097152"

    WebGL.framework.js.gz:3 "memorysetup-job-temp-allocator-block-size-background=1048576"

    WebGL.framework.js.gz:3 "memorysetup-job-temp-allocator-reduction-small-platforms=262144"

    WebGL.framework.js.gz:3 Loading player data from data.unity3d

    WebGL.framework.js.gz:3 Initialize engine version: 2021.3.2f1 (d6360bedb9a0)

    WebGL.loader.js:1 Creating WebGL 2.0 context.
    WebGL.framework.js.gz:3 Renderer: WebKit WebGL

    WebGL.framework.js.gz:3 Vendor: WebKit

    WebGL.framework.js.gz:3 Version: OpenGL ES 3.0 (WebGL 2.0 (OpenGL ES 3.0 Chromium))

    WebGL.framework.js.gz:3 GLES: 3

    WebGL.framework.js.gz:3 EXT_color_buffer_float EXT_color_buffer_half_float EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic OES_draw_buffers_indexed OES_texture_float_linear WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_lose_context WEBGL_multi_draw OVR_multiview2 GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_float_blend GL_EXT_texture_compression_bptc GL_EXT_texture_compression_rgtc GL_EXT_texture_filter_anisotropic GL_OES_draw_buffers_indexed GL_OES_texture_float_linear GL_WEBGL_compressed_texture_astc GL_WEBGL_compressed_texture_etc GL_WEBGL_compressed_texture_etc1 GL_WEBGL_compressed_texture_s3tc GL_WEBGL_compressed_texture_s3tc_srgb GL_WEBGL_debug_renderer_info GL_WEBGL_lose_context GL_WEBGL_multi_draw GL_OVR_multiview2

    WebGL.framework.js.gz:3 OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level <OpenGL ES 3.0> ; Context handle 1

    3WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    9The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. <URL>
    WebGL.framework.js.gz:3 Input Manager initialize...

    WebGL.framework.js.gz:3 The resource Soft.psd could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    3WebGL.framework.js.gz:3 The resource Internal-Loading.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 UnloadTime: 0.300000 ms

    WebGL.framework.js.gz:3 The resource Soft.psd could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 The resource UnitySplash-cube.png could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    6WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    27[.WebGL-0xda006542900] GL_INVALID_ENUM: Enum is not currently supported.
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    2WebGL.framework.js.gz:3 The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    _JS_Log_Dump @ WebGL.framework.js.gz:3
    WebGL.framework.js.gz:3 GL.End requires material.SetPass before!
     
  3. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    235
  4. WildRikku

    WildRikku

    Joined:
    May 10, 2022
    Posts:
    8
    Hey @unityruba, thank you for your kind reply! It took a while for the 2021.3 series, but the fix is now included in 2021.3.4 and I can confirm that it solved my problem.
     
    Last edited: Jun 29, 2023