matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.79k stars 2.13k forks source link

Cannot invite non existing external user using 3pid #4925

Closed Peter2121 closed 5 years ago

Peter2121 commented 5 years ago

Description

Following #4919 Now the invitation works correctly if the user exists. There is an exception in Synapse when the user does not exist in Matrix world. The invitation mail is sent, but the error is shown in Riot: Unknown server error.

As I understand, Synapse got a 500 status code, but there is no information in exception code about the source of the error (My ID server? Vector ID server?...) There is no exception in mxisd.

Steps to reproduce

Version information

Synapse 0.34.1.1 (last available in ports tree) Installed on FreeBSD from package (official repository).

Riot 1.0.1 Mxisd 1.3.1

Domain bimp.fr Server chat.bimp.fr

I get the following stacktrace on synapse:

  File "/usr/local/lib/python2.7/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    yield h(self, request)
  File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/local/lib/python2.7/site-packages/synapse/http/server.py", line 316, in _async_render
    callback_return = yield callback(request, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/local/lib/python2.7/site-packages/synapse/rest/client/v1/room.py", line 669, in on_POST
    txn_id
  File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/local/lib/python2.7/site-packages/synapse/handlers/room_member.py", line 643, in do_3pid_invite
    txn_id=txn_id
  File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/local/lib/python2.7/site-packages/synapse/handlers/room_member.py", line 754, in _make_and_store_3pid_invite
    inviter_avatar_url=inviter_avatar_url
  File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/local/lib/python2.7/site-packages/synapse/handlers/room_member.py", line 854, in _ask_id_server_for_third_party_invite
    invite_config
  File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
    result = g.send(result)
  File "/usr/local/lib/python2.7/site-packages/synapse/http/client.py", line 341, in post_urlencoded_get_json
    raise HttpResponseException(response.code, response.phrase, body)
synapse.api.errors.HttpResponseException: 500: Internal Server Error
Peter2121 commented 5 years ago

The problem is fixed in mxisd install (wrong permissions on sqlite database).