Skip to content

JavaScript error monitoring for the browser.

Add @squasher-ai/browser and call init() once. Uncaught errors, unhandled rejections, Web Vitals, and session replay start on their own.

Free plan. No credit card required.

import { init } from "@squasher-ai/browser"; init({  apiKey: import.meta.env.VITE_SQUASHER_API_KEY,  projectId: import.meta.env.VITE_SQUASHER_PROJECT_ID,  environment: import.meta.env.MODE,  release: import.meta.env.VITE_GIT_SHA,  captureConsoleErrors: true,});
app.squasher.ai/acme/checkout-web/issues

TypeError: Failed to fetch

UnhandledRejection(TypeError)

MediumUnresolvedError
Events
312
First seen
2d ago
Last seen
4m ago
Environment
production
Service
checkout-web

Example code and the issue it produces.

What is automatic, and what you add.

One init() call covers what the browser reports on its own. The rest is one line each.

Uncaught errors

Captured
Automatic
How
The window error event, with stack frames and the page URL.

Unhandled rejections

Captured
Automatic
How
Recorded as UnhandledRejection, with the original error type.

Core Web Vitals

Captured
Automatic
How
LCP, CLS, INP, FCP, and TTFB.

Session replay

Captured
Automatic
How
On by default, with password fields masked. Set a sample rate.

console.error calls

Captured
Opt in
How
Set captureConsoleErrors: true.

React render errors

Captured
When wrapped
How
SquasherErrorBoundary from @squasher-ai/browser/react.

Errors you catch

Captured
Manual
How
captureError(error, extra).

Checked with @squasher-ai/browser 0.4.0 on September 24, 2026.

Live in three steps.

Install the SDK, start it when your app boots, and throw one error. Or paste one prompt into your coding agent.

  1. Install the browser SDK

    Install it in the app that runs in the browser.

    npm install @squasher-ai/browser
  2. Call init() once at startup

    Read the key and project ID from your bundler's public environment variables.

    import { init } from "@squasher-ai/browser"; init({  apiKey: import.meta.env.VITE_SQUASHER_API_KEY,  projectId: import.meta.env.VITE_SQUASHER_PROJECT_ID,  environment: import.meta.env.MODE,  release: import.meta.env.VITE_GIT_SHA,  captureConsoleErrors: true,});
  3. Throw one test error

    Run this in the page, then check Issues in your project.

    setTimeout(() => {  throw new Error("Squasher test error");});
    Browser SDK guide
Paste into your coding agent
Install Squasher for this project. If Squasher skills or MCP are not configured in this agent environment, run `bash <(curl -fsSL https://squasher.ai/install.sh) --agents -y`. Then read https://skills.squasher.ai/squasher-onboard/SKILL.md, map every runnable app/service/worker/frontend/agent in the repo, choose the matching Squasher SDK, log drain, OTLP, or Agent SDK path, initialize with SQUASHER_API_KEY and SQUASHER_PROJECT_ID from environment variables, send one real verification event, and report the files changed plus the verification step. Do not hardcode or reveal real API keys.
bash <(curl -fsSL https://squasher.ai/install.sh) --agents -y

See what the user saw.

Replay records the page as the user used it. It shares a session ID with that user's errors.

  • On by default after init(). Password fields are always masked.
  • Mask all text, or block elements by CSS selector.
  • Record a share of sessions with replay.sampleRate.
  • Turn it off with replay: { enabled: false }.
How session replay works
shop.example.com/checkout
Total
Pay
Something went wrong

error at 1:031:40

Example replay.

Context on every event.

A stack trace says where the code failed. These fields say which build, which page, and which user.

  • Release

    The build the error came from. Pass your commit SHA to release.

  • Environment

    production, staging, or development, so you can filter issues.

  • Page URL

    The address of the page where the error happened.

  • Session ID

    One ID per browser tab, shared by errors, Web Vitals, and replay.

  • User

    Call identify() after sign-in, and later events carry that user.

  • beforeSend

    Change or drop any error event before it leaves the page.

Source maps, uploaded per release.

Build with source maps and upload them from CI with the release you deploy.

  • Squasher stores the maps by project, service, and release.
  • Stack traces are not de-minified with them yet.
  • Keep .map files off your public host if you do not want to publish your source.
Source map docs
CI after the build
vite build --sourcemap squasher sourcemaps upload \  --project "$SQUASHER_PROJECT_ID" \  --service checkout-web \  --release "$GIT_SHA" \  $(find dist -name "*.map")

Common JavaScript errors, explained.

What each error means in every browser, why it happens, and the code that fixes it.

  • TypeError: Failed to fetch

    No response reached your code: CORS, offline, or blocked.

    Read the fix
  • Cannot read properties of undefined

    A value was never set: data not loaded, or a failed find().

    Read the fix
  • Cannot read properties of null

    A DOM query, ref, or match() returned null.

    Read the fix
  • ResizeObserver loop limit exceeded

    A resize callback changed the size it was watching.

    Read the fix
  • JavaScript network error

    fetch, Axios, and chunk loads that fail before a response.

    Read the fix
  • Stack trace parser

    Paste a JavaScript, Python, JVM, Ruby, or Go stack trace and find the first app frame.

    Open the tool

Questions, answered.

What does the browser SDK capture on its own?

After init() it captures uncaught errors from the window error event and unhandled promise rejections, and it records Core Web Vitals and session replay. console.error calls become events only when you set captureConsoleErrors: true.

Does it work with React, Vue, or plain JavaScript?

Yes, it only needs a browser. React render errors need SquasherErrorBoundary from @squasher-ai/browser/react. Vue handles component errors itself, so call captureError from app.config.errorHandler. For Next.js, use the Next.js setup.

Are minified stack traces readable?

Yes, when you upload source maps. Upload them for each release with the CLI, and the issue page shows the original file, line, function, and source lines. Maps with a debug ID match without a release.

Will it slow my page down?

Errors are sent one by one with sendBeacon or a keepalive fetch, and Web Vitals in small batches. The replay recorder is the largest part. It is loaded with a dynamic import, and with replay: { enabled: false } it is not loaded at all.

How do I keep personal data out?

Use beforeSend to change or drop an event before it leaves the page. Replay masks all text, typed values, and media by default; hide more elements with privacy.blockSelector.

How do I know which user hit an error?

Call identify() or setUser() after sign-in. Later events carry that user, and replays are attributed to the same identity.

Priced by volume, never by seat.

Start free. Invite the whole team. AI triage is included on every plan.

Compare every plan

Free

For side projects, evals, and internal tools.

$0/ month

No card needed. No overage charges.

Start free
10 GB telemetry
5K replays
500 AI credits

Included

  • AI triage on new issues
  • 500 AI credits / month (an investigation uses 50)
  • 1 project

Pro

For small production apps that want one tool, not five.

$29/ month

Flat price. No per-seat fees.

Start on Pro
100 GB telemetry
10K replays
3K AI credits

Everything in Free, plus

  • 3,000 AI credits / month (an investigation uses 50)
  • 5 projects
  • 30 monitors with 30-second checks

Team

Most Popular

For product teams replacing separate error, replay, and status tools.

$99/ month

Flat price. No per-seat fees.

Start on Team
250 GB telemetry
40K replays
12K AI credits

Everything in Pro, plus

  • 12,000 AI credits / month (an investigation uses 50)
  • Unlimited projects
  • 25 status pages

Scale

For high-volume teams with security, procurement, and support needs.

$299/ month

Flat price. No per-seat fees.

Start on Scale
1 TB telemetry
150K replays
30K AI credits

Everything in Team, plus

  • 30,000 AI credits / month (an investigation uses 50)
  • 100 status pages
  • 250 monitors with 30-second checks

Need more volume, a security review, or custom terms? Get in touch.

Go squash some bugs.

Connect one service and send one real event. The crew takes it from there.

Free plan. No credit card required.