question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intercepting flows to mitm.it crashes mitmproxy

See original GitHub issue

Trying out mitmproxy. When I capture a connection and attempt to accept it mitmproxy crashes.

Steps to reproduce the problem:
  1. Install mitmproxy from homebrew, trust the CA certificate, configure Chrome proxy settings.
  2. Capture a flow/connection (in my case I navigated to mitm.it)
  3. Accept the flow, mitmproxy will now crash.
Any other comments? What have you tried so far?
Traceback (most recent call last):
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/master.py", line 281, in run
    self.loop.run()
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 278, in run
    self._run()
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 376, in _run
    self.event_loop.run()
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 682, in run
    self._loop()
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 719, in _loop
    self._watch_files[fd]()
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/raw_display.py", line 393, in <lambda>
    event_loop, callback, self.get_available_raw_input())
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/raw_display.py", line 493, in parse_input
    callback(processed, processed_codes)
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 403, in _update
    self.process_input(keys)
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 503, in process_input
    k = self._topmost_widget.keypress(self.screen_size, k)
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/window.py", line 84, in keypress
    k = super().keypress(size, k)
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/container.py", line 1128, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/flowview.py", line 513, in keypress
    self.flow.resume()
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/flow.py", line 179, in resume
    self.reply.ack()
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/controller.py", line 155, in ack
    self.send(self.obj, force)
  File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/controller.py", line 166, in send
    raise exceptions.ControlException("There is already a reply message.")
mitmproxy.exceptions.ControlException: There is already a reply message.
System information

Mitmproxy version: 2.0.2 (release version) Python version: 3.6.1 Platform: Darwin-15.6.0-x86_64-i386-64bit SSL version: OpenSSL 1.1.0f 25 May 2017 Mac version: 10.11.6 (‘’, ‘’, ‘’) x86_64

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jtl999commented, Feb 11, 2021

Am I missing something here or has this bug been resolved?

Appears to have been fixed since my last comment.

0reactions
alt-glitchcommented, Feb 11, 2021

Trying to reproduce this issue on Manjaro 20.2.1 but mimproxy seems to be intercepting mitm.it requests properly. Am I missing something here or has this bug been resolved? image System Information Mitmproxy: 6.0.2 Python: 3.9.1 OpenSSL: OpenSSL 1.1.1i 8 Dec 2020 Platform: Linux-5.10.7-3-MANJARO-x86_64-with-glibc2.32

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mitmdump crashes and freezes - help - mitmproxy
Steps to reproduce the problem: 1.run mitmdump with my python script, the script is to intercept an android app video packets
Read more >
Capture, Analyze and Debug HTTPS traffic with MITMProxy
Mitmproxy is an enormously flexible tool. Knowing exactly how the proxying process works will help you deploy it creatively, and take into ...
Read more >
mitmproxy docs
The proxy here is just a facilitator - it blindly forwards data in both directions without knowing anything about the contents. The negotiation ......
Read more >
The mitmproxy Open Source Project
Description. An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers. ... https://github.com/mitmproxy/mitmproxy.
Read more >
Mitmproxy 9: WireGuard Mode - Hacker News
1. configuring an explicit HTTP proxy in your system settings, or 2. fiddling with iptables on your router and/or your mitmproxy device. The ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found