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 fails to start due to ZSTD error #49743

Open
HiPhish opened this issue Apr 7, 2024 · 2 comments
Open

mitmproxy fails to start due to ZSTD error #49743

HiPhish opened this issue Apr 7, 2024 · 2 comments
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed

Comments

@HiPhish
Copy link
Contributor

HiPhish commented Apr 7, 2024

Is this a new report?

Yes

System Info

Void 6.6.25_1 x86_64 AuthenticAMD uptodate rrmFFFF

Package(s) Affected

mitmproxy-9.0.1_2

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

Program starts

Actual behaviour

Program crashes

$ mitmproxy -p 8080 -M '/^http:/https:'
Traceback (most recent call last):
  File "/usr/bin/mitmproxy", line 33, in <module>
    sys.exit(load_entry_point('mitmproxy==9.0.1', 'console_scripts', 'mitmproxy')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/mitmproxy", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/lib/python3.12/site-packages/mitmproxy/tools/main.py", line 10, in <module>
    from mitmproxy import exceptions, master
  File "/usr/lib/python3.12/site-packages/mitmproxy/master.py", line 8, in <module>
    from mitmproxy import eventsequence
  File "/usr/lib/python3.12/site-packages/mitmproxy/eventsequence.py", line 6, in <module>
    from mitmproxy import http
  File "/usr/lib/python3.12/site-packages/mitmproxy/http.py", line 26, in <module>
    from mitmproxy.net import encoding
  File "/usr/lib/python3.12/site-packages/mitmproxy/net/encoding.py", line 13, in <module>
    import zstandard as zstd
  File "/usr/lib/python3.12/site-packages/zstandard/__init__.py", line 39, in <module>
    from .backend_c import *  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10506 returned by the lib, 10506 hardcoded in zstd headers, 10505 hardcoded in the cext)

Steps to reproduce

  1. Install mitmproxy
  2. Run it

This might be a repeat of #44257.

@HiPhish HiPhish added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Apr 7, 2024
@classabbyamp
Copy link
Member

classabbyamp commented Apr 7, 2024

would be fixed by updating python3-zstandard: #49606

@tornaria
Copy link
Contributor

tornaria commented Apr 7, 2024

Note that #49606 is nacked because it fixes the issue by using a vendored zstd. I suggested a patch to keep using the system zstd but the PR hasn't been updated. There's also #49348 which includes the update to python3-zstandard using system zstd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed
Projects
None yet
Development

No branches or pull requests

3 participants