cinnyapp/cinny

Cinny doesn't recognize my homeserver (failed to connect)

Closed this issue · 10 comments

Describe the bug

Cinny is the only client i've tried that can't seem to connect to my homeserver, at first I saw it was complaining about the lack of a versions file, I've added that and still can't get it to recognize it

Reproduction

  1. open cinny (app.cinny.in)
  2. try and log in with my matrix instance (matrix.repomansez.xyz)
  3. fail

Expected behavior

being able to connect

Platform and versions

Homeserver runs on Gentoo, so does the client

Additional context

No response

That is because your server is hosted at https://matrix.repomansez.xyz/ but it's /.well-known return the homeserver base url to https://repomansez.xyz which should be https://matrix.repomansez.xyz

entire well-known response

{
    "m.homeserver": {
        "base_url": "https://repomansez.xyz"
    }
}

spec: https://spec.matrix.org/v1.11/client-server-api/#well-known-uri

@ajbura I did it like that to be able to host it on matrix.repomansez.xyz but have :repomansez.xyz on my username, Element and Schildichat for example work perfectly like that, can I bother you to give me some insight in how I should set this up instead?

I don't know how to setup it like that so you have server name after mxid but setting it here isn't the way. For eg https://matrix.envs.net/.well-known/matrix/client envs return the matrix.envs.net url in well known response but they still have envs.net in their username. So you probably doing it at wrong place, maybe ask in synapse room?

I don't know how to setup it like that so you have server name after mxid but setting it here isn't the way. For eg https://matrix.envs.net/.well-known/matrix/client envs return the matrix.envs.net url in well known response but they still have envs.net in their username. So you probably doing it at wrong place, maybe ask in synapse room?

Yeah I did ask in the synapse room, they said and I quote "that's what the .well-known is for"

both of your well-known endpoint i.e:
https://repomansez.xyz/.well-known/matrix/client
https://matrix.repomansez.xyz/.well-known/matrix/client

should return:

{
    "m.homeserver": {
        "base_url": "https://matrix.repomansez.xyz"
    }
}

as per my understanding repomansez.xyz is the alias for your homeserver hosted at matrix.repomansez.xyz. so, well-known should return the base url of the homeserver matrix.repomansez.xyz so client can use the real location for further api calls.

as per my understanding repomansez.xyz is the alias for your homeserver hosted at matrix.repomansez.xyz. so, well-known should return the base url of the homeserver matrix.repomansez.xyz so client can use the real location for further api calls.

Don't quote me on that but I've been working under the assumption that what had to point to matrix.repomansez.xyz is https://repomansez.xyz/.well-known/matrix/server, and then the client points to the alias

you can read the synapse docs on this https://element-hq.github.io/synapse/latest/setup/installation.html#client-well-known-uri which says: client use homeserver from your userid (repomansez.xyz) to query /.well-known which return homeserver url so you don't have to remember your server url (https://matrix.repomansez.xyz)

Turns out it was related to a cors error in my nginx config. And you were right about the well known config, server_name in synapse is set to repomansez.xyz, while https://repomansez.xyz/.well-known/matrix/{client,server} point to matrix.repomansez.xyz

Sorry for wasting your time :(

looks like you still have setup the base_url wrong in .well-known/matrix/client. You should remove the port there.