matrix-org / matrix-authentication-service

OAuth2.0 + OpenID Provider for Matrix Homeservers

Home Page:https://matrix-org.github.io/matrix-authentication-service/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weird error (sorry for being unspecific)

spaetz opened this issue · comments

Hi, I set up MAS (main from yesterday) via docker. I am able to create a user, log in via element web into my synapse server. That works.
However, I get tons of weird "could not parse JSON payload" errors whenever I go to my /account/ page:

2024-02-07T12:26:53.403639Z  INFO http.server.request{otel.kind="server" otel.name="POST /graphql" network.protocol.name="http" network.protocol.version="1.1" http.method="POST" url.path="/graphql" url.scheme="http" http.route="/graphql" user_agent.original="Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Fire
fox/123.0"}:GraphQL operation{otel.kind="server" graphql.document="query UserGreeting($userId: ID!) {\n  user(id: $userId) {\n    id\n    username\n    matrix {\n      mxid\n      displayName\n      __typename\n    }\n    ...UnverifiedEmail
Alert\n    __typename\n  }\n}\nfragment UnverifiedEmailAlert on User {\n  id\n  unverifiedEmails: emails(first: 0, state: PENDING) {\n    totalCount\n    __typename\n  }\n  __typename\n}" otel.name="UserGreeting" graphql.operation.name="Use
rGreeting"}:request:execute:field{path=user parent_type=Query return_type=User}:field{path=user.matrix parent_type=User return_type=MatrixUser!}: async_graphql::graphql: error error=could not parse JSON payload

The page has a blurb "Failed to load user" on top and when I try to set a Displayname it says: "Error
Failed to save display name. Please try again."

This will be accompanied by a log entry:

2024-02-07T14:13:19.229666Z INFO http.server.request{otel.kind="server" otel.name="POST /graphql" network.protocol.name="http" network.protocol.version="1.1" http.method="POST" url.path="/graphql" url.scheme="http" http.route="/graphql" user_agent.original="Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"}:GraphQL operation{otel.kind="server" graphql.document="query UserGreeting($userId: ID!) {\n user(id: $userId) {\n id\n username\n matrix {\n mxid\n displayName\n __typename\n }\n ...UnverifiedEmailAlert\n __typename\n }\n}\nfragment UnverifiedEmailAlert on User {\n id\n unverifiedEmails: emails(first: 0, state: PENDING) {\n totalCount\n __typename\n }\n __typename\n}" otel.name="UserGreeting" graphql.operation.name="UserGreeting"}:request:execute:field{path=user parent_type=Query return_type=User}:field{path=user.matrix parent_type=User return_type=MatrixUser!}: async_graphql::graphql: error error=could not parse JSON payload

2024-02-07T14:13:22.145779Z ERROR http.server.request{otel.kind="server" otel.name="POST /graphql" network.protocol.name="http" network.protocol.version="1.1" http.method="POST" url.path="/graphql" url.scheme="http" http.route="/graphql" user_agent.original="Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"}:GraphQL operation{otel.kind="server" graphql.document="mutation SetDisplayName($userId: ID!, $displayName: String) {\n setDisplayName(input: {userId: $userId, displayName: $displayName}) {\n status\n user {\n id\n matrix {\n displayName\n __typename\n }\n __typename\n }\n __typename\n }\n}" otel.name="SetDisplayName" graphql.operation.name="SetDisplayName"}:request:execute:field{path=setDisplayName parent_type=Mutation return_type=SetDisplayNamePayload!}:homeserver.set_displayname{matrix.homeserver="sspaeth.de" matrix.mxid="@spaetz:sspaeth.de" matrix.displayname="spaetzd"}: mas_matrix_synapse: error=Failed to set displayname in Synapse

Does this ring a bell? Or is MAS not able to connect to the synapse server properly? But I can log into my homeserver, so it should be fine, should it not?

This feels like a communication problem between Synapse and MAS. Make sure that:

  • it is able to reach Synapse admin API with the endpoint defined in matrix.endpoint
  • matrix.secret has the same value as the one in the Synapse config under experimental_features.msc3861.admin_token