Skip to content
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

Enabling privacy.resistFingerprinting on Firefox's about:config breaks camera movement. #4793

Open
samuel-zuk opened this issue Feb 11, 2021 · 11 comments

Comments

@samuel-zuk
Copy link

samuel-zuk commented Feb 11, 2021

Description: Enabling privacy.resistFingerprinting on Firefox's about:config breaks camera movement.

Hello all, I had recently been trying to track down a strange bug that followed me around on my Firefox install for all A-Frame apps I had tried to run in the browser, and had narrowed it down to the privacy.resistFingerprinting setting I had set to "true" in my about:config page. Essentially, when moving the camera (i.e. changing the position, manipulating the rotation with look controls operated normally) with this setting enabled, the camera movement would either be incredibly choppy and sluggish, or the camera would jitter back and forth, occasionally warping somewhere else in the scene. This occurred while using both the default controls (wasd-controls and look-controls) or the movement-controls component in the aframe-extras package, although the ways in which the movement bugged out varied between the two (example linked above).

Not sure what can be done to prevent this (it only seems to affect the camera position from my testing), but I've included some links here that could help lead in the right direction if this is something that can be worked around:

@dmarcos
Copy link
Member

dmarcos commented Feb 12, 2021

Yeah not sure. It look like Firefox is intentionally introducing noise in the input. Not sure what can be done about it on the A-Frame side @takahirox Do you know how resistFingerprinting is affecting WebXR WebGL? Thanks. No worries if you don't

@takahirox
Copy link
Collaborator

Sorry, no idea. I will forward the question to the Firefox devs.

@tomrittervg
Copy link

I'm the FF maintainer of resistFingerprinting (RFP). While we do make some limitations to WebGL as part of RFP, what you've described is more consistent with the timer clamping we do.

For whatever reason I cannot load your demo; but to narrow it down, try turning RFP off, but setting privacy.resistFingerprinting.reduceTimerPrecision.microseconds to 100000 (which is the value that RFP locks it to.) If it reproduces it, is the timer clamping aspect of RFP; not the WebGL modifications.

It would be very interesting indeed if you were able to find a way to resolve this and produce smooth movement without requiring a high-resolution timer. I've talked to people and it seems like it ought to be possible, but no one's really been interested in trying. You can detect Tor Browser/RFP users by calling performance.now() twice and if both are a multiple of 100ms, you know you're dealing with such a user and can display a warning or a link to a help article or something.

@dmarcos
Copy link
Member

dmarcos commented Feb 12, 2021

Thanks @takahirox @tomrittervg for the info. Much appreciated.

Not sure what can be done in the A-Frame side to produce smooth animation at 60Hz / 90Hz... without an accurate timer.

@samuel-zuk
Copy link
Author

Just tested with RFP off and with the reduceTimerPrecision setting changed and yep, same results. Results are worse on more populated scenes also, here's an example of that on the project I work on (link to the page shown here):
Peek 2021-02-12 14-46

@samuel-zuk
Copy link
Author

samuel-zuk commented Feb 12, 2021

Thanks @takahirox @tomrittervg for the info. Much appreciated.

Not sure what can be done in the A-Frame size to produce smooth animationa at 60Hz / 90Hz... without an accurate timer.

Somewhat of a naive idea, but I noticed that in the three.js docs that THREE.Clock() is capable of using Date.now() instead of performance.now(). I know Date.now() is less accurate than performance.now() under normal circumstances, but would it be better than the heavily clamped performance.now() value forced with RFP on? Link here.

Err, scratch that, Date.now() is also clamped by RFP

@tomrittervg
Copy link

Err, scratch that, Date.now() is also clamped by RFP

Wouldn't be much of a security mitigation if we left that bit open now, would it? :)

@kdashg
Copy link

kdashg commented Feb 12, 2021

I have filed a bug about the difficulties here against Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1692609

@dmarcos
Copy link
Member

dmarcos commented Feb 12, 2021

@samuel-zuk @jdashg Thanks folks for looking into it. Much appreciated

@dmarcos
Copy link
Member

dmarcos commented Jan 12, 2022

This looks that's still being addressed on the Firefox side.

@dmarcos
Copy link
Member

dmarcos commented Nov 19, 2022

Is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants