Skip to content

Conversation

@EmpiresHQ
Copy link
Contributor

@EmpiresHQ EmpiresHQ commented Jun 21, 2025

when calling overrideInstancePrototype, the overrideGetterWithProxy is been called, which in turn tries to run:

const fn = Object.getOwnPropertyDescriptor(masterObject, propertyName).get;

This returns undefined for

Object.getOwnPropertyDescriptor(window.screen, 'availHeight');

and basically crashes when trying to access get

This results in screen properties been reset to undefined which is seen on FingreprintJs test:

{
  ...
  "screenFrame": {
    "value": [
      0,
      0,
      0,
      0
    ],
    "duration": 2
  },
  ...
}

This fix just redefines the get accessor without playing with proxies

@barjin
Copy link
Collaborator

barjin commented Jun 24, 2025

Hello, and thank you for your interest in this project!

Good job with debugging this! I'm afraid the proxy tricks are somewhat necessary, though - some fingerprinting tools (e.g. CreepJS) try accessing the object in other-than-regular ways to see if something tried overriding the properties. See the comparison below:

master fix_window_screen
image image

You can find these lists on https://abrahamjuliot.github.io/creepjs/, under lies (right part of the screen, at the very top).

@EmpiresHQ
Copy link
Contributor Author

What would be the correct approach to fix it? I am ready to update the PR

@barjin
Copy link
Collaborator

barjin commented Jun 27, 2025

You can start by sharing a minimal reproduction, so we both understand what issue this PR is trying to fix. Once we have that (be it a snippet here in GitHub or a new test case in this PR), we can decide what specifically to do.

@EmpiresHQ
Copy link
Contributor Author

EmpiresHQ commented Jun 28, 2025

I have quickly vibecoded a reference check tool (#425), it's reproducible and visible there
screenshot

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

Successfully merging this pull request may close these issues.

2 participants