Skip to content

Incorrect release version detection for MacOS applications #3639

@TimBurik

Description

@TimBurik

Package

Sentry

.NET Flavor

.NET

.NET Version

8.0.303

OS

macOS

SDK Version

4.10.2

Self-Hosted Sentry Version

No response

Steps to Reproduce

  1. Create a sample project Sentry.Test which targets .net8-macos
  2. Specify application identifier and version in the Info.plist:
<key>CFBundleIdentifier</key>
<string>com.Test.Sentry-Mac</string>
<key>CFBundleShortVersionString</key>
<string>5.55.0</string>
<key>CFBundleVersion</key>
<string>555</string>
  1. Add Sentry nuget package, initialize it from the NSApplicationDelegate.DidFinishLaunching() callback
  2. Capture and send any exception using SentrySdk.CaptureException()

Expected Result

Captured exception is reported with a release version in the format "<bundle_identifier>@<bundle_short_version>+<bundle_version>", in this case it should be "[email protected]+555"

Actual Result

Captured exception is reported with a release version of "[email protected]+3698dd19ef2b4114dd77aed39cc71fd09a9c6586", which seems to be an assembly name and version + git commit hash

It seems that if application is targeting .net8-macos - Sentry Cocoa SDK is not initialized at all, even though it feels like it should.

#if __IOS__
InitSentryCocoaSdk(options);
#elif ANDROID

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions