question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getFingerprint() is not a function

See original GitHub issue

Instantiated new ClientJS() is missing an exposed getFingerPrint() method for version 0.1.11 retrieved from npm. When called, there is a TypeError: client.getFingerprint is not a function exception thrown. Version 0.1.10 works properly, so using this as a temporary solution for now.

The only exposed methods for 0.1.11 are as follows:

getBrowser
getCPU
getDevice
getEngine
getOS
getResult
getUA
setUA

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:12

github_iconTop GitHub Comments

9reactions
sasivarnancommented, Feb 18, 2019

Importing clientjs like this helps

import 'clientjs';
...

// if you use eslint or tslint, you should ignore the next line
var client = new ClientJS();
if (client.getFingerprint()) {
// dosomething...
}

Credits: @sevilen Source: https://github.com/jackspirou/clientjs/issues/91#issuecomment-411610209

5reactions
Archer70commented, Feb 28, 2019

For anyone else reading this, the reason it’s being troublesome is because this library was built to include directly into the browser, not imported. The file wraps all of its functions in a self-executing function (client.js:L130), and has no exports like a node module would.

You can work around it importing without naming, as @sasivarnan suggested.

import 'clientjs'
const client = ClientJS() // eslint-disable-line no-undef
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get browser fingerprint from clientJS in react application?
When I import clientJS module and try to access get fingerprint function, it's throwing error saying Get Finger Print is not a function...
Read more >
How to use the pem.getFingerprint function in pem | Snyk
To help you get started, we've selected a few pem.getFingerprint examples, based on popular ways it is used in public projects.
Read more >
Getting Started with the RDKit in Python
GetSSSR() function, but this only returns the SSSR count, not the potentially non-unique set of rings. List of Available Descriptors¶. Descriptor/Descriptor ...
Read more >
v2 Introduction to the JavaScript Agent | FingerprintJS Pro Docs
The easy-to-install JavaScript agent collects multiple device and browser signals and sends them to the FingerprintJS Pro API for processing and ...
Read more >
AbstractNodeWrapper - Saxonica
The equals() method compares nodes for identity. ... int, getFingerprint() ... Since: 8.7 Previously, the effect of the equals() method was not defined....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found