getsentry/sentry-react-native

[iOS] Debug symbol uploading is not working

Closed this issue · 3 comments

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.31.1

react-native version: 0.74.5

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:

(@sentry/react-native)

Sentry.init({
    dsn: 'https://...@sentry.io/...'
    maxBreadcrumbs: 50,
    debug: false,

    attachStacktrace: true,
    enableTracing: false,

    enableNative: true,
    autoInitializeNativeSdk: true,
    enableNativeCrashHandling: true,
    enableAutoPerformanceTracing: false,
    enableAutoSessionTracking: false,
});

I have the following issue:
Sentry is integrated into this project using @sentry/wizard, but debug symbols are never uploaded.
The default build script Upload Debug Symbols to Sentry seems to be doing nothing, if I run the default upload script within a terminal (under rn-project/ios folder), it says Found 0 debug information files.

The following is the default upload script I'm referring to:
/bin/sh ../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh

If I delete the build script Upload Debug Symbols to Sentry created by @sentry/wizard and create another one using steps explained here, under the section Xcode Build Phase, debug symbols are successfully uploaded to our sentry server.

Steps to reproduce:

  • Step 1: grab an empty react native project, using react-native-cli, no Expo.
  • Step 2: add @sentry/wizard and @sentry/react-native to project dependency and run npx @sentry/wizard@latest -s -i reactNative
  • Step 3: build project in XCode and check sentry web interface for incoming sourcemap/ debug symbols

Actual result:

Source maps are there, while debug symbols are missing

Expected result:

All source maps and debug symbols are present

This looks a like a minor bug to be since sentry-xcode-debug-files.sh is basically the same same script presented in Xcode Build Phase with some env setup and stuff.

Hi @zzz08900,
thank you for the message.

I compared the sentry-cocoa guide with sentry-xcode-debug-files.sh and they execute the exact same command so their output should be the same.

Executing sentry-xcode-debug-files.sh will not upload any debug files if $DWARF_DSYM_FOLDER_PATH is not set.


Note the sentry-xcode-debug-files.sh is only executed for Release builds. And native source code are not included by default, add SENTRY_INCLUDE_NATIVE_SOURCES=true to use it.


Could you add export SENTRY_CLI_EXTRA_ARGS="--force-foreground" to your .xcode.env and share the sentry-xcode-debug-files.sh when run in Xcode?

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀