three.js: Safari v15 (on desktop) -> threejs bug
As of Safari 15 (Desktop) something having to do with OpenGL causes a total browser failure.
(Sorry I don’t have better information, feel free to delete this and create a more helpful ticket once more info becomes available)
A problem repeatedly occurred with “site url” [ reload webpage button ]
notes:
- Mobile safari v15 works fine.
- Chrome / Firefox browsers appear unaffected by whatever this is.
Live examples
Steps to reproduce the behavior:
- visit one of the following
official three js showcase websitesin safari v15 on OSX
- https://www.aquarium.ru/en
- https://billie.withyoutube.com
- https://voiceofracism.co.nz
- https://augmentedperception.github.io/deepviewvideo/
Screenshots

Platform:
- Device: [Desktop]
- OS: [MacOS]
- Browser: [Safari]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 16 (4 by maintainers)
I found that enabling
Develop > Experimental Features > GPU Process: WebGLin Safari 15 fixes the error. Why it’s not enabled by default is a whole separate question, but I’m hoping this will get fixed by Apple soon.@mrdoob I feel like dad just told me to go ask my mother. ;P Just filed the report, thanks!
One more update here. With
GPU Process: WebGLturned off in Safari 15, and updating my project’s three version to"0.132.2"(from"0.112.1") the error is fixed for me.Better to report this to Apple directly: https://webkit.org/reporting-bugs/
@dustinkerstein For those why may be looking for a quick code-based workaround to avoid needing to upgrade threejs version, this worked for me…
In WebGLRenderer constructor:
xrCompatiblefromcontextAttributes_canvas.getContext( 'webgl2', contextAttributes )and only if unsuccessful, fallback to_canvas.getContext( 'webgl', contextAttributes )because the webgl2 version should succeed on Safari Desktop which avoids hitting the second call which is where the crash occurs (in my old version 110 of threejs)@willmorgan We just can’t do anything about it. This is a regression in Safari.
Hi @willmorgan, didn’t expect to meet you here 😄 Yes, on the Treevee project 😄
I have figured it out now:
I had a separate bug in a shader that apparently also managed to make Safari crash the entire tab. Have not investigated it fully yet, only rolled back that shader change.
And somewhat unfortunately once you enable/disable that feature, I am no longer able to replicate the issue, even after restarting Safari. Luckily I have Safari Technical Preview installed so I can continue looking for a workaround for my production site. Has anyone found a viable code-based workaround? I’m on Three.js version 108.
@willmorgan I actually just posted it to the apple developers bug reporting page. You posting it directly to the webkit project was a much better idea.
@walpolea Rollback to
r112really helped. All the anomalies brought bySafari on iOS 15have disappeared. Thanks.