Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixes

- When exporting a NSP ROM File for Switch the SKD now correctly uploads the debug symbols ([#2580](https://github.com/getsentry/sentry-unity/pull/2580))
- The SDK now also uses `.sentry-native` as a subdirectory for native support on desktop platforms. It now also falls back to `Application.persistentDataPath` instead of the current working directory. Note: `crashedLastRun` may report `false` for the first time after upgrading. ([#2547](https://github.com/getsentry/sentry-unity/pull/2547))
- The currently experimental Metrics are now opt-in by default ([#2546](https://github.com/getsentry/sentry-unity/pull/2546))
- When targeting Android, the SDK now syncs `AppStartTime` and `AppBuildType` to the native layer ([#2557](https://github.com/getsentry/sentry-unity/pull/2557))
Expand Down
4 changes: 4 additions & 0 deletions src/Sentry.Unity.Editor/Native/BuildPostProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ private static void UploadDebugSymbols(IDiagnosticLogger logger, BuildTarget tar
AddPath(paths, dir, logger);
}

// When exporting as an NSP the assemblies are bundled inside the package. So we're also checking the build cache.
var beePath = Path.Combine(buildOutputDir, "Library", "Bee", "artifacts", "SwitchPlayerBuildProgram");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bee cache path uses wrong base directory

High Severity

The Bee build cache path is constructed relative to buildOutputDir (e.g., ./builds/switch/), but Library/Bee/artifacts/SwitchPlayerBuildProgram lives under the Unity project root. The base directory here likely needs to be projectDir (defined at line 168 from Application.dataPath) instead of buildOutputDir, otherwise the path will point to a non-existent location.

Fix in Cursor Fix in Web

AddPath(beePath);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddPath call missing required arguments

High Severity

AddPath(beePath) is called with a single string argument, but the only AddPath overload in this class requires (List<string> paths, string path, IDiagnosticLogger logger, bool required = false). Every other call site uses AddPath(paths, somePath, logger). The paths list and logger arguments are missing, so the Bee cache path won't be added for symbol upload — which is the entire purpose of this PR.

Fix in Cursor Fix in Web


// User-provided Sentry plugin
AddPath(paths, Path.GetFullPath("Assets/Plugins/Sentry/"), logger);
break;
Expand Down
Loading