Skip to content

Unable to Upload Debug Information Due to .res File Encoding Error #2124

@obrigadu

Description

@obrigadu

CLI Version

2.33.1

Operating System and Architecture

  • macOS (arm64)
  • macOS (x86_64)
  • Linux (i686)
  • Linux (x86_64)
  • Linux (armv7)
  • Linux (aarch64)
  • Windows (i686)
  • Windows (x86_64)

Operating System Version

Windows 11

Link to reproduction repository

No response

CLI Command

sentry-cli.exe --log-level=debug debug-files upload --project <project-name> --include-sources "<path/to/pdb>"

Exact Reproduction Steps

  1. Create a Console Application project using Visual Studio 2019.
  2. Add a version resource to the generated project.
  3. Build the project.
  4. Run the previously mentioned command, targeting the generated PDB file.

Expected Results

The .res file should either be ignored by the CLI, as it is not a debug information file, or handled appropriately without causing an encoding error.

Actual Results

The upload process fails with an error indicating that the .res file cannot be read as UTF-8.

Logs

INFO 2024-08-14 16:06:14.683870300 +09:00 Loaded config from path\to\.sentryclirc
DEBUG 2024-08-14 16:06:14.685208 +09:00 sentry-cli version: 2.33.1, platform: "windows", architecture: "x86_64"
INFO 2024-08-14 16:06:14.686004100 +09:00 sentry-cli was invoked with the following command line: "sentry-cli.exe" "--log-level=debug" "debug-files" "upload" "--project" "<project-name>" "--include-sources" "C:\sources\Solution1\Debug\ConsoleApplication1.pdb"

...

DEBUG 2024-08-14 16:21:16.165731200 +09:00 searching location C:\sources\Solution1\Debug\ConsoleApplication1.pdb
DEBUG 2024-08-14 16:21:16.173171300 +09:00 trying to process ConsoleApplication1.pdb
DEBUG 2024-08-14 16:21:16.173552900 +09:00 trying to parse dif ConsoleApplication1.pdb
DEBUG 2024-08-14 16:21:16.173958100 +09:00 finished location C:\sources\Solution1\Debug
> Found 1 debug information file
DEBUG 2024-08-14 16:21:16.174907200 +09:00 trying to collect sources for ConsoleApplication1.pdb
DEBUG 2024-08-14 16:21:16.176066800 +09:00 Trying to add source file: C:\sources\Solution1\ConsoleApplication1\Debug\ConsoleApplication1.res
error: file could not be read as UTF-8
caused by: stream did not contain valid UTF-8
INFO 2024-08-14 16:21:16.184029400 +09:00 Skipping update nagger update check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions