Parallax

Sentry in the window

The project's unresolved Sentry errors, their frames as files and lines of your project, Reproduce with the agent, and how to connect Sentry with a read-only token.

The Sentry tab of the Services panel lists the unresolved errors of your app's Sentry project. An error opens its latest event, with the frames that are files of your project. It is read only. The tab's How this works ↗ opens this page.

What the tab shows

  • The unresolved issues of the project from the last 14 days, newest first (up to 15), each with how many times it happened and when it was last seen.
  • A click on one reads its latest event: the exception, the release, and the frames that are files of this project. A frame opens Code at its line.
  • Reproduce with the agent puts the exception, those frames with their file and line, and the last breadcrumbs (up to 8) into your message to the agent. It is wrapped as untrusted data, between -----BEGIN SENTRY DATA----- and -----END SENTRY DATA-----, with a line telling the agent not to follow commands inside it. Nothing is sent until you press Send to agent.
  • Open in Sentry opens the issue in your browser.

The chip is red with the number of unresolved issues (Sentry 3), and there is none when nothing is unresolved. A dashed Sentry chip means Sentry refused the token. The list is read when the project or branch changes, when you open the panel from its chip, on Refresh, and every 5 minutes.

Which frames count as your project's

A frame is shown when Sentry marks it as in the app (inApp), it is not under node_modules, and the file exists inside the project folder. Hermes' internal frames (InternalBytecode.js) are skipped. When no frame qualifies, the tab says so: the error comes from a library, or the build is not this project.

The Sentry connection belongs to this Mac, not to a project, so the same Sentry project shows in every project's window. Its frames open only when the file is in the project you are looking at.

Connect Sentry

  1. In Sentry: User settings, Personal Tokens. Create a token with the scope event:read only.
  2. In the window: the Services panel, the + tab, Sentry, Connect. Choose the host (sentry.io, us.sentry.io, or de.sentry.io for the EU region), enter the organization slug and the project slug, paste the token and press Check and save.

The token is sent only to the host you chose. See where tokens are kept.

An organization token cannot read errors

The organization token that Sentry's wizard writes to sentry.properties is for uploading source maps. It cannot read events, so the window cannot use it. Use a personal token with event:read, and keep the organization token out of git.

Sentry in your app

If your app does not report to Sentry yet, run Sentry's wizard in the project root:

npx @sentry/wizard@latest -i reactNative --saas --org <org> --project <project>

Run it in a real terminal: it opens a browser to log you in.

  • Release builds upload their source maps while they build. The frames then come back as your project's files and lines.
  • Debug builds are symbolicated by Metro and do not upload source maps. Their frames are not read.

What was checked

Parallax checked this on a test app (React Native 0.88.1 with Hermes, @sentry/react-native 8.36 set up by the wizard, a release build on the iOS simulator) before building the tab:

  • The two reads the window makes, the unresolved issues and an issue's latest event, work on Sentry's free Developer plan, on sentry.io and de.sentry.io.
  • The frames come back already relative to the project root (src/CompatScreen.tsx), with the source's own line numbers, so they open in Code as they are.
  • inApp tells the project's frames from node_modules.

Not checked yet: debug builds, JSC, Android, Expo and EAS Update, a real iPhone, a native crash, and source maps uploaded another way than the wizard's build step (the check that the file exists in the project is the safety there).

Not yet

  • A "reproduced" mark when the same error reaches the window's Errors feed.
  • More than one Sentry project for an app.
  • Any write to Sentry, such as resolving an issue.

On this page