Get started pages

Common install failures

Wizard and SDK failure matrix with exact fixes — from shipped wizard/SDK behavior.

Work through the row that matches your symptom. For “install looked fine but the app is empty,” use No data after the install itself succeeds.

Failure matrix

FailureLikely causeFix
Wizard says unsupported projectPure backend / no supported frontend frameworkInstall on a JS frontend package, or use HTML CDN
Approve never finishesPopup blocked / browser Approve abandonedAllow popups; complete dashboard Approve; retry CLI
Old command npx humanbehavior-jsWrong packageUse npx @humanbehavior/wizard@latest
Hydration mismatch after provider wrapProvider around entire App Router treeUse a leaf client HumanBehaviorInitNext.js
needs-attention install statusWizard finished with build/lint problemsOpen humanbehavior-install-report.md in the repo; fix listed issues
Max turns on monorepoWizard turn budget exhausted walking packagesRun from the frontend package root; raise HB_WIZARD_MAX_TURNS locally only if needed
Env Read denied in wizard logsExpected agent policyUse wizard env tools / paste keys; do not expect arbitrary .env reads
CDN works locally but not prodAd blocker or CSPConfirm Network tab; add reverse proxy; relax CSP for ingestion host
Data in wrong projectWrong API key / wrong Environments keyCopy key from Settings → Environments for the project you open in the UI
Human Behavior API Key is requiredinit called with empty/undefined keyEnsure env vars are available in the browser (NEXT_PUBLIC_… / VITE_…) and restart dev server
Double init / unexpected singletonSecond init returns existing trackerClear hard refresh; avoid mounting two providers with different keys on one page
Minified stacks onlyMaps not uploaded or release mismatchSource maps — same release/dist at runtime and upload
Short bounce sessions emptyDefault 5s minimum durationSet minimumDurationMilliseconds: 0 for landing pages that exit immediately

Wizard device flow

StepWhat happens
1CLI creates a pending wizard_sessions row + user code
2Browser Approve binds project + API key
3CLI polls until approved / error / expired
4Wizard writes env vars and framework init code

If the session expires, restart the wizard — do not reuse a stale user code. Install status fields (installStatus, installReport, etc.) power the dashboard “needs attention” state and the generated humanbehavior-install-report.md.

Framework-specific gotchas

FrameworkCommon miss
Next.js App RouterInit in a Server Component or root layout without "use client"
Remix / Vite SPAKey only in server env — not exposed to the client bundle
HTML CDNScript order — init before interacting; wrong global name

After install succeeds

  1. Verify — confirm init + events in Network
  2. Interact for >5s (or set minimumDurationMilliseconds: 0)
  3. If still empty → No data