Troubleshooting

Installation Issues

Package Manager - Cannot perform upm operation: Unable to add package

If you encounter the following error:

Copied
[Package Manager Window] Unable to add package [https://github.com/getsentry/unity.git#0.9.1 ]:
  Error when executing git command. fatal: invalid refspec '0.9.1 '

Confirm the URL doesn't have a trailing whitespace or spaces in the URL. The Unity Package Manager will fail to find the package if whitespace is appended.

URL link with an additional space

Package Manager - 'HEAD': cannot update ref 'refs/heads/master'

Some Unity versions, such as 2019.4.24f1 and 2020.3.2f1, have a bug on UPM and fail to install with the error 'HEAD': cannot update ref 'refs/heads/master'. Unity has resolved this issue on newer releases. Learn more by checking the Unity Issue Tracker.

PrecompiledAssemblyException: Multiple precompiled assemblies with the same name

This issue was resolved in the release 0.7.0 of the Sentry SDK for Unity. If you're still encountering this issue on a version later than 0.7.0, please let us know with an issue report.

Build Issues

Failed to locate the Sentry package

This happens if you've copied some of the SDK files directly to the Assets folder. You can resolve this issue by installing the SDK with UPM.

Runtime issues

Library not loaded: @rpath/Sentry.framework/Sentry

If you encounter the following error:

Copied
2021-10-29 15:21:40.011452-0400 MyApp[2180:186329] Error loading /var/containers/Bundle/Application/88CC4619-7C5D-4BB1-9F4B-5AAD7EC4BF9C/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework:  dlopen(/var/containers/Bundle/Application/88CC4619-7C5D-4BB1-9F4B-5AAD7EC4BF9C/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework, 265): Library not loaded: @rpath/Sentry.framework/Sentry
  Referenced from: /private/var/containers/Bundle/Application/88CC4619-7C5D-4BB1-9F4B-5AAD7EC4BF9C/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework
  Reason: image not found

This can happen if you've copied some of the SDK files directly to the Assets folder and the Sentry.Unity.Editor.iOS.dll which runs when you build an iOS player wasn't able to copy the Sentry.framework to the final app. Enabling debug mode in the Sentry editor window would display more information in the Unity console.

You can resolve this issue by installing the SDK with UPM.

Events Not Sent

Universal Windows Platform

In order to send events to Sentry, you will need to activate the InternetClient Capability in your Player Settings.