Error message and stack formats
Triggers errors and reads their message text and stack trace format.
In one line
Can trigger small errors to learn which browser engine you really use
Triggers errors and reads their message text and stack trace format.
Error wording and stack layout differ between V8, SpiderMonkey and JavaScriptCore, and shift per version, revealing real engine under a spoofed user agent.
What it can and can't do
What the user does: Nothing. It happens when the page loads
It can
- Cause harmless errors on purpose and look at the wording
- Tell Chrome, Firefox and Safari engines apart by their error style
- Spot a faked browser label
- Guess the browser version from small changes in the wording
It cannot
- See anything you typed or saved
- Know who you are by itself
- Ask permission first
- Break the page or your device
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 1 | 2004-11-09 | None |
| Safari | Supported | 1 | 2003-06-23 | None |
| Safari on iPhone | Supported | 1 | 2007-06-29 | None |
| Chrome on Android | Supported | 1 | Not listed | None |
| Samsung Internet | Supported | 5.0 | 2016-12-15 | None |
How a site asks for it
| API | try { null.x } catch(e){ e.message, e.stack }; Error.captureStackTrace; Error.stackTraceLimit |
| How access is granted | none |
| What the user sees | Not listed |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Trigger ~20 error types
- Compare message strings and stack frame syntax
- Check for Error.captureStackTrace
Data you get
What comes back: 20 strings
Shape: list
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
message | string | None | engine wording | exact |
Technical limits
- Engine only, no device data
The story
What it is
A script causes small errors on purpose and reads the message and stack trace, which differ by browser.
For you
You never see it. The page makes errors inside itself and reads the wording, which looks a little different in Chrome, Firefox and Safari. The result helps name your browser.
For makers
Errors are a normal part of building apps, and sites collect them to fix bugs. Fraud tools also read the wording to tell real browsers from scripts that fake them.
Where you see it
| Type | Example | Apps |
|---|---|---|
| developer | A website tracks crashes and sends error messages home to fix bugs. | Sentry, Datadog, Bugsnag |
| security | A bot detector throws an error and sees a message style from an automation tool rather than a real browser. | DataDome, HUMAN |
| analytics | A fingerprint library adds the error text format as one more clue in a device ID. | FingerprintJS, CreepJS |
| games | A browser game catches a missing feature error and shows a nicer message, or loads a simpler mode. | None named |
| productivity | A web editor sends crash details to its team so a bug in one browser can be fixed fast. | Notion, Google Docs |
| ads | An ad script checks the error format to spot that traffic comes from a headless browser. | None named |
| shopping | A retailer logs checkout errors by browser to find which one breaks the payment form. | None named |
Risks
- Helps bots hide detection
- Hard to spoof
Good uses and abuse
Legitimate uses
- Debug telemetry
Known abuse
- Detect UA spoofing and automation (for example missing stack frames)
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 1 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 2 | Rough identifying entropy, when known |
Related capabilities
Related
- JS and Web API feature detection (version pinning). Can test which web features exist to guess your exact browser version
Sources
How well checked: Based on official documentation.