npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cphtech-dk/expo-crash-capture

v0.1.1

Published

Next-launch native crash capture (Android exit reasons, iOS MetricKit) for @cphtech-dk/app-monitor.

Readme

@cphtech-dk/expo-crash-capture

Next-launch native crash capture for Expo apps. Reads the OS's own record of why the process last exited — Android's ApplicationExitInfo, iOS's MetricKit — since neither platform gives an app any hook that runs during a native (non-JS) crash.

This is a separate package from @cphtech-dk/app-monitor on purpose: the SDK depends on neither react-native nor any expo-* package (see ADR-0007), so native crash capture has to be something a consumer opts into, not something the SDK pulls in for everyone.

Install

bun add @cphtech-dk/expo-crash-capture
npx expo prebuild

Requires a dev client or production build — this is native code, so it is not available in Expo Go.

Wiring it into @cphtech-dk/app-monitor

Pass a loader that imports this package by its literal name:

import { init } from "@cphtech-dk/app-monitor/native";

init({
  endpoint: "...",
  apiKey: "...",
  nativeCrashReader: () => import("@cphtech-dk/expo-crash-capture"),
});

That literal specifier matters: Metro (React Native's bundler) only resolves import() calls whose argument it can see as a string at bundle time. It cannot resolve one built from string concatenation or passed as a variable — so init()'s built-in fallback, which builds the specifier from parts to stay polite to other bundlers, silently finds nothing under Metro even when this package is installed. nativeCrashReader is not an optional tuning knob; on React Native it is the difference between this package actually being used and init() quietly no-op'ing every launch. See @cphtech-dk/app-monitor's NativeConfig.nativeCrashReader doc comment and ADR-0011 for the full story.

API

import { getLastExitReasons } from "@cphtech-dk/expo-crash-capture";

const records = await getLastExitReasons();

Resolves to [] on Expo Go, on iOS without MetricKit, on Android below API 30 (Android 11), or if nothing crashed since the last call — never rejects. Each call reports only records newer than the last one it already returned (tracked in SharedPreferences / UserDefaults), so calling it more than once — e.g. once from @cphtech-dk/app-monitor and once from the host app — does not duplicate reports.

See src/types.ts for CrashRecord.

On Android 12+ a native crash's trace is the OS's protobuf tombstone, not text. The module decodes it (TombstoneProto.kt — signal, cause, abort message, the crashing thread's top frames; memory dumps and the memory map are skipped without being read into memory) and renders it in the shape debuggerd logs, with topFrame = SIGNAME lib.so Symbol so one crash site stays one group. Text traces (Android 11, JVM crashes, ANRs) are passed through as before.