Skip to content

WebGL is broken in Tor Browser 8

Going to a demo e.g. http://webglsamples.org/aquarium/aquarium.html shows that WebGL is broken in Tor Browser. The first error is:

Error: WebGL warning: Unable to restrict WebGL limits to minimums.

The respective script breaks in the last line of

/**
 * Creates a webgl context.
 * @param {!Canvas} canvas The canvas tag to get context
 *     from. If one is not passed in one will be created.
 * @return {!WebGLRenderingContext} The created context.
 */
tdl.webgl.create3DContext = function(canvas, opt_attribs, opt_preferredContextType) {
  if (opt_attribs === undefined) {
    opt_attribs = {alpha:false};
    tdl.misc.applyUrlSettings(opt_attribs, 'webgl');
  }
  var names = ["webgl", "experimental-webgl"];
  if (opt_preferredContextType) {
    names.splice(0, 0, opt_preferredContextType);
  }
  var context = null;
  for (var ii = 0; ii < names.length; ++ii) {
    try {
      context = canvas.getContext(names[ii], opt_attribs);

.

Now, this works in Tor Browser if one toggles privacy.resistFingerprinting to false. The interesting part, however, is that this works in vanilla Firefox 60.1.0esr with privacy.resistFingerprinting enabled out of the box.

I wonder what else we do that is tied to that pref and breaks WebGL.

This got first noticed on our blog (https://blog.torproject.org/comment/276529#comment-276529).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information