Skip to content

macOS Profile dSYMs are silently skipped #414

Open

Description

@buenaflor

Description

Running sentry_dart_plugin after a Flutter macOS Profile build reports that debug-symbol uploading completed, but it does not invoke sentry-cli debug-files upload and uploads no dSYMs.

This reproduces with sentry_dart_plugin 3.4.0 and is also present on the current main branch.

Steps to reproduce

  1. Build a Flutter macOS application in Profile mode:

    flutter build macos --profile
  2. Verify that Flutter generated the Dart AOT dSYM:

    build/macos/Build/Products/Profile/App.framework.dSYM
    
  3. Run the plugin:

    dart run sentry_dart_plugin

Actual behavior

The plugin prints:

☑ uploading debug symbols

However, there is no corresponding sentry-cli debug-files upload invocation. The task succeeds silently after discovering zero eligible paths.

The generated dSYM itself is valid and is recognized as usable by:

sentry-cli debug-files check --json   build/macos/Build/Products/Profile/App.framework.dSYM/Contents/Resources/DWARF/App

Expected behavior

The plugin should discover and upload native dSYMs under build/macos/Build/Products/Profile, including App.framework.dSYM.

If no debug-symbol paths are discovered, the plugin should ideally log that fact instead of reporting an apparently successful upload.

Root cause

The macOS search-root pattern only accepts Release and Release-* directories:

final RegExp appleReleaseDirPattern = RegExp(r'^Release(?:-.+)?$');
final RegExp iosReleaseDirPattern = RegExp(r'^Release(?:-.+)?-iphoneos$');
// macOS
yield* _enumerateReleaseDirectories(
fs: fs,
basePath: '$buildDir/macos/Build/Products',
releaseDirPattern: appleReleaseDirPattern,
);
// macOS (macOS-framework)
yield* _enumerateReleaseDirectories(
fs: fs,
basePath: '$buildDir/macos/framework',
releaseDirPattern: appleReleaseDirPattern,

final RegExp appleReleaseDirPattern = RegExp(r'^Release(?:-.+)?$');

Therefore, build/macos/Build/Products/Profile is never yielded.

The fallback symbol enumeration also uses a case-sensitive lowercase app... pattern, which does not match Flutter's uppercase App.framework.dSYM:

final symbolFileRegexp = RegExp(r'[/\\]app[^/\\]+.*\.(dSYM|symbols)$');

RegExp(r'[/\\]app[^/\\]+.*\.(dSYM|symbols)$')

Workaround

Upload the Profile product directory directly:

sentry-cli debug-files upload   --org ORG   --project PROJECT   --include-sources   --wait   build/macos/Build/Products/Profile

Suggested regression coverage

  • Discover build/macos/Build/Products/Profile for macOS builds.
  • Discover uppercase App.framework.dSYM through fallback enumeration.
  • Verify that the upload command is invoked for a Profile-only build tree.

Activity

  1. linear-code commented on Jul 14, 2026

    @linear-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions