linagora / twake-on-matrix

A multi-platform (Flutter) application for connecting to Matrix - an open network for secure, decentralized communication, with your favorite devices.
GNU Affero General Public License v3.0
63 stars 18 forks source link

[Bug] [PRODUCTION] Cannot create a chat with a user from a different server #2013

Closed tprudentova closed 23 hours ago

tprudentova commented 2 months ago

2.5.9, chat.twake.app, tested on Safari, Firefox

  1. Log in as a user of twake.app server
  2. Enter a Matrix ID of a user from a different server (staging or linagora.com)
  3. Click on the user, try sending a first message
  4. Error

https://github.com/user-attachments/assets/1665e0eb-2baa-4f05-9cf1-592695885952

nqhhdev commented 2 months ago

Hi @tprudentova, on prod env I mean not available. One more, this issue related to BE side (like error in image below) so from FE side we're handle error from BE side and display toast message. Thanks !

Screenshot 2024-09-09 at 19 00 47
tprudentova commented 2 months ago

@guimard maybe you can help us with this issue?

guimard commented 2 months ago

I think this is because https://stg.lin-saas.com/.well-known/matrix/server is missing. It should contain:

{
 "m.server": "matrix.stg.lin-saas.com:443"
}

Can someone create this content in main server ?

tprudentova commented 1 week ago

@guimard hi! Sure you can't help with fixing this bug? It happens on production and it would be good to fix it before the release of the public platform (which is menacingly close)

guimard commented 1 week ago

Yes, I'd like to test the proposed way (2 messages ago). Maybe @tk-nguyen can do it ?

tk-nguyen commented 1 week ago

I think this is because https://stg.lin-saas.com/.well-known/matrix/server is missing. It should contain:

{
 "m.server": "matrix.stg.lin-saas.com:443"
}

Can someone create this content in main server ?

This is not the issue, it tested fine on federationtester: https://federationtester.matrix.org/#stg.lin-saas.com and https://federationtester.matrix.org/#linagora.com

tk-nguyen commented 1 week ago

The issue is that on staging we don't allow federation to anywhere except linagora.com and matrix.org, and on production we forgot to configure this.

tk-nguyen commented 1 week ago

Fixed now on production: now it will federate with everything.

hoangdat commented 1 week ago

Worked for my side: prod account create chat with Linagora account.

guimard commented 1 week ago

Thanks !

hoangdat commented 1 week ago

sorry, need reopen it. When linagora account accept invitation, I got the problem @guimard @tk-nguyen

image

403 error

{"errcode":"M_FORBIDDEN","error":"Federation denied with linagora.com."}
guimard commented 1 week ago

Maybe same issue on linagora.com side ?

hoangdat commented 1 week ago

Maybe same issue on linagora.com side ?

403 error with response

{"errcode":"M_FORBIDDEN","error":"Federation denied with linagora.com."}
tk-nguyen commented 1 week ago

Requests were routed to workers, which were not restarted after configuration changes. After that, it worked properly.

tprudentova commented 1 day ago

https://github.com/user-attachments/assets/ed4736f2-03be-42ee-aea2-74d8cc3445ec

@tk-nguyen The bug appeared again, cannot create chats with external matrix users (the video is matrix.org). Also messages with people from other matrix servers aren't synchronised (see the videos below, the same chat but viewed from linagora.com account and twake.app account)

https://github.com/user-attachments/assets/76a858c1-cc7c-4c08-87c2-72c1d69d728b

https://github.com/user-attachments/assets/8e09d842-c322-4981-ab7e-ac998f5baade

tk-nguyen commented 1 day ago

No, this is because https://twake.app/.well-known/matrix/server is returning 404. Looking into this.

tk-nguyen commented 1 day ago

It should be fixed now?

tprudentova commented 23 hours ago

@tk-nguyen yes, thank you!!