getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.57k stars 337 forks source link

[iOS] Debug symbol uploading is not working #4060

Closed zzz08900 closed 4 weeks ago

zzz08900 commented 2 months ago

OS:

Platform:

SDK:

SDK version: 5.31.1

react-native version: 0.74.5

Are you using Expo?

Are you using sentry.io or 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:

Actual result:

Source maps are there, while debug symbols are missing

Expected result:

All source maps and debug symbols are present

zzz08900 commented 2 months ago

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.

krystofwoldrich commented 1 month ago

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?

getsantry[bot] commented 1 month ago

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 🥀