Kitware / trame-vtk

VTK/ParaView widgets for trame
BSD 3-Clause "New" or "Revised" License
17 stars 8 forks source link

Broken with aiohttp 3.9.0 #55

Closed banesullivan closed 11 months ago

banesullivan commented 11 months ago

I'm seeing the following error in the Jupyter logs when using aiohttp 3.9.0 and the trame-vtk remote view is broken/not loading any images. Downgrading to aiohttp==3.8.6 fixes the issue

[E 2023-11-24 07:02:08.454 ServerApp] Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f8af5895910>>, <Task finished name='Task-241' coro=<WebSocketProtocol13._receive_frame_loop() done, defined at /opt/conda/lib/python3.11/site-packages/tornado/websocket.py:1098> exception=error('Error -3 while decompressing data: invalid stored block lengths')>)
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.11/site-packages/tornado/ioloop.py", line 738, in _run_callback
        ret = callback()
              ^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/tornado/ioloop.py", line 762, in _discard_future_result
        future.result()
      File "/opt/conda/lib/python3.11/site-packages/tornado/websocket.py", line 1101, in _receive_frame_loop
        await self._receive_frame()
      File "/opt/conda/lib/python3.11/site-packages/tornado/websocket.py", line 1190, in _receive_frame
        handled_future = self._handle_message(opcode, data)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/tornado/websocket.py", line 1202, in _handle_message
        data = self._decompressor.decompress(data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/tornado/websocket.py", line 781, in decompress
        result = decompressor.decompress(
                 ^^^^^^^^^^^^^^^^^^^^^^^^
    zlib.error: Error -3 while decompressing data: invalid stored block lengths
banesullivan commented 11 months ago

I'm struggling to reproduce the exact error in a normal trame app, but I am seeing an issue where the client will sporadically disconnect with aiohttp~=3.9 with some JS console errors:

Screenshot 2023-11-24 at 1 15 32 PM
jourdain commented 11 months ago

aiohttp 3.9.0 seems to concatenate two text messages over the ws, which messed up wslink protocol.
Same issue as the one reported on pyvista/trame for adding actors.

bourdaisj commented 11 months ago

I'm having the same issue too. I workaround this by explicitly requesting aiohttp<3.9 in my requirements

banesullivan commented 11 months ago

3.9.1 fixed that issue. The problem is now just with 3.9.0