cinnyapp / cinny

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

Error logging in: Cannot read property 'm.homeserver' of undefined #13

Closed ajayyy closed 3 years ago

ajayyy commented 3 years ago

image

When logging on to my homeserver ajay.app, it fails and returns the following error:

TypeError: Cannot read property 'm.homeserver' of undefined

image

Both the client and login requests return 200, and it does successfully determine to poll matrix.ajay.app instead of ajay.app, so I'm not exactly sure why it would fail.

The response of the client request:

{
    "m.homeserver": {
        "base_url": "https://matrix.ajay.app:443"
    }
}

The response of the login request contained correct values with user_id, access_token, home_server and device_id.

ajayyy commented 3 years ago

Looks like this may be caused by my well-known file not being served with application/json because it is served from GitHub pages.

ajbura commented 3 years ago

Does response of login request contained response.well_know['m.homeserver'].base_url. If not then how your response contain base_url?

ajbura commented 3 years ago

Should be fixed after https://github.com/ajbura/cinny/commit/8cf030585f8de9def779af47bbd127455e453799 Can you please check it out?

ajayyy commented 3 years ago

Works now, thanks!