Fictura
Error tracking

React Native

If your app already calls Growth.init, error tracking is on. There is nothing to add.

Upgrade the SDK and it starts reporting — no new code, no rebuild beyond your normal one. The same init you already have turns it on.

What gets captured

  • Crashes — any unhandled JS exception, via the global error handler.
  • Failed awaits — unhandled promise rejections, the ones that used to vanish silently.
  • Errors you log — console.error(err) with an Error as the first argument, in release builds. A plain-text line, or console.error("failed", err), is kept as a breadcrumb on the next error instead; set captureConsoleErrors: true to send those as issues too.
  • Anything explicit — Growth.captureError(err, { sku, screen: "Paywall" }), or { tags, extra, level, fingerprint } as the second argument. Growth.captureMessage("…", "warning") reports with no exception, and <Growth.ErrorBoundary> reports render crashes.

Each error carries the current screen as its route, your app version as the release, and the account id you provide via getAccountId or Growth.identify — so an error links to that user's funnel. Fatal crashes are persisted on device and delivered on the next launch, because React Native has no keepalive to flush through.

Dev builds don't report console.error

React and LogBox route their own warnings through console.error, so hooking it in development would bury real errors in framework noise. Crashes and rejections report in both.

Already running another error reporter?

Keep it. Our crash handler is installed after yours and always calls it, so every crash it catches today it still catches. The one thing to coordinate is unhandled rejections: Hermes keeps a single rejection tracker and the last one registered wins, which is usually ours. If you run Sentry, turn its tracker off so the two don't fight: Sentry.init({ integrations: [Sentry.reactNativeErrorHandlersIntegration({ onunhandledrejection: false })] }).

Turning it off

Growth.init({ ..., enableErrorCapture: false }) turns it off, and needs a release. Error tracking is a core feature, so it has no switch on Tools. To send less, errorSampleRate sets the share of non-fatal errors sent, beforeSendError changes or drops a report, and maxErrorsPerIssuePerMinute (default 10) limits one issue on one device.

To send nothing at all from a build — no events, errors, logs or traces — don't call Growth.init. Tie it to an env flag, so a simulator, TestFlight or local build with production keys stays quiet:

growth.ts
const off = ["1", "true", "yes", "on"].includes((process.env.EXPO_PUBLIC_FICTURA_OFF ?? "").trim().toLowerCase());

if (!off) {
  Growth.init({ apiBase: "https://api.fictura.co", apiKey: process.env.EXPO_PUBLIC_GROWTH_API_KEY! });
}

EXPO_PUBLIC_ values are read when the bundle is built, so restart Metro or rebuild after changing it. Without init, served paywalls and onboarding aren't fetched either, so show your built-in ones. To keep test builds sending but out of production's list, add inbound filters for the environments development and preview, and simulator for any simulator or emulator build.

What needs more than init

Native crashes need the SDK's native module in the build: see Native crashes. Minified stacks need a source map — without one, release-build errors group by normalized message instead of function names. Upload maps to read and group them by your code: see Source maps.

On this page