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

Exception when handling HandshakeException _stream_ws_thread #27785

Closed
arenevier opened this issue Feb 25, 2021 · 0 comments · Fixed by #27791
Closed

Exception when handling HandshakeException _stream_ws_thread #27785

arenevier opened this issue Feb 25, 2021 · 0 comments · Fixed by #27791

Comments

@arenevier
Copy link
Contributor

when running
./wpt run chrome 'websockets/constructor/010.html?wpt_flags=h2'
the following error happens

  [0/1] /websockets/constructor/010.html?wpt_flags=h2
Exception in thread Thread-23:
Traceback (most recent call last):
  File "/home/arenevier/src/wpt/tools/wptserve/wptserve/server.py", line 479, in _stream_ws_thread
    handshaker.do_handshake()
  File "/home/arenevier/src/wpt/tools/wptserve/wptserve/ws_h2_handshake.py", line 170, in do_handshake
    raise e
  File "/home/arenevier/src/wpt/tools/wptserve/wptserve/ws_h2_handshake.py", line 161, in do_handshake
    raise HandshakeException(
mod_pywebsocket.handshake._base.HandshakeException: ws_protocol must be None when the client didn't request any subprotocol

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/arenevier/src/wpt/tools/wptserve/wptserve/server.py", line 481, in _stream_ws_thread
    self.logger.info('Handshake failed for error: %s', e)
  ▶ TIMEOUT [expected OK] /websockets/constructor/010.html?wpt_flags=h2

  ▶ Unexpected subtest result in /websockets/constructor/010.html?wpt_flags=h2:
  │ TIMEOUT [expected PASS] WebSockets: protocol in response but no requested protocol
  └   → Test timed out

This happens because the logger is an instance of NoOpLogger and its methods only accepts one argument.

This does not happen with ./wpt serve because in that case, the logger is an instance of logging.Logger whose methods accept multiple arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants