Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No support for .well-known/matrix/server #165

Open
jackrosenthal opened this issue Jan 21, 2024 · 2 comments
Open

No support for .well-known/matrix/server #165

jackrosenthal opened this issue Jan 21, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jackrosenthal
Copy link

The matrix spec permits hosting a file .well-known/matrix/server on the server's web root, delegating the server tasks to another hostname: https://spec.matrix.org/v1.9/server-server-api/#resolving-server-names

It appears that matrix-commander does not check this file:

% matrix-commander --login PASSWORD
Enter URL of your homeserver: [https://matrix.example.org] ohea.xyz
Enter your user ID:  [@john:example.org]  or  [john] for @john:ohea.xyz : jrosenth
...
Correct? (Yes or Ctrl-C to abort) Yes
2024-01-20 17:14:53,701:    ERROR: matrix-commander: E248: The program matrix-commander.py failed. Sorry.
2024-01-20 17:14:53,701:    ERROR: matrix-commander: 404, message='Not Found', url=URL('https://ohea.xyz/_matrix/client/r0/login')
2024-01-20 17:14:53,701:     INFO: matrix-commander: 2 errors and 0 warnings occurred.

(The file at https://ohea.xyz/.well-known/matrix/server should've been used here to determine the server's hostname is matrix.ohea.xyz:443).

@8go
Copy link
Owner

8go commented May 2, 2024

Correct, that is not implemented.

Anyone wants to add that feature through a PR?

@8go 8go added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels May 2, 2024
@phptek
Copy link

phptek commented Aug 22, 2024

In my case the hostname of the chat server available via a browser differs from the domain available on the .well-known path (not sure if this is normal). So when inputting the room identifier, there's either going to be a hostname mismatch on the user and/or room, or the issue described above occurs.

Additionally:

  • I'm using the docker container ala docker run -it matrixcommander/matrix-commander --login password
  • The on-boarding process asks for a hostname with an https scheme prefix, but accepts one with and without
  • The on-boarding process doesn't specify if a :443 port suffix is required, but will accept one if passed (as per OP's issue)
  • I've also seen a different error "Error validating response: 'user_id' is a required property" which may be pertinent?

FYI, I'm definetely using the correct username/password pair, as I have successfully logged-in via a browser several times using the same creds.

The provided login data is: homeserver='https://matrix.my-domain.co:443'
                            user id='@mytestbot:matrix.my-domain.co'
                            password='***'
                            device name='test'
                            room id='!BZRGpTcfepwOPpYPRs:matrix.my-domain.co'
Correct? (Yes or Ctrl-C to abort) Yes
2024-08-22 03:22:57,629:     INFO: matrix-commander: The persistent storage directory /data/store was created for you.
2024-08-22 03:22:57,759:  WARNING:    nio.responses: Error validating response: 'user_id' is a required property
2024-08-22 03:22:57,760:     INFO: matrix-commander: The persistent storage directory /data/store was deleted for you.
2024-08-22 03:22:57,762:    ERROR: matrix-commander: E234: Log in failed. Most likely wrong credentials were entered. homeserver='https://matrix.my-domain.co:443'; device name='rm'; user='mytestbot:matrix.my-domain.co'; room_id='!BZRGpTcfepwOPpYPRs:matrix.my-domain.co'. Failed to log in: Invalid username or password, M_FORBIDDEN
2024-08-22 03:22:57,762:     INFO: matrix-commander: 2 errors and 0 warnings occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants