React-spring: Not working on Firefox if `privacy.resistFingerprinting` is set to true

Created on 6 May 2019  路  7Comments  路  Source: pmndrs/react-spring

馃悰 Bug Report

When this feature is true, the package doesn't work. You can find more details about what resistFingerprinting does here: https://wiki.mozilla.org/Security/Fingerprinting

To Reproduce

Open Firefox and set the privacy.resistFingerprinting as true in about:config and just open an example of React Spring

Expected behavior

Works fine

Link to repro (highly encouraged)

Even React-spring website doesn't work

Environment

  • react-spring v8.x.x
  • react v16.8.x (or react-native v0.58.x)
PR welcome bug help wanted

Most helpful comment

To detect that fingerprinting is enabled something like

import { Globals } from 'react-spring'

if (performance.mark && performance.getEntries) {
    performance.mark('dummy_check')
    const entries = performance.getEntries()

        Globals.assign({
        skipAnimation: entries && entries.length === 0,
    })
}

can be used.

Also check for FF can be added using the navigator.appCodeName

All 7 comments

I'd also like to add that the website https://www.react-spring.io/ isn't working properly with Firefox with that option on: the menus can't be open.

I haven't looked into this much yet, but I suspect the following points to be part of the issue:

  • The performance API is mostly disabled
  • Time Precision is reduced to 100ms, with up to 100ms of jitter

The best bet might be to disable animation entirely:

import { Globals } from 'react-spring'

Globals.assign({
  skipAnimation: privacy.resistFingerprinting,
})

To detect that fingerprinting is enabled something like

import { Globals } from 'react-spring'

if (performance.mark && performance.getEntries) {
    performance.mark('dummy_check')
    const entries = performance.getEntries()

        Globals.assign({
        skipAnimation: entries && entries.length === 0,
    })
}

can be used.

Also check for FF can be added using the navigator.appCodeName

In about:config the jitter can be turned on/off and the precision changed. I set jitter to false and increased precision from 1000 to 1 with no resolution.

Any update on this, as this is buggering me right now?

Yeah, seems this is still an issue.

I just upgraded to v9rc3 and the issue seems to be fixed!

Was this page helpful?
0 / 5 - 0 ratings