ma1uta / matrix-synapse-rest-password-provider

Password Provider for Synapse fetching data from a REST endpoint
GNU Affero General Public License v3.0
27 stars 17 forks source link

TypeError: object DataStore can't be used in 'await' expression #4

Closed srt closed 4 years ago

srt commented 4 years ago

I get the following error with Synapse 1.18.0:

2020-07-31 21:42:46,920 - synapse.http.server - 83 - ERROR - POST-825- Failed handle request via 'LoginRestServlet': <XForwardedForRequest at 0x7f51bedf96d0 method='POST' uri='/_matrix/client/r0/login' clientproto='HTTP/1.1' site=8008>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: {}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: {}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: @test:reucon.com

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/synapse/http/server.py", line 228, in _async_render_wrapper
    callback_return = await self._async_render(request)
  File "/usr/local/lib/python3.7/site-packages/synapse/http/server.py", line 399, in _async_render
    callback_return = await raw_callback_return
  File "/usr/local/lib/python3.7/site-packages/synapse/rest/client/v1/login.py", line 169, in on_POST
    result = await self._do_other_login(login_submission)
  File "/usr/local/lib/python3.7/site-packages/synapse/rest/client/v1/login.py", line 287, in _do_other_login
    identifier["user"], login_submission
  File "/usr/local/lib/python3.7/site-packages/synapse/handlers/auth.py", line 723, in validate_login
    is_valid = await provider.check_password(qualified_user_id, password)
  File "/usr/local/lib/python3.7/site-packages/rest_auth_provider.py", line 85, in check_password
    store = await self.account_handler._hs.get_profile_handler().store  # for synapse >= 1.9.0
TypeError: object DataStore can't be used in 'await' expression
davidmehren commented 4 years ago

It seems that this error was not caused by Synapse 1.18, but by #3, as reverting rest_auth_provider.py to the state before that PR fixes the problem for me.

srt commented 4 years ago

Yes, reverting to 5d66d6972b35e183c4fb6538c3838e543d781575 fixes the issue

Philantrop commented 4 years ago

Yes, same here. Please revert that commit upstream. It cost me half my weekend.

ma1uta commented 4 years ago

I have reverted this commit in the https://github.com/ma1uta/matrix-synapse-rest-password-provider/commit/c782c84aeab1872e73b6c29aadb99d3852e26bbd