thumbmarkjs / thumbmarkjs

A free, open-source javascript fingerprinting library
https://www.thumbmarkjs.com/
MIT License
194 stars 22 forks source link

WebGL throws errors when Brave is aggressively blocking fingerprinting #28

Closed Joe12387 closed 3 months ago

Joe12387 commented 3 months ago

Hi.

Brave appears to not work with WebGL when it is set to "Aggressively block fingerprinting", causing the WebGL fingerprint to be set to "unsupported" even though WebGL is supported in Brave.

Error: Vertex shader compilation failed: null at webgl.ts:73:17 at webgl.ts:25:71 at Function.from (<anonymous>) at webgl.ts:25:43 at tslib.es6.js:147:23 at Object.next (tslib.es6.js:128:53) at tslib.es6.js:121:71 at new Promise (<anonymous>) at n (tslib.es6.js:117:12) at webgl.ts:17:1

This seems to be because Brave returns null for gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS). I'm not sure if this is something that can be addressed or not, but you can at least detect if Brave is in strict mode similar to how CreepJS does it.

Thanks!

ilkkapeltola commented 3 months ago

I'm confident something can be done about this. Thanks for bringing this to my attention. I'll look into this soon.

ilkkapeltola commented 3 months ago

Looks like the new version doesn't have that problem.

ilkkapeltola commented 3 months ago

@Joe12387 please re-open if the error is still there.