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

Trying http://localhost:3050/r/matrix:matrix.org gives 500 error: 400 Bad Request: … M_UNRECOGNIZED … Unrecognized request #142

Closed
sideshowbarker opened this issue Nov 18, 2022 · 5 comments
Labels
T-Other Questions, user support, anything else.

Comments

@sideshowbarker
Copy link
Contributor

Opening http://localhost:3050/r/matrix:matrix.org in my browser, I get a 500 response with this message:

Error: HTTP Error Response: 400 Bad Request: {"errcode":"M_UNRECOGNIZED","error":"Unrecognized request"}
    URL=https://matrix.org/_matrix/client/unstable/org.matrix.msc3030/rooms/!AEQOsKuwoGVVoVwfDj%3Amatrix.org/timestamp_to_event?ts=1668740893675&dir=b
    at checkResponseStatus (/Users/mike/workspace/matrix-public-archive/server/lib/fetch-endpoint.js:21:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async fetchEndpoint (/Users/mike/workspace/matrix-public-archive/server/lib/fetch-endpoint.js:38:3)
    at async fetchEndpointAsJson (/Users/mike/workspace/matrix-public-archive/server/lib/fetch-endpoint.js:63:15)
    at async timestampToEvent (/Users/mike/workspace/matrix-public-archive/server/lib/matrix-utils/timestamp-to-event.js:25:45)
    at async /Users/mike/workspace/matrix-public-archive/server/tracing/trace-utilities.js:31:24
    at async /Users/mike/workspace/matrix-public-archive/server/routes/room-routes.js:123:32

My config/config.user-overrides.json looks like this:

{
  "basePort": "3050",
  "basePath": "http://localhost:3050",
  "matrixServerUrl": "https://matrix.org/",
  "matrixServerName": "matrix.org",
  "archiveMessageLimit": 100,
  "requestTimeoutMs": 25000,
  "logOutputFromChildProcesses": false,
  "testMatrixServerUrl1": "http://localhost:11008/",
  "testMatrixServerUrl2": "http://localhost:12008/",
  "matrixAccessToken": "[redacted]"
}
@MadLittleMods
Copy link
Contributor

MadLittleMods commented Nov 18, 2022

@sideshowbarker It looks like your homeserver doesn't have MSC3030 /timestamp_to_event enabled.

If you're using Synapse, add this to your config:

homeserver.yaml

experimental_features:
  msc3030_enabled: true

@MadLittleMods MadLittleMods added the T-Other Questions, user support, anything else. label Nov 18, 2022
@MadLittleMods MadLittleMods changed the title Trying http://localhost:3050/r/matrix:matrix.org gives 500 error: “400 Bad Request: … M_UNRECOGNIZED … Unrecognized request” Trying http://localhost:3050/r/matrix:matrix.org gives 500 error: 400 Bad Request: … M_UNRECOGNIZED … Unrecognized request Nov 18, 2022
@sideshowbarker
Copy link
Contributor Author

sideshowbarker commented Nov 18, 2022

I — we (W3C) — don’t actually have our own homeserver, so I instead literally set:

matrixServerUrl": "https://matrix.org/"

…in my config/config.user-overrides.json.

Is there maybe an msc3030_enabled test server that I could have access to test against?

Or do we instead really need to run our own homeserver so that we can configure it with msc3030_enabled?

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Nov 18, 2022

@sideshowbarker Ahh, of course, I should have recognized that from your config!

You're slightly early to all of this. MSC3030 was just merged into the spec and is being stablized now. This means moving the endpoint from an unstable location to a stable location in Synapse. You can track progress on that via matrix-org/synapse#14390. The PR to make this happen is already in review so it will probably be a matter of a few weeks.

After it is stabilized in Synapse, matrix.org will get the necessary /timestamp_to_event endpoint shortly after.

But there is no need for you to have your own Matrix Public Archive instance either. We plan to have a canonical instance of Matrix Public Archive available for everyone to use at archive.matrix.org. This doesn't exist yet but we're tracking the deployment internally.

And we're buttoning up the final pieces to cut the first release of Matrix Public Archive. You can track the pieces with this milestone: https://github.com/matrix-org/matrix-public-archive/milestone/1


If you want to try it out today, you will need to have your own homeserver with MSC3030 enabled as described above.

@sideshowbarker
Copy link
Contributor Author

But there is no need for you to have your own Matrix Public Archive instance either. We plan to have a canonical instance of Matrix Public Archive available for everyone to use at archive.matrix.org.

OK, yeah, I had gleaned from elsewhere that that might be the plan. Will be great when that happens

But in the meantime my main reason for wanting to have a Matrix Public Archive instance was just to have something to test with while trying out the code locally — and submitting patches if/when I come across anything patch-worthy

After it is stabilized in Synapse, matrix.org will get the necessary /timestamp_to_event endpoint shortly after.

If you want to try it out today, you will need to have your own homeserver with MSC3030 enabled as described above.

OK — I have some colleagues involved at the W3C who are running homeservers, so I may be able to get one of them to flip on msc3030_enabled so that I can test with it prior to when matrix.org gets it.

MSC3030 was just merged into the spec and is being stablized now. This means moving the endpoint from an unstable location to a stable location in Synapse. You can track progress on that via matrix-org/synapse#14390. The PR to make this happen is already in review so it will probably be a matter of a few weeks.

Super, thanks — looking forward to that

And we're buttoning up the final pieces to cut the first release of Matrix Public Archive. You can track the pieces with this milestone: matrix-org/matrix-public-archive/milestone/1

Thanks for that too — I’m watching the whole https://github.com/matrix-org/matrix-public-archive/ repo now, so I reckon I’ll get notifications as things move further along

And I’ll go ahead and close this issue now

@MadLittleMods
Copy link
Contributor

I've also clarified the point that you need a MSC3030 enabled homeserver in the readme so hopefully this is more clear to the next person, #144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Other Questions, user support, anything else.
Projects
None yet
Development

No branches or pull requests

2 participants