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

Log output for subprocess calls if it is not being printed #1918

Open
rmartin16 opened this issue Jul 15, 2024 · 1 comment
Open

Log output for subprocess calls if it is not being printed #1918

rmartin16 opened this issue Jul 15, 2024 · 1 comment
Labels
bug A crash or error in behavior.

Comments

@rmartin16
Copy link
Member

rmartin16 commented Jul 15, 2024

Describe the bug

If you consider Subprocess.check_output(), it will log both stdout and stderr in the event of an error.

However, Subprocess.run() does not attempt to log either stdout or stderr in the event of an error. The most likely reason for this is because stdout and stderr are being written to the console as the subprocess command runs. In the event that stdout and stderr are being piped, though, the content may be lost altogether.

Steps to reproduce

One example is an error during macOS code signing since stderr is being piped for inspection is certain error cases but never written for fatal errors.

Expected behavior

In the event that subprocess.run() is piping an output, ensure that output is captured in the log for an error.

Screenshots

No response

Environment

  • Operating System: n/a
  • Python version: n/a
  • Software versions:
    • Briefcase: 0.3.20.dev47+g77cb18ec

Logs

In the log, you can see stderr has content, but it is not being fully captured in the log.

https://github.com/user-attachments/files/16044976/briefcase.2024_06_30-10_13_00.package.log

Additional context

@rmartin16 rmartin16 added the bug A crash or error in behavior. label Jul 15, 2024
@mhsmith
Copy link
Member

mhsmith commented Jul 15, 2024

In the log, you can see stderr has content, but it is not being fully captured in the log.

https://github.com/user-attachments/files/16044976/briefcase.2024_06_30-10_13_00.package.log

For context, the full error is shown at #1910 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

2 participants