Repository navigation
macOS Profile dSYMs are silently skipped #414
Description
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
-
Build a Flutter macOS application in Profile mode:
flutter build macos --profile
-
Verify that Flutter generated the Dart AOT dSYM:
build/macos/Build/Products/Profile/App.framework.dSYM -
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/AppExpected 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:
sentry-dart-plugin/lib/src/utils/flutter_debug_files.dart
Lines 41 to 55 in 42e50a4
| 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/ProfileSuggested regression coverage
- Discover
build/macos/Build/Products/Profilefor macOS builds. - Discover uppercase
App.framework.dSYMthrough fallback enumeration. - Verify that the upload command is invoked for a Profile-only build tree.
Activity
linear-code commentedon Jul 14, 2026
DARTPL-52