InventivetalentDev/MineRender

Firefox: resistFingerprinting leads to wrong render

Opened this issue · 1 comments

Describe the bug
When privacy.resistFingerprinting is true in about:config on Firefox

  • All of the textures of player models that have an overlay are wrong:
    minerender-firefox-skin-overlay
  • All Blocks have the wrong texture (as well as items):
    minerender-firefox-blocks
  • And all GUIs have the same problem too:
    minerender-firefox-guis-and-inventories

This is not the case with entities and skins without an overlay (for example md_5).

To Reproduce
Steps to reproduce the behavior:

  1. Go to about:config in Firefox
  2. Change privacy.resistFingerprinting from false to true
  3. Look at the website
  4. See the error on the website with the message Blocked https://minerender.org/demo/skin/ from extracting canvas data because no user input was detected. in the console.

Expected behavior
All of the textures should not be like this.

Additional context
This is because Firefox is blocking the getImageData and the toDataURL methods because the canvas was not accessed by the user at this state. The error in the console is:

Blocked https://minerender.org/demo/skin/ from extracting canvas data because no user input was detected.

This is more or like a niche bug that only happens to the people that change the about:config but is something that someone does not expect.

I'll look into it for the next version, but might not be possible to fix since there are cases where getImageData is required