In some cases, chrome will return a "\0" string in WebGL when calling getProgramInfoLog. Empty string in js should be "" other than "\0". You can see "".length == 0, but "\0".length == 1. The root cause is that driver returns an empty string for such query glGetProgramInfoLog, but driver returns 1 for length of info log when calling glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length) because the length includes the null terminator. GLES spec 3.0.4 says "If there is no info log, zero is returned." in page 235.
Conformance tests to verify this behavior: https://github.com/KhronosGroup/WebGL/pull/1953.
Some related discussions: https://github.com/mrdoob/three.js/pull/9456.
I proposed a CL to fix this issue: https://codereview.chromium.org/2220933002/.
Comment 1 by bugdroid1@chromium.org
, Aug 9 2016