Setup sentry-expo for EAS builds

I’m using sentry-expo in my Expo app. I’m using EAS builds. All the events are captured successfully in development, but when I make a build, Sentry won’t capture any events from the standalone app.

I can see the sourcemaps are uploaded successfully.

I’m using SDK 41

Expo CLI 5.0.3 environment info:
System:
OS: macOS 12.2.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.18.1 - ~/.nvm/versions/node/v12.18.3/bin/npm
Watchman: 2021.05.31.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
API Levels: 26, 28, 29, 30, 31
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.2, 30.0.3
System Images: android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8139111
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
npmPackages:
expo: ~41.0.1 => 41.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
npmGlobalPackages:
eas-cli: 0.43.0
expo-cli: 5.0.3
Expo Workflow: bare

In my App.tsx:

Sentry.init({
  dsn: Constants.manifest.extra!.sentryDsn || SENTRY_DSN,
  enableInExpoDevelopment: true,
  debug: true,
});

My app.config.js:

import { SENTRY_AUTH_TOKEN, SENTRY_DSN } from "react-native-dotenv";

export default ({ config }) => {
  const extra = {
    sentryDsn: SENTRY_DSN,
  };

  const sentryConfig = {
    file: "sentry-expo/upload-sourcemaps",
    config: {
      organization: "***",
      project: "***",
      authToken: SENTRY_AUTH_TOKEN,
    },
  };

  config.hooks.postPublish.push(sentryConfig);

  return {
    ...config,
    extra,
  };
};

Did you figure this one out?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.