cinnyapp / cinny

Yet another matrix client
https://cinny.in
GNU Affero General Public License v3.0
1.87k stars 242 forks source link

[ISSUE] "Unable to connect" to a homeserver with TLS-enabled listener at port 8448 #208

Closed menturion closed 2 years ago

menturion commented 2 years ago

I just tested Cinny with a homeserver that is configured with a TLS-enabled listener (incl. a PEM-encoded X509 certificate) at port 8448: https://example.com:8448/.

Cinny doesn't seem to be able to connect prompting the error: Unable to connect. Please check your input.

ajbura commented 2 years ago

Hi @menturion , what’s the name of homeserver (if you like to share, you can dm me if it’s private hs)?

menturion commented 2 years ago

@ajbura

Thanks for your prompt reply. It is a local HS. So I cannot send you a public address.

ajbura commented 2 years ago

Ok, can you try the input with full address. eg. https://example.com:8448 ?

Also look for any errors in console, UI provide generic for all kind of error.

menturion commented 2 years ago

Yes, I used the full address in the config file.

Error thrown in the console: "Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID".

ajbura commented 2 years ago

Also have you tried it in element web? Does it connect successfully there?

ajbura commented 2 years ago

And what is response in https://example.com/.well-known/matrix/client ?

menturion commented 2 years ago

And what is response in https://example.com/.well-known/matrix/client ?

https://example.com:8448/.well-known/matrix/client prompts the Json response with the base_urls of m.homeserver and m.identity_server.

https://example.com:8448/_matrix/static/ also says that "It works! Synapse is running".

menturion commented 2 years ago

Also have you tried it in element web? Does it connect successfully there?

Just tested with latest Element Web v1.9.8. No issues in console, prompting besides others Using homeserver config:

hsName: "example.com"
hsNameIsDifferent: false
hsUrl: "https://example.com:8448"
isDefault: true
isNameResolvable: true
...
warning: null
ajbura commented 2 years ago

is there any registration flow in your homeserver and what does hs send to register endpoint?

menturion commented 2 years ago

This issue already occurs while loading Cinny.

ajbura commented 2 years ago

I meant what does https://example.com:8448/_matrix/client/r0/register return.

menturion commented 2 years ago

It responds with {"errcode":"M_UNRECOGNIZED","error":"Unrecognized request"}.

menturion commented 2 years ago

This issue is gone after I added explicitly the port '8448' to the public_baseurl param in the homeserver.yaml. Strange that Element Web didn't throw an issue.

I close this issue report due to I don't know whether something has to be fixed/changed within Cinny.