sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Stack trace from errors in Windows does not link to the source code

Open homuler opened this issue 5 months ago • 2 comments

Environment

How do you use Sentry? Sentry SaaS (sentry.io)

Which version of the SDK? 2.1.0

How did you install the package? (Git-URL, Assetstore) Git-URL

Which version of Unity? 2021.3.2f1

Is this happening in Unity (editor) or on a player like Android, iOS, Windows? This is occurring on the player, but it's an issue related to how the errors sent to Sentry are displayed (in the Web UI).

Steps to Reproduce

  1. Install and Configure the Sentry SDK

    • Here is the Debug Symbols settings Image
  2. Build the app (Windows Standalone, IL2CPP)

    • We're using a script that calls BuildPipeline.BuildPlayer
  3. Distribute the app to the users.

  4. Some kind of error occurs while the user is using the app.

Expected Result

I expect each line of the stack trace to be linked to the source code. In fact, we are also building the app for macOS, and when an error occurs there, we can view the source code.

To avoid exposing our app's code, I will attach a screenshot of an error occurring purely in Unity's code. As shown below, the source code is available.

Image

Actual Result

Unlike when built for macOS, we cannot view the source code in the Stack Trace for errors that occur in the Windows app. The following screenshot shows the Stack Trace of the same error that occurred on macOS, but this time on Windows.

Image

Any logs or screenshots

It appears that the following command was executed when uploading debug files.

"sentry-cli-Windows-x86_64.exe" "debug-files" "upload" "--il2cpp-mapping" "--include-sources" "ourapp.exe" "UnityPlayer.dll" "ourapp_Data/Plugins/x86_64/sentry.dll" "C:\Path\To\Library\PackageCache\io.sentry.unity@912a177efe\Plugins\Windows\Sentry\sentry.pdb" "ourapp_BackUpThisFolder_ButDontShipItWithYourGame" "GameAssembly.dll"

Additionally, based on the 'Images Loaded' section, it seems at first glance that the corresponding source code was successfully uploaded. Image

homuler avatar Sep 12 '24 09:09 homuler