Skip to content

[iOS] "Upload Debug Symbols to Sentry" build phase fails on EAS Build with SDK 7.8.0 - SENTRY_ALLOW_FAILURE not respected #5507

@Jcorderop02

Description

@Jcorderop02

What React Native libraries do you use?

Expo Application Services (EAS), Expo Router, Expo (mobile only), Hermes, RN New Architecture

Are you using sentry.io or on-premise?

sentry.io (SaS)

@sentry/react-native SDK Version

7.8.0

How does your development environment look like?

  System:
    OS: macOS 15.7.1
    CPU: Apple Silicon (arm64)
    Memory: 16 GB
  Binaries:
    Node: 22.21.1 - /opt/homebrew/opt/node@22/bin/node
    npm: 10.9.4 - /opt/homebrew/opt/node@22/bin/npm
    pnpm: 9.15.0
  SDKs:
    iOS SDK:
      Platforms: iOS 26.2, DriverKit 26.0, macOS 26.0, tvOS 26.0, visionOS 26.0, watchOS 26.0
    Android SDK: Not Found
  IDEs:
    Xcode: 26.2/26B81 - /usr/bin/xcodebuild
  npmPackages:
    @sentry/react-native: ^7.8.0
    expo: ~54.0.30
    react-native: 0.81.5
    react: 19.1.0

  Expo Config:
    SDK: 54
    newArchEnabled: true
    jsEngine: hermes

  Build Method: EAS Build (local) with eas-cli

Sentry.init()

Sentry.init({
    dsn: SENTRY_DSN,

    // Configuración de entorno
    environment: isDevelopment ? 'development' : 'production',

    // Información de la release - DEBE coincidir con upload-sentry-all.sh
    // Formato: bundleId@version+buildNumber
    release: `${Constants.expoConfig?.ios?.bundleIdentifier || Constants.expoConfig?.android?.package || 'es.holajefe.app'}@${Constants.expoConfig?.version || '1.0.0'}+${Constants.expoConfig?.ios?.buildNumber || Constants.expoConfig?.android?.versionCode || '1'}`,
    dist: String(
      Constants.expoConfig?.ios?.buildNumber || Constants.expoConfig?.android?.versionCode || '1'
    ),

    // Habilitar tracing de performance (sample rate)
    tracesSampleRate: isDevelopment ? 1.0 : 0.2, // 100% en dev, 20% en prod

    // Habilitar profiling para identificar funciones lentas
    profilesSampleRate: isDevelopment ? 1.0 : 0.1, // 100% en dev, 10% en prod

    // Session Replay
    replaysSessionSampleRate: isDevelopment ? 1.0 : 0.1,
    replaysOnErrorSampleRate: 1.0,

    // Configurar integraciones
    integrations: [
      Sentry.reactNavigationIntegration(),
      Sentry.reactNativeTracingIntegration(),
      Sentry.mobileReplayIntegration(),
    ],

    // iOS: Habilitar App Hang Tracking
    enableAppHangTracking: true,
    appHangTimeoutInterval: 2000,

    // Habilitar tracking de stalls
    enableStallTracking: true,

    // Captura de screenshots en crashes
    attachScreenshot: true,

    // Capturar view hierarchy
    attachViewHierarchy: true,

    // Más breadcrumbs automáticos
    maxBreadcrumbs: 100,

    // Habilitar tracking de frames lentos/congelados
    enableAutoPerformanceTracing: true,

    // beforeSend para filtrar errores
    beforeSend(event, hint) {
      // ... filtros de throttling, errores de red, etc.
      return event;
    },

    debug: false,
    enableAutoSessionTracking: true,
    sessionTrackingIntervalMillis: 30000,
    attachStacktrace: true,
  });

Steps to Reproduce

  1. Create a new Expo project with SDK 54, newArchEnabled: true, and Hermes
  2. Install @sentry/[email protected]
  3. Add the Sentry plugin to app.config.js:
    plugins: [
    [
    '@sentry/react-native/expo',
    {
    organization: 'your-org',
    project: 'your-project',
    },
    ],
    ]
  4. Create .env.sentry-build-plugin with:
    SENTRY_AUTH_TOKEN=your_token
    SENTRY_ORG=your-org
    SENTRY_PROJECT=your-project
    SENTRY_DISABLE_AUTO_UPLOAD=true
    SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD=true
  5. Run: eas build --platform ios --profile production --local
  6. Build fails at "Upload Debug Symbols to Sentry" phase with exit code 1
  7. SENTRY_ALLOW_FAILURE=true is ignored - build still fails instead of continuing

Expected behavior:
Build should complete successfully, either uploading symbols or continuing if upload fails (when SENTRY_ALLOW_FAILURE=true).

Actual behavior:
Build fails with "error: [...] Command PhaseScriptExecution failed with a nonzero exit code"

Expected Result

When using the @sentry/react-native/expo plugin with EAS Build:

  1. The "Upload Debug Symbols to Sentry" build phase should complete successfully
  2. If upload fails and SENTRY_ALLOW_FAILURE=true is set, the build should continue without failing
  3. Environment variables from .env.sentry-build-plugin should be read by the Xcode build phase

Actual Result

Build fails at "Upload Debug Symbols to Sentry" phase:

PhaseScriptExecution Upload\ Debug\ Symbols\ to\ Sentry /Users/.../Build/Intermediates.noindex/ArchiveIntermediates/HolaJefe/IntermediateBuildFilesPath/HolaJefe.build/Release-iphoneos/HolaJefe.build/Script-96B5EC4E9CDA4CB58D9BE7BF.sh
cd /Users/.../apps/mobile/ios
/bin/sh -c /Users/.../Script-96B5EC4E9CDA4CB58D9BE7BF.sh

error: Couldn't upload dSYM (Command PhaseScriptExecution failed with a nonzero exit code)

** ARCHIVE FAILED **

Notes:

  • SENTRY_ALLOW_FAILURE=true is set in .env.sentry-build-plugin but is ignored
  • The .env.sentry-build-plugin file is NOT read by the Xcode build phase (only .xcode.env is sourced)
  • Setting SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD=true also does not prevent the failure
  • Build works fine when the plugin is completely disabled and sourcemaps are uploaded manually with @sentry/cli

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions