Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentry_cli (Unity native windows64) - generated command line too long during debug-symbols upload #1602

Open
altereyes opened this issue Mar 30, 2024 · 1 comment
Labels
Bug Something isn't working Editor

Comments

@altereyes
Copy link

Causing/replicating the error: a Unity project with over 260 .pdb files.

Results in:

  1. Sentry: (Error) Failed to add the Sentry native integration to the built application System.ComponentModel.Win32Exception (0x80004005): ApplicationName='C:\Users\xxx\Library\PackageCache\io.sentry.unity@cfd1f01ace\Editor\sentry-cli\sentry-cli-Windows-x86_64.exe' [...many many pdb files....], Native error= The filename or extension is too long.

  2. BuildFailedException: Sentry Native BuildPostProcess failed
    Sentry.Unity.Editor.Native.BuildPostProcess.OnPostProcessBuild (UnityEditor.BuildTarget target, System.String executablePath) (at /sentry-unity/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs:61)

Reason: generating a sentry_cli command line that exceeds the windows native command line size limit (which I belief is 8191 characters).

Solution (my initial thoughts, but you probably know better):

  1. (my pref) generate a txt file with the pdb files listed in it and use this txt file in the sentry_cli command line
  2. or, chunk the list of pdb files and launch sentry_cli multiple times (each time making sure not to exceed the command line size limit)
  3. or, I have to deal with it myself and try to reduce path lengths, thus reducing the overall command line size
  4. or, disable debug symbol upload all together

Version: https://github.com/getsentry/unity.git#1.8.0

Thanks for looking into this,
Pieter (paying Sentry customer :-)

@bitsandfoxes
Copy link
Contributor

Hey, sorry to see you run into issues here.
The command does not contain all 260 individual .pdb files but a few individual ones we know of (i.e. UnityPlayer.dll) and directories to navigate recursively.
One thing that comes to mind to unblock you is to embed the package into your project. That means moving it from Unity's global package cache into your project's local /Packages directory.

@bitsandfoxes bitsandfoxes added Bug Something isn't working Editor labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Editor
Projects
Status: No status
Status: No status
Development

No branches or pull requests

2 participants