Browser does not run some WebGl2 content on Android 12 devices

Some Webgl content does not work in the browser on devices with Exynos CPU when upgraded to just released Android 12. This only happens when WebGl2 API is used in this specific project, WebGl1 implementation works. This project also works on these devices when Android 11 is used. This not only reproduces when using Samsung Internet, but also Chrome.

Reproducible project: Samsung S10E crash - PLAYCANVAS
Tested on: S10E G970F/DS

The project is built using Playcanvas engine, see the specific issue here: Rendering Issue with Samsung Exynos CPU on Android 12 · Issue #3967 · playcanvas/engine · GitHub
see the error logs there. But in general, shaders fail to compile, in some cases even the most simple one:

launch.js:15178 Failed to compile vertex shader:


1:	#version 300 es
2:	#define attribute in
3:	#define varying out
4:	#define texture2D texture
5:	#define GL2
6:	#define VERTEXSHADER
7:	attribute vec2 vertex_position;
8:	
9:	varying vec2 vUv0;
10:	
11:	void main(void)
12:	{
13:		gl_Position = vec4(vertex_position, 0.5, 1.0);
14:		vUv0 = vertex_position.xy*0.5+0.5;
15:	}
16:	

There is no shader compile error given, but I do not believe it’s the actual shader compilation failing but something else.

After few of these shaders fail to compile, it seems that WebGl context is lost, and never restored … and so the application does not run.

WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost

Note that it’s problem with WebGl2 implementation on these devices (driver issue possibly?), and the application itself works on any other devices than the specific group os Samsung devices mentioned.

This example also reproduces the same crash on the mentioned devices
https://playcanvas.github.io/#/graphics/portal

Is the issue present on Snapdragon devices when upgraded to Android 12?

I believe it’s present only on Exynos devices.

There was an update recently of Samsung devices with Android 12, is the issue still reproducible? If so can you check on more recent devices since it takes time for older devices to receive updates.

I’ve received the update, installed it (Android security patch level: 1 Feb 2022), but the browser tab still crashes.

Did you check on any recent devices, like S20/21 or note 20? The problem was solved on my note 20 ultra 5G.

Thanks for the update @Nuke - we have not tested on your more recent devices and we don’t have those available with Exynos CPU. What’s the latest security patch level on those devices?

The device I have has a different binary so the security patch is from 1st december. When did this issue surface? If it was after December I’ll try to update this device or test on another one.

We received first reports from our clients at the end of January - I assume this is the time Android 12 started the rollout?

I tested today on a zflip3 5G, android 12 and security update from January. Webgl is running fine on this one. I’m not sure when the rollout started sorry.