aioimaplib icon indicating copy to clipboard operation
aioimaplib copied to clipboard

Failure parsing valid response when working with multiple clients

Open kosty opened this issue 8 months ago • 0 comments

My setup is somewhat strange, I have two different clients periodically polling same folder for messages from two different senders. Both clients are instantiated inside the same process. When email arrives from either of the senders this shows up in logs. Removing either of clients makes the error go away

2024-06-28 12:18:16,546 [ERROR] [/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py:1821] [default_exception_handler] Fatal error on SSL protocol
protocol: <asyncio.sslproto.SSLProtocol object at 0x105f19fa0>
transport: <_SelectorSocketTransport closing fd=11 read=idle write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/sslproto.py", line 737, in _do_read
    self._do_read__copied()
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/sslproto.py", line 797, in _do_read__copied
    self._app_protocol.data_received(first)
  File "/path/to/venv/lib/python3.12/site-packages/aioimaplib/aioimaplib.py", line 346, in data_received
    self._handle_responses(self.incomplete_line + d, self._handle_line, self.current_command)
  File "/path/to/venv/lib/python3.12/site-packages/aioimaplib/aioimaplib.py", line 387, in _handle_responses
    self._handle_responses(tail, line_handler)
  File "/path/to/venv/lib/python3.12/site-packages/aioimaplib/aioimaplib.py", line 375, in _handle_responses
    cmd = line_handler(line, current_cmd)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/venv/lib/python3.12/site-packages/aioimaplib/aioimaplib.py", line 398, in _handle_line
    self._response_done(line)
  File "/path/to/venv/lib/python3.12/site-packages/aioimaplib/aioimaplib.py", line 667, in _response_done
    raise Abort('unexpected tagged (%s) response: %s' % (tag, response))
aioimaplib.aioimaplib.Abort: unexpected tagged (b'CJBF4') response: b'OK SEARCH completed (Success)'

kosty avatar Jun 28 '24 19:06 kosty