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

multiple sentryUploadSymbols added to build.gradle file

Open dcohenb opened this issue 8 months ago • 3 comments

I have a recurring issue where the sentryUploadSymbols is being added to the build.gradle file more then once resulting in failed builds. it seems there is a missing check in the DebugSymbolUpload.cs to see if the task has already been added. unfortunately I cannot patch it as it's part of the dll

origin: https://github.com/getsentry/sentry-unity/blob/cc4a46795ad34621bbf870ef3d722cebe62c4dcd/src/Sentry.Unity.Editor/Android/DebugSymbolUpload.cs#L165

Environment

Sentry SaaS with Unity SDK

Which version of the SDK? v3.2.2

How did you install the package? (Git-URL, Assetstore) Installed via package manager with Git-URL

Which version of Unity? 6000.0.41f

Is this happening in Unity (editor) or on a player like Android, iOS, Windows? Editor - Causing builds to fail

Steps to Reproduce

  1. Run a build more then once

Expected Result

successful build

Actual Result

Build failing due to duplicate sentryUploadSymbols task in the build.gradle file

Any logs or screenshots

stderr[

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/...ProjectPath.../Library/Bee/Android/Prj/IL2CPP/Gradle/launcher/build.gradle' line: 137

* What went wrong:
A problem occurred configuring project ':launcher'.
> Cannot add task 'sentryUploadSymbols' as a task with that name already exists.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 5s
]
stdout[

> Configure project :unityLibrary
Variant 'debug', will keep symbols in binaries for:
  'libunity.so'
  'libil2cpp.so'
  'libmain.so'
Variant 'release', symbols will be stripped from binaries.

> Configure project :launcher
Variant 'debug', will keep symbols in binaries for:
  'libunity.so'
  'libil2cpp.so'
  'libmain.so'
Variant 'release', symbols will be stripped from binaries.
]
exit code: 1

dcohenb avatar May 22 '25 20:05 dcohenb

thanks for raising this. Would be up to making a PR? If not, that's OK we'll get to it eventually but might take a few days before we get to it

bruno-garcia avatar May 26 '25 15:05 bruno-garcia

I have the same issue but futhermore the first build i did crashes the app. Has someone experienced something similar?

carlossalasamper avatar Jun 08 '25 05:06 carlossalasamper

This issue reports a broken build. If the app crashes it means it built successfully.

Could you create a separate build?

bruno-garcia avatar Jun 11 '25 14:06 bruno-garcia

Addressed in #2300

bitsandfoxes avatar Sep 10 '25 15:09 bitsandfoxes