diagnosing-stacktrace-symbolication

Diagnose PostHog Error Tracking stack-trace symbolication failures across JavaScript, React Native, Android, and iOS builds.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill diagnosing-stacktrace-symbolication
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-stacktrace-symbolication
Source: https://github.com/PostHog/posthog-foss/tree/main/products/error_tracking/skills/diagnosing-stacktrace-symbolication
Command: npx skills add https://github.com/PostHog/posthog-foss --skill diagnosing-stacktrace-symbolication

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Stack traces in PostHog Error Tracking sometimes stay minified or obfuscated even after source maps, Proguard mappings, or dSYMs are uploaded. This Skill walks through the full symbolication pipeline — build config, generated symbol artifacts, uploaded symbol sets, and captured error frames — to pinpoint exactly which layer is broken.

Core Features & Use Cases

  • Five-step diagnostic workflow: Inspect build config, verify local symbol artifacts, check PostHog symbol sets via MCP tools or the UI, compare local vs. uploaded vs. deployed files, and apply targeted fixes.
  • Cross-platform failure matrix: Maps evidence like missing chunk IDs, has_uploaded_file: false, non-null failure_reason, and "Token not found" errors to likely causes and next checks.
  • JavaScript source map inspection script: Summarizes .js and .map files for chunk IDs, mappings, sources, and sourcesContent, and detects the empty-mappings bundler bug.
  • Use Case: A user's Vite-built app shows minified frames in PostHog despite source map upload. The Skill guides checking build.sourcemap config, running the inspection script on dist/, downloading the symbol set via posthog-cli symbol-sets extract, and identifying that Vite emitted an empty-mappings map.

Quick Start

Ask the assistant to diagnose why my PostHog error tracking stack traces are still minified after uploading source maps for my JavaScript web app.

Frequently Asked Questions about diagnosing-stacktrace-symbolication

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug PostHog source maps not working?

Follow the five-step workflow: inspect your build config for the PostHog upload plugin, verify local source maps have non-empty mappings, check the symbol set row in PostHog for has_uploaded_file and failure_reason, then compare local, uploaded, and deployed files. The inspect_sourcemaps.py script summarizes map contents quickly.

Why are my PostHog stack traces still minified after uploading source maps?

Common causes include empty mappings emitted by the bundler, the deployed JS differing from the uploaded build, or a chunk_id mismatch between frames and symbol sets. Check the failure matrix to match your evidence to the likely layer.

What does Token not found mean in PostHog error tracking?

Token not found means PostHog loaded the symbol data but the captured generated position matched no token in the uploaded artifact. It usually indicates the binary changed after upload, wrong line/column capture, or a symbol-coverage gap.

Does this support React Native, Android, and iOS symbolication?

Yes, the workflow and symbol-set lookup steps are universal across JavaScript, React Native Hermes, Android Proguard/R8, and iOS/macOS dSYM. The posthog-cli symbol-sets extract command handles all four container types, though only the JavaScript platform reference is fully fleshed out.

Why does my Vite source map have empty mappings?

Vite can emit structurally valid but data-less source maps when build.sourcemap is unset, because internal plugins like vite:css-post skip sourcemap generation. Set build.sourcemap to 'hidden' or true in vite.config to fix it.

How do I inspect a downloaded PostHog symbol set file?

Downloaded symbol sets are compressed binary containers, not plain JSON. Extract them first with posthog-cli symbol-sets extract, then run the inspect_sourcemaps.py script on the extracted directory to summarize the contents.