-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blocking fingerprinting in browser settings can cause icons not to render or map not to render #8377
Comments
Flagging the current mapbox-gl-js/src/util/browser.js Lines 37 to 47 in 27ac83a
May be worth exploring |
Is TinySDF also affected? TinySDF is used for rendering ideographic characters using client-side fonts. https://github.com/mapbox/tiny-sdf/blob/34a06b10e99555a156e4d147ab28fd11da4bd4e0/index.js#L40 |
It looks like it is. It's using the same function of |
It looks like the
EDIT: Ooops, misread the description. This won't work. cc @asheemmamoowala @mourner Is this what you had in mind? |
@ryanhamley no, that's the whole point of TinySDF — we need to use |
According to the docs, |
I believe after a bit of research that canvas fingerprinting is what's blocking sprites and glyphs. But there's also WebGL fingerprinting and blocking this causes the entire map to render as a white screen. That's why we see a difference between Chrome using the CanvasFingerprintBlock plugin and Brave. When you disable all fingerprinting in Brave, it blocks both Canvas and WebGL fingerprinting. Under Technical Details, Brave says:
You can create an |
@ryanhamley does this mean that there are no next actions for us here — we just wait for browsers to get better at not blocking essential features when turning on fingerprinting protection, and rely on users not turning it fully on until that time — right? |
That's what my research is pointing towards @mourner I want to do a bit more testing today before I close this though. |
I did some fairly extensive research on this issue and there's not really anything we can do about it. Fingerprinting blockers disable functionality that GL JS relies on and there are no alternative ways of making the library work. This is a |
In light of the unable to fix here I've opened mapbox/mapbox-gl-supported#25 in case mapbox-gl-supported can detect the potential issue and return false. |
The browser Brave's "device recognition"/"fingerprinting" blocking blocks anything that attempts to read data out of a canvas to prevent it from being used for browser fingerprinting (see https://browserleaks.com/canvas). This defaults to "block 3rd-party fingerprinting", which can apply when a map is embedded in an external website.
More on Google/Chrome's future plans for anti-fingerprinting functionality here.
mapbox-gl-js version: 1.0.0, any
browser: able to reproduce in Brave, Chrome given anti-fingerprinting settings enabled
Steps to Trigger Behavior
In Brave:
RangeError('out of range destination coordinates for image copy')
is thrown and no map is rendered: https://api.mapbox.com/styles/v1/mapbox/streets-v9.html?title=true&access_token=ACCESS_TOKEN#1.1/0/0 .In Chrome:
Link to Demonstration
https://jsbin.com/
Expected Behavior
The map is still rendered / icons are still rendered even when anti-fingerprinting settings are enabled.
Actual Behavior
In Brave with anti-fingerprinting, the map is not rendered. In Chrome with anti-fingerprinting, the icons from the spritesheet are not rendered.
The text was updated successfully, but these errors were encountered: