weechat-matrix icon indicating copy to clipboard operation
weechat-matrix copied to clipboard

SSO login problem: error in function "sso_login_cb"

Open ptman opened this issue 5 years ago • 2 comments

Traceback (most recent call last):
File ".../python/matrix/utf.py", line 89, in wrapper
return function(*args, **kwargs)
File ".../python/autoload/matrix.py", line 430, in sso_login_cb
server.login(token=token)
File ".../python/matrix/server.py", line 870, in login
_, request = self.client.login(
File "$HOME/.local/lib/python3.8/site-packages/nio/client/http_client.py", line 85, in wrapper
raise LocalProtocolError("Not connected.")
nio.exceptions.LocalProtocolError: Not connected.
error in function "sso_login_cb"

rev 71b7f79317b46e67ed0e5872cf5f60a980aed268

ptman avatar Jun 09 '20 12:06 ptman

I found a solution. The error message is accurate. The TCP connection was closed, because apache httpd (which I have as a reverse proxy) has a default keepalivetimeout of 5 seconds, which was not enough for me to complete the SSO login.

It would be nice if (NIO?) was able to try a new connection instead of failing. But I fixed this for me by increasing the apache timeout

ptman avatar Jun 09 '20 14:06 ptman

In this case nio isn't opening the connection at all, it's the long standing issue of using a single socket for all requests and using keep-alive. Weechat is opening the connection.

This will be solved in the Rust rewrite.

poljar avatar Jun 09 '20 14:06 poljar