Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

WebGL does not work on Google Chrome

Discussion in 'Web' started by Gonkas, Mar 21, 2017.

  1. Gonkas

    Gonkas

    Joined:
    May 2, 2016
    Posts:
    6
    Hi All,

    Just published my first little arcade game, but I run into a problem.
    Game runs fine in Firefox but in Chrome some of the graphics do not show.
    Does anyone knows what it should be the issue?

    Google Chrome version: 56.0.2924.87
    Unity version: 5.5.2f1
    Below is a screenshot of one of the graphics configuration that is not displaying and also Player Configuration.
    upload_2017-3-21_15-13-6.png
    upload_2017-3-21_15-14-20.png
    upload_2017-3-21_15-14-39.png

    Thanks in advance for having a look :)
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    What is the problem exactly?
     
  3. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    I have a similar issue.

    My 3D mesh loaded from an asset bundle does not shows up, as well as some UI textures.

    I am preparing a bug report right now, will post the case ID soon.

    Yvan
     
  4. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    I cannot reproduce it anymore, sorry :-(

    Maybe it was a Chrome issue fixed yesterday ?
     
  5. Gonkas

    Gonkas

    Joined:
    May 2, 2016
    Posts:
    6
    Hi Marco,
    The material that I posted does not show, It is supposed to be a background.
    There is more materials that does not show but always with same shader Unlit/Texture.
    Thanks
     
  6. Gonkas

    Gonkas

    Joined:
    May 2, 2016
    Posts:
    6
    Mine still does not appear :(
     
  7. Gonkas

    Gonkas

    Joined:
    May 2, 2016
    Posts:
    6
    Hi Marco,

    Just to show the difference between browsers (screenshot size is irrelevant):
    Chrome >> Capture1.PNG
    Firefox >> Capture2.PNG

    Thanks.
     
  8. Gonkas

    Gonkas

    Joined:
    May 2, 2016
    Posts:
    6
    Maybe this will help (running from a localhost):
    Failed to load resource: the server responded with a status of 404 (Not Found)
    UnityLoader.js:1 Decompressed Release/GameFinished.datagz in 367ms. You can remove this delay if you configure your web server to host files using gz compression.
    :50485/favicon.ico Failed to load resource: the server responded with a status of 404 (Not Found)
    UnityLoader.js:1 Decompressed Release/GameFinished.memgz in 37ms. You can remove this delay if you configure your web server to host files using gz compression.
    UnityLoader.js:1 Decompressed Release/GameFinished.asm.jsgz in 350ms. You can remove this delay if you configure your web server to host files using gz compression.
    UnityLoader.js:1 Decompressed Release/GameFinished.jsgz in 10ms. You can remove this delay if you configure your web server to host files using gz compression.
    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Initialize engine version: 5.5.2f1 (3829d7f588f3)

    UnityLoader.js:2 Creating WebGL 2.0 context.
    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Renderer: WebKit WebGL

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Vendor: WebKit

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Version: OpenGL ES 3.0 (WebGL 2.0 (OpenGL ES 3.0 Chromium))

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 GLES: 3

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 EXT_texture_filter_anisotropic GL_EXT_texture_filter_anisotropic OES_texture_float_linear GL_OES_texture_float_linear WEBGL_compressed_texture_etc GL_WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 GL_WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc GL_WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info GL_WEBGL_debug_renderer_info WEBGL_debug_shaders GL_WEBGL_debug_shaders WEBGL_lose_context GL_WEBGL_lose_context

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level <OpenGL ES 3.0> ; Context handle 1

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 UnloadTime: 36.435001 ms

    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetShaderiv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetShaderiv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : glBufferData: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 UnloadTime: 65.260002 ms

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Unloading 5 Unused Serialized files (Serialized files now loaded: 0)

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1
    Unloading 8 unused Assets to reduce memory usage. Loaded Objects now: 447.

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Total: 20.340000 ms (FindLiveObjects: 0.535000 ms CreateObjectMapping: 2.105000 ms MarkObjects: 14.100000 ms DeleteObjects: 3.485000 ms)


    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : GetTexParameteriv: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_ENUM : glBufferData: <- error from previous GL command
    localhost/:1 [.Offscreen-For-WebGL-059B59C8]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 warning: 2 FS.syncfs operations in flight at once, probably just doing extra work
    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 UnloadTime: 25.529999 ms

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Unloading 4 Unused Serialized files (Serialized files now loaded: 0)

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1
    Unloading 5 unused Assets to reduce memory usage. Loaded Objects now: 447.

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Total: 2.810000 ms (FindLiveObjects: 0.285000 ms CreateObjectMapping: 0.545000 ms MarkObjects: 1.610000 ms DeleteObjects: 0.355000 ms)


    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 UnloadTime: 5.470000 ms

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Unloading 4 Unused Serialized files (Serialized files now loaded: 0)

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1
    Unloading 5 unused Assets to reduce memory usage. Loaded Objects now: 447.

    blob:http://localhost:50485/e4a28695-2828-4cea-a61f-916eacb12d27:1 Total: 5.015000 ms (FindLiveObjects: 0.050000 ms CreateObjectMapping: 0.365000 ms MarkObjects: 4.320000 ms DeleteObjects: 0.275000 ms)
     
  9. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    The "GL ERROR [...]" you get could be from your video driver not capable for GLES 3.0 (aka WebGL 2.0).

    Personnaly, I get these when loading the application using a remote desktop connection for example (the video driver in this context is not supporting well WebGL).

    if not in Remote Desktop, update your driver maybe ?

    You can trying adding "--ignore-gpu-blacklist' to Chrome's command line and see if these error disappear also, could confirm the lead.

    (https://www.borfast.com/blog/2011/1...me-in-linux-with-a-blacklisted-graphics-card/)
     
    Gonkas likes this.
  10. Gonkas

    Gonkas

    Joined:
    May 2, 2016
    Posts:
    6
    You are right, it works fine in my girlfriend's computer that does not even have a graphics card!!!
    Is some problem with my machine.
     
  11. marzdh

    marzdh

    Joined:
    Jun 3, 2013
    Posts:
    35
    I'm facing the same issue with my webgl game.

    All graphics load and show completely in Chrome on some desktop computers. However on some computers, the graphics start missing.
    The game loads and runs perfectly in all computers using Firefox.

    I still haven't figured what the issue is? Can't be driver related because other webgl games play well while my game doesn't.
     
  12. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    I think the GPU of the faulty machines might be blacklisted by Chrome.

    You can trying adding "--ignore-gpu-blacklist' to Chrome's command line and see if it works.
    Honestly, I still don't get the reason of Chrome blacklisting some GPU which seem to work well with this flag. If someone have more information about the why, I am interested :)
     
  13. marzdh

    marzdh

    Joined:
    Jun 3, 2013
    Posts:
    35
    Thanks for the suggestion @ypoeymirou. Works absolutely fine after adding the command line.

    The difficulty now is informing the users to do the same if they face the issue (which is obviously not possible) :)
     
  14. marzdh

    marzdh

    Joined:
    Jun 3, 2013
    Posts:
    35
    I accepted in my last message that the game runs fine after adding "--ignore-gpu-blacklist' to Chrome's command line, However I discovered while play testing the game on different computers that despite the command line, the game still does not always play on Chrome.

    The game first downloads completely. Then I see a grey screen (presumably the Unity logo is playing at this time).
    Only after refreshing the screen (using maximize or minimize browser options) i see the game screen. When I interact with the game screen, nothing updates visually unless I maximize or minimize the browser screen again.
    Either the frame rate is falling really low for changes in the game to not show or the issue is something else.

    I've checked for the webgl versions on the computers where this happens, and both 1.0 and 2.0 have existed on them, but I'm not sure why the game does not play.

    Please help as this is a critical issue for me since I cannot control the machines of my users. I could lose an audience for my game because of this.
     
    Last edited: Apr 24, 2017
  15. marzdh

    marzdh

    Joined:
    Jun 3, 2013
    Posts:
    35
    Can someone from Unity please help with the issue I've explained above. If it is a known issue, is there a solution being worked for it or should I avoid compiling a WebGL build completely?