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

mitmproxy --scripts broken.py with a broken script does not properly handle the error and leaves terminal in a funny state #6707

Closed
Prinzhorn opened this issue Mar 4, 2024 · 1 comment · Fixed by #6719

Comments

@Prinzhorn
Copy link
Member

Problem Description

I've noticed that when loading a broken script (e.g. syntax error) mitmproxy won't properly exit or keep running and show the error in the event log, as it does when live reloading a script.

Steps to reproduce the behavior:

broken.py

x
  1. mitmproxy --scripts broken.py

In the screenshot you can see that it initially rendered the UI and then exited. However:

  1. There is no error message
  2. The terminal is in an inconsistent state. Whatever I type does no appear and ctrl+c does not "repair" it.

image

This happens with 10.2.2. With 10.0.0 I get a clean exit with

Error logged during startup: error in script broken.py

System Information

Mitmproxy: 10.2.2 binary
Python:    3.12.1
OpenSSL:   OpenSSL 3.1.4 24 Oct 2023
Platform:  Linux-6.5.0-21-generic-x86_64-with-glibc2.38
@Prinzhorn Prinzhorn added the kind/triage Unclassified issues label Mar 4, 2024
@Prinzhorn
Copy link
Member Author

10.1.6 is also still fine (I had this binary downloaded already), so somewhere between 10.1.6 and 10.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants