0

WHAT I WANT:
I try to setup a native iOS project with Sentry (https://sentry.io/) for error tracking and monitoring. (No performance stuff) So if some errors occurs I want to get some detailed info on the Sentry web interface. With detailed I mean the exact code line in my Xcode project.

WHAT I GET:
But somehow it does not work like it should. The native iOS-App sends the events to the server correctly. Though the server shows me the errors, the dSYM is not used. So I just see some arbitrary address and not the code line as wanted. As ERROR MESSAGE I get this:

    There was 1 problem processing this event
    Failed to process native stacktraces.
    Message     internal server error

WHAT I HAVE TRIED:
I setup a self hosted server (version 21.7.0), which seems to work well.

At iOS I installed the sentry cocoapod (version 7.1.4) and did the initialization in AppDelegate.swift like documented:

import Sentry

class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        SentrySDK.start { options in
            options.dsn = "https://...MY_DSN..."
        }
    }
}

Somewhere else in the project I captured a event:

// test capture event
let event = Event()
event.message = SentryMessage(formatted: "debug EVENT message")
event.level = .debug
SentrySDK.capture(event: event)

To achieve processing the native stacktrace I followed the instructions of Sentrys documentation. (https://docs.sentry.io/platforms/apple/guides/ios/) According to it I managed uploading the dSYM file with sentry-cli(version 1.68.0). To upload the dSYM-file I used a bash script:

if which sentry-cli >/dev/null; then
export SENTRY_ORG=sentry
export SENTRY_PROJECT=my-app-ios
export SENTRY_AUTH_TOKEN=MY_AUTH_TOKEN
ERROR=$(sentry-cli upload-dif /Users/my-Account/Library/Developer/Xcode/DerivedData/my-APP-egrtqypuhmsjvpgvnstxzcsmglct/Build/Products/Debug-iphoneos/my-APP.app.dSYM/Contents/Resources/DWARF/my-APP --log-level=debug 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "warning: sentry-cli - $ERROR"
fi
else
echo "warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases"
fi

I created an Auth-Token with all rights to avoid issues with missing permissions. I also tried using "upload-dsym" instead of "upload-dif". To verify the dSYM-file I used sentry-cli difutil to check the usability. Everything seems to be correct here:

Debug Info File Check
Type: dsym debug companion
Contained debug identifiers:
      > Debug ID: d8f...........6f
        Code ID:  d8f...........6f
            Arch:     arm64
Contained debug information:
          > symtab, debug
Usable: yes

On the server the uploaded dSYM-file looks like this: enter image description here

Because of still failing, I played around with some option variables at the initialization in AppDelegate.swift . I tried to set some values to options.releaseName and options.dist . Still no success.

I really wonder what I am doing wrong. The dSYM upload seems to be correct. When I view the details it even shows me the correct Debug ID.

enter image description here

I also checked out this issue: https://forum.sentry.io/t/loaded-dsym-files-but-crashlog-isnt-symbolicated/2755
No success either.

QUESTION:
What could I have done wrong or missed to achieve native stacktracing for my native iOS-App?

I tried to describe everything in detail. Feel free to ask for some more details.

Laufwunder
  • 773
  • 10
  • 21

0 Answers0