mautrix / signal

A Matrix-Signal puppeting bridge
GNU Affero General Public License v3.0
499 stars 75 forks source link

failed to GET /_matrix/client/versions: M_UNKNOWN_TOKEN (HTTP 401): Invalid access token passed. #554

Closed ronilaukkarinen closed 2 weeks ago

ronilaukkarinen commented 2 weeks ago

I have followed instructions thoroughly, but still getting "Invalid access token passed". What causes it? The url mentioned is perfectly accessible via curl.

mautrix-signal version: v0.7.1 (from releases) matrix-synapse version: 1.115.0

2024-09-21T14:22:24.705Z INF Initializing bridge built_at=2024-09-16T11:53:01Z go_version=go1.23.1 name=mautrix-signal version=0.7.1
2024-09-21T14:22:24.705Z DBG Initializing database connection
2024-09-21T14:22:24.705Z DBG Bridge built with end-to-bridge encryption, but disabled in config
2024-09-21T14:22:24.705Z INF Initializing libsignal version:0.57.1 component=libsignal file=rust/bridge/ffi/src/logging.rs line=106 target=signal_ffi::logging
2024-09-21T14:22:24.711Z INF Starting bridge
2024-09-21T14:22:24.717Z INF Database is up to date current_version=18 db_section=main latest_known_version=18 oldest_compatible_version=9
2024-09-21T14:22:24.717Z INF Starting Matrix connector
2024-09-21T14:22:24.719Z INF Database is up to date current_version=7 db_section=matrix_state latest_known_version=7 oldest_compatible_version=3
2024-09-21T14:22:24.719Z DBG Starting appservice HTTP server
2024-09-21T14:22:24.72Z DBG Checking connection to homeserver
2024-09-21T14:22:24.72Z INF Starting HTTP listener address=127.0.0.1:29328
2024-09-21T14:22:24.723Z DBG Request completed duration=2.789177 method=GET req_id=1 response_length=88 response_mime=application/json status_code=401 url=http://localhost:8008/_matrix/client/versions?user_id=%40signalbot%3Achat.mementomori.social
2024-09-21T14:22:24.723Z ERR Failed to connect to homeserver, retrying in 10 seconds... error="failed to GET /_matrix/client/versions: M_UNKNOWN_TOKEN (HTTP 401): Invalid access token passed."
2024-09-21T14:22:34.734Z DBG Request completed duration=2.347682 method=GET req_id=2 response_length=88 response_mime=application/json status_code=401 url=http://localhost:8008/_matrix/client/versions?user_id=%40signalbot%3Achat.mementomori.social
2024-09-21T14:22:34.734Z ERR Failed to connect to homeserver, retrying in 10 seconds... error="failed to GET /_matrix/client/versions: M_UNKNOWN_TOKEN (HTTP 401): Invalid access token passed."
tulir commented 2 weeks ago

It's supposed to link to https://docs.mau.fi/faq/as-token and exit instead of retrying, but some recent changes in Synapse broke the proper error message

ronilaukkarinen commented 2 weeks ago

OK thanks. It seems I only reloaded matrix-synapse after configuration. Restart did the trick.