Skip to content

Android/Chrome device alternates between 2 fingerprints #94

Open

Description

@d3r3kr0b3rts

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

Activity

  1. d3r3kr0b3rts commented on Mar 20, 2019

    @d3r3kr0b3rts
    Author

    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);
    }

  2. lsteixeira commented on Oct 22, 2019

    @lsteixeira

    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.

  3. soberdor commented on Dec 1, 2019

    @soberdor

    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.

  4. MrAlekhin commented on Jul 18, 2022

    @MrAlekhin

    the same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions