getsentry / sentry-cli

A command line utility to work with Sentry.
https://docs.sentry.io/cli/
BSD 3-Clause "New" or "Revised" License
900 stars 221 forks source link

Uploading source files fails in 2.35.0 #2147

Closed moritzsur closed 1 month ago

moritzsur commented 1 month ago

CLI Version

2.35.0

Operating System and Architecture

Operating System Version

macOS 14.6.1

Link to reproduction repository

No response

CLI Command

sentry-cli debug-files upload -o <...> -p <...> cmake-build-debug/dsymutil_out --wait --log-level=trace --include-sources

Exact Reproduction Steps

  1. build a project with cmake and ninja on macOS
  2. manually create dSYM
    
    # go to build folder
    cd cmake-build-debug

generate the required debug files post build (dSYM files on macos)

dsymutil GainAimPro_artefacts/Debug/VST3/GainAimPro.vst3/Contents/MacOS/GainAimPro --out dsymutil_out

verify

sentry-cli debug-files check ./dsymutil_out/Contents/Resources/DWARF/GainAimPro


3. uploading it

sentry-cli debug-files upload -o <...> -p gainaimpro cmake-build-debug/dsymutil_out --wait --include-sources



### Expected Results

Uploading all sources files and the manually generated debug file.

### Actual Results

No source file/debug file is being uploaded.

### Logs

<...>
  DEBUG   2024-09-06 16:41:28.990919 +02:00 Trying to add source file: /Users/moritzsurwehme/repos/nw_plugins/JUCE/modules/juce_core/zip/zlib/inflate.h
  DEBUG   2024-09-06 16:41:28.991263 +02:00 Trying to add source file: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWorkspace.h
  DEBUG   2024-09-06 16:41:28.992113 +02:00 Trying to add source file: /Users/moritzsurwehme/repos/nw_plugins/JUCE/modules/juce_core/network/juce_MACAddress.h
  DEBUG   2024-09-06 16:41:28.992484 +02:00 Trying to add source file: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/TextCommon.h
  DEBUG   2024-09-06 16:41:28.993604 +02:00 Trying to add source file: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/UnicodeConverter.h
error: file could not be read as UTF-8
  caused by: stream did not contain valid UTF-8
  INFO    2024-09-06 16:41:28.999108 +02:00 Skipping update nagger update check
szokeasaurusrex commented 1 month ago

Hey @moritzsur, I believe I have already fixed the bug you are experiencing upstream in symbolic, but the version we are currently using in Sentry CLI does not contain this fix yet. I will bump symbolic and release a new Sentry CLI version with the updated dependency; please let me know whether it fixes the problem.

szokeasaurusrex commented 1 month ago

@moritzsur, the fix has been released in 2.36.0. If you continue experiencing this error, please re-open the issue, and I'll be happy to investigate further.

moritzsur commented 1 month ago

Works now, thank you!