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

False positives #21

Open
abrahamjuliot opened this issue Nov 26, 2022 · 8 comments
Open

False positives #21

abrahamjuliot opened this issue Nov 26, 2022 · 8 comments

Comments

@abrahamjuliot
Copy link

From what I see, the Chrome detection is based on storage quota < physical memory from here, but this condition is not exclusive to incognito mode. It's also in:

  • Guest mode
  • Privacy and security settings
    • Clear cookies and site data when you close all windows
    • Sites that clear cookies when you close them
  • Anytime storage quota < jsHeapSizeLimit. Example: 3.99GB quota and 4GB jsHeapSizeLimit would get detected as incognito

Firefox can also produce false positives if the user disables Service Workers and Push API

  • dom.serviceWorkers.enabled
  • dom.push.enabled
Joe12387 added a commit that referenced this issue Nov 27, 2022
@Joe12387
Copy link
Owner

I was not aware of the Guest mode false positive, thank you. Guest mode seems to effectively be incognito mode in everything but name so this is not surprising, but I do see this as a problem. Unfortunately quota < jsHeapSizeLimit has been the predominant method for Chrome for something like five years and I am yet to find an alternate method.

@abrahamjuliot
Copy link
Author

Based on this line

settings.per_host_quota = settings.pool_size / 3;

I think this gives higher accuracy in Chrome. The real pool size is computed by the incognito_pool_size_ratio.
jsHeapSizeLimit / 3 just estimates the max value if the ratio was 1.

quota = (await navigator.storage.estimate()).quota;
memory = performance.memory.jsHeapSizeLimit / 3;

console.log([quota, memory])
console.log(quota < memory )

@abrahamjuliot
Copy link
Author

abrahamjuliot commented Nov 27, 2022

Scratch that... it did not work on Android.

@jhk115
Copy link

jhk115 commented Mar 28, 2023

@abrahamjuliot were you able to find a more reliable solution to this?

@Joe12387
Copy link
Owner

quota < jsHeapSizeLimit is no longer used, it's a little bit different now as of v1.2. See source for details.

@abrahamjuliot
Copy link
Author

abrahamjuliot commented Mar 28, 2023

This works where device memory is reliable, but I like the v1.2 solution.

quota < (jsHeapSizeLimit / 3)
|| (quota / 1024 ** 3) < (navigator.deviceMemory / 3)

@coder0107git
Copy link

As far as I can tell the message from @devarya and @fastkood are scams or spam at the very least.

Repository owner deleted a comment Jan 23, 2024
Repository owner deleted a comment from devarya Jan 23, 2024
@coder0107git
Copy link

The message seem to be a widespread issue. The earliest message that I've found like the message from @devarya was from 4 hours ago. I spotted another almost identical message from @devarya here. When I looked into the message from @devarya the image linked to wwww [dot] bnb-chainexchaing [dot] online. I did a quick search and found about 600 message like that included that link. The strange thing is the earliest comment containing this link was from 4 hours ago. For whatever reason my account doesn't seem to be able to report these spam messages so I'm going to contact github support.

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

4 participants