WebGL doesn't work properly on Chrome in some Android 6/7 devices

It seems like only part of the canvas is displayed while the rest is shown as black like this:

As you can probably tell this is just a new hello world project with nothing but 2 sprite nodes under the canvas that should look like this:

So far I could only verify this problem on a number of devices including

Android 6.0.1; SC-02H
Android 6.0.1; SC-02H
Android 6.0.1; SO-04H
Android 6.0.1; SO-02J
Android 7.0; 603SH
Android 7.0; SOV32
Android 6.0.1; SOV33
Android 6.0.1; SHV34
Android 6.0.1; SHV37_u
Android 6.0.1; 502SO

All of them using the latest version of Chrome 58.0.3029.83

Anyone else ran into the same problem as well?? If I switch to Canvas mode then everything seems to be fine, but at this point I’m not sure how to detect the problem within js and change the render mode to canvas accordingly.

Am I to assume that nobody has run into this problem? As far as I can tell this is not project specific and if there are developers out there building games for the web-mobile platform it’s likely you would have seen it!

@pandamicro not sure if you’re the right person to ask but it would be great if you can give me pointers to where I can get some feedback on this.

Yes we have the exact same problem, and this is new from recent cocos creator version or chrome version, because in the past we did not have any problem.

Are you using emulators or real devices?

We have totally same problem.
Cocos2d-JS v3.15

browserType : chrome
browserVersion : 58.0.3029.83
capabilities : {“canvas”:true,“opengl”:true,“touches”:true,“mouse”:true,“keyboard”:true,“accelerometer”:true}
os : Android
osVersion : 6.0.1
platform : 100
Using WEBGL renderer.

Device: Xiomi Redmi 3 Note.

If i will downgrade chrome all works fine.
Also can be reproduced on Samsung Tab S2.

Also:

  1. Cocos2d-JS v3.13 works fine with this browser.
  2. Also on Cocos2d-JS v3.15 it works on chrome 57 and 59.0.3071.82(Beta.)

So it seems to be a bug only with cocos2d-JS v3.15 + chrome 58. But we really need to fix this bug.

And here is the bug in chromium https://bugs.chromium.org/p/chromium/issues/detail?id=696126
Maybe it will help you to fix this if you will try.

1 Like

Is this still happening? Does it happens with all Creator versions or just 1.5?
Edit: its happening to me in a small project created with 1.5.
No issues with a game developed with 1.3.2

@jrosich I had same issue with Chorme 58 and Cocos Creator 1.5. And this issue is fixed with Chrome 59.

This will fix a problem even on Chorme 58:

var canvas = document.getElementById(‘canvas1’);
var context = canvas.getContext(‘webgl’,
{ antialias: false,
stencil: true });