Skip to Content
Platform.Ontology

Error message and stack formats

Triggers errors and reads their message text and stack trace format.

Used to track youGraphics and fingerprintingJS engineWeb browsersWhen the page loads

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

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11None
EdgeSupported792020-01-15None
FirefoxSupported12004-11-09None
SafariSupported12003-06-23None
Safari on iPhoneSupported12007-06-29None
Chrome on AndroidSupported1Not listedNone
Samsung InternetSupported5.02016-12-15None

How a site asks for it

APItry { null.x } catch(e){ e.message, e.stack }; Error.captureStackTrace; Error.stackTraceLimit
How access is grantednone
What the user seesNot listed
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Trigger ~20 error types
  2. Compare message strings and stack frame syntax
  3. Check for Error.captureStackTrace

Data you get

What comes back: 20 strings
Shape: list

FieldTypeUnitRangePrecision
messagestringNoneengine wordingexact

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

TypeExampleApps
developerA website tracks crashes and sends error messages home to fix bugs.Sentry, Datadog, Bugsnag
securityA bot detector throws an error and sees a message style from an automation tool rather than a real browser.DataDome, HUMAN
analyticsA fingerprint library adds the error text format as one more clue in a device ID.FingerprintJS, CreepJS
gamesA browser game catches a missing feature error and shows a nicer message, or loads a simpler mode.None named
productivityA web editor sends crash details to its team so a bug in one browser can be fixed fast.Notion, Google Docs
adsAn ad script checks the error format to spot that traffic comes from a headless browser.None named
shoppingA 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

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility1 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits2Rough identifying entropy, when known

Sources

How well checked: Based on official documentation.

On this page