epitron/mitm-adblock

Exception in thread ScriptThread

1989gironimo opened this issue · 2 comments

Get this error message if a browser, in my case Firefox on a Debian (testing) machine tries to communicate with mitmproxy/mitmdump

File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3/dist-packages/mitmproxy/script/concurrent.py", line 27, in run fn(*args) File "adblock.py", line 77, in request if rules.should_block(req.url, options): File "/usr/local/lib/python3.7/dist-packages/adblockparser/parser.py", line 346, in should_block if self._is_blacklisted(url, options): File "/usr/local/lib/python3.7/dist-packages/adblockparser/parser.py", line 363, in _is_blacklisted self.blacklist_with_options File "/usr/local/lib/python3.7/dist-packages/adblockparser/parser.py", line 380, in _matches if general_re and general_re.search(url): File "pattern.pxi", line 635, in re2.PythonRePattern.search OverflowError: Python int too large to convert to C ssize_t

-> Got this issue while starting mitmdump via ./go (but there's no difference with the -c parameter)
-> Every request leads to this error and the browser timeouts afterwards.
-> Running mitm-adblock on Debian Buster in a LXC on a Turris Omnia.
-> for testing purposes I'm just using the easylist from 20th of May.

EDIT: Rewording and adding info

I have the same problem with Python 3.9.7

Oof. I'm sorry it's so broken at the moment. re2 doesn't seem to be very well maintained anymore. I think it's time to replace it with Brave's adblock engine.