Post

Replies

Boosts

Views

Activity

"WebGL: context lost." error when backgrounding Safari on iPadOS 17 Developer Beta 8
On iOS 17 Developer Beta 8 on tablets only (so iPadOS), we are seeing the error "WebGL: context lost." in the Web Inspector Console, after backgrounding Safari that is viewing a WebGL application. We are utilizing BabylonJS for a 3D rendering application. In some instances, backgrounding the Safari app, then making it active again in the foreground will cause the WebGL canvas to lose context, essentially crashing WebGL for any browser. Sometimes the crash just forces a full page refresh, and sometimes it hard-crashes with the console error, preventing the canvas element from rendering anything and becoming unresponsive. Once affected, any tab in Safari or Google Chrome will have unresponsive canvas elements. We have tested this with BabylonJS, ThreeJS, and minimal vanilla WebGL code, and each fail. To reproduce the issue, visit any one of the below in Safari: https://playground.babylonjs.com/ https://threejs.org/playground https://codepen.io/haferje/pen/QWzdavd With Web Inspector connected, as the page loads and before the WebGL instance has been initialized, quickly background Safari, then bring it back to the foreground. In the inspector Console, you will see the context lost error, and in Safari you will see that the webgl scene fails to create. For our applications, this also happens periodically when we background them even after WebGL is already initialized. This error was not present in beta 7. We are trying to understand why this is happening, so maybe it can be fixed before iOS 17 is released publicly, or we can create a work-around for the issue.
13
13
5.3k
Sep ’23