Replies: 1 comment 2 replies
-
Please share your script and steps to reproduce the problem. Regardless of where the bug is (mitmproxy or your script) it would be helpful if you open an issue and follow the template for bug reports https://github.com/mitmproxy/mitmproxy/issues/new?assignees=&labels=kind%2Ftriage&template=bug_report.md&title= |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an application running with mitmproxy 5.1.1 with some addons, and I'm trying to upgrade to the latest stable version 7.0.4. I've modified the code when required but mitmproxy crashes when try to execute the script intercepting the request.
I'm not able to identify if it is an application problem or if it is a mitmproxy one. The stack trace is as follows:
192.168.0.148:59625: mitmproxy has crashed!
Traceback (most recent call last):
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/server.py", line 279, in server_event
for command in layer_commands:
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layer.py", line 144, in handle_event
command = command_generator.send(send)
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layer.py", line 255, in handle_event
yield from self._handle(event)
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layer.py", line 144, in handle_event
command = command_generator.send(send)
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layers/http/init.py", line 699, in _handle_event
yield from self.event_to_child(stream, event)
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layers/http/init.py", line 749, in event_to_child
for command in child.handle_event(event):
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layer.py", line 129, in handle_event
yield from self.__continue(event)
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layer.py", line 220, in __continue
yield from self.__process(command_generator, event.reply)
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layer.py", line 183, in __process
command = command_generator.send(send)
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layers/http/init.py", line 136, in _handle_event
yield from self.client_state(event)
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layers/http/init.py", line 158, in state_wait_for_request_headers
return (yield from self.handle_connect())
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layers/http/init.py", line 561, in handle_connect
yield from self.handle_connect_regular()
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layers/http/init.py", line 573, in handle_connect_regular
yield from self.handle_connect_finish()
File "/root/.pyenv/versions/3.10.1/lib/python3.10/site-packages/mitmproxy/proxy/layers/http/init.py", line 594, in handle_connect_finish
if 200 <= self.flow.response.status_code < 300:
AttributeError: 'bytes' object has no attribute 'status_code'
Mitmproxy version:
Mitmproxy: 7.0.4
Python: 3.10.1
OpenSSL: OpenSSL 1.1.1l 24 Aug 2021
Platform: Linux-4.19.0-6-amd64-x86_64-with-glibc2.28
Python dependencies:
APScheduler==3.8.1
asgiref==3.4.1
bcrypt==3.2.0
blinker==1.4
Brotli==1.0.9
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.9
click==8.0.3
crypto==1.4.1
cryptography==3.4.8
Flask==2.0.2
h11==0.12.0
h2==4.1.0
hpack==4.0.0
hyperframe==6.0.1
idna==3.3
itsdangerous==2.0.1
Jinja2==3.0.3
kaitaistruct==0.9
ldap3==2.9.1
MarkupSafe==2.0.1
mitmproxy==7.0.4
msgpack==1.0.3
Naked==0.1.31
ntlm-auth==1.5.0
paramiko==2.8.1
passlib==1.7.4
protobuf==3.18.1
publicsuffix2==2.20191221
pyasn1==0.4.8
pycparser==2.21
pycryptodome==3.12.0
pymongo==4.0.1
PyNaCl==1.4.0
pyOpenSSL==20.0.1
pyparsing==2.4.7
pyperclip==1.8.2
pytz==2021.3
pytz-deprecation-shim==0.1.0.post0
PyYAML==6.0
requests==2.26.0
requests-ntlm==1.1.0
ruamel.yaml==0.17.16
shellescape==3.8.1
six==1.16.0
sortedcontainers==2.4.0
tornado==6.1
tzdata==2021.5
tzlocal==4.1
urllib3==1.26.7
urwid==2.1.2
Werkzeug==2.0.2
wsproto==1.0.0
zstandard==0.15.2
Beta Was this translation helpful? Give feedback.
All reactions