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

Android/Chrome device alternates between 2 fingerprints #94

Open
d3r3kr0b3rts opened this issue Mar 20, 2019 · 4 comments
Open

Android/Chrome device alternates between 2 fingerprints #94

d3r3kr0b3rts opened this issue Mar 20, 2019 · 4 comments

Comments

@d3r3kr0b3rts
Copy link

d3r3kr0b3rts commented Mar 20, 2019

This is a great project, very simple to install and use and mostly it's working as intended. Thank you for making this available and your hard work putting it together.

I'm using clientjs in a project that fingerprints the device and stores the fingerprint in a database. If the value of the cookie on the device and the fingerprint of the device don't match what is stored in the database then the old cookie is unset and a new cookie and fingerprint are set on the device. This is working fine on 2 desktop Windows/Chrome devices but on 2 different Android/Chrome devices the program will get stuck in a loop where it alternates between the following 2 fingerprints. The first fingerprint value will be stored in the db, then on a page reload the device fingerprint will no longer match with the database fingerprint so the second fingerprint is stored, then on a page reload the second device fingerprint will no longer match and the first device fingerprint is stored again. I've included both of the fingerprints hoping that it would be useful. This happens using the client.getFingerprint() method.

[edit] I remember these are md5 hashes of the fingerprints, not the fingerprints themselves.
166fe3d7c2604fee688d8d18b0ad6ecd
and then
ceb983f07355b3750b34d1d7723d648f

@d3r3kr0b3rts
Copy link
Author

d3r3kr0b3rts commented Mar 20, 2019

I think I've narrowed the issue down to the getCanvasPrint function returning different results but I don't know enough about the canvas element to determine why. This is unfortunate since the canvasprint seems to be one of the more unique data points. The solution I'm going with for now is to run a check for mobile and then perform the standard fingerprint on desktop and a custom fingerprint on mobile which doesn't use the canvasprint data point.

var client = new ClientJS(); // Create A New Client Object
var mobilecheck = client.isMobile();
if(mobilecheck == false) {
var fingerprint = client.getFingerprint(); // Calculate Device/Browser Fingerprint
}else{
var a = client.getBrowser();
var b = client.getEngine();
var c = client.getOS();
var d = client.getOSVersion();
var e = client.getPlugins();
var f = client.getFonts();
var g = client.getTimeZone();
var h = client.getLanguage();
// var i = client.getCanvasPrint();
var fingerprint = client.getCustomFingerprint(a,b,c,d,e,f,g,h);
}

@lsteixeira
Copy link

I think I've narrowed the issue down to the getCanvasPrint function returning different results but I don't know enough about the canvas element to determine why. This is unfortunate since the canvasprint seems to be one of the more unique data points. The solution I'm going with for now is to run a check for mobile and then perform the standard fingerprint on desktop and a custom fingerprint on mobile which doesn't use the canvasprint data point.

var client = new ClientJS(); // Create A New Client Object
var mobilecheck = client.isMobile();
if(mobilecheck == false) {
var fingerprint = client.getFingerprint(); // Calculate Device/Browser Fingerprint
}else{
var a = client.getBrowser();
var b = client.getEngine();
var c = client.getOS();
var d = client.getOSVersion();
var e = client.getPlugins();
var f = client.getFonts();
var g = client.getTimeZone();
var h = client.getLanguage();
// var i = client.getCanvasPrint();
var fingerprint = client.getCustomFingerprint(a,b,c,d,e,f,g,h);
}

Having the same issue.
I'll investigate a bit to see what might be the issue.

@soberdor
Copy link

soberdor commented Dec 1, 2019

I‘m having the same issue on an iPad, however the two fingerprints seem to alternate consistently according to screen orientation. I was able to reproduce this behavior on an iPhone as well.

@MrAlekhin
Copy link

the same issue here

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