kamax-matrix / mxisd

Federated Matrix Identity Server
GNU Affero General Public License v3.0
220 stars 112 forks source link

"Unable to add email address" error in Riot #118

Closed hardye closed 5 years ago

hardye commented 5 years ago

When trying to add a second email address to my account in Riot, the application responds with:

Unable to add email address
An internal server error occured. If this error persists, please contact support with reference #1549480560593 (Status 500)

Here is what is logged on the server for this interaction:

Feb 06 20:16:00 [myhostname] docker[7632]: [XNIO-1 task-2] INFO io.kamax.mxisd.session.SessionManager - Server 172.18.0.7 is asking to create session for io.kamax.matrix.ThreePid@d61b0a59 (Attempt number 1) - Next link: null
Feb 06 20:16:00 [myhostname] docker[7632]: [XNIO-1 task-2] INFO io.kamax.mxisd.session.SessionManager - No existing session for io.kamax.matrix.ThreePid@d61b0a59
Feb 06 20:16:00 [myhostname] docker[7632]: [XNIO-1 task-2] INFO io.kamax.mxisd.session.SessionManager - Generated new session 1549480560588 to validate io.kamax.matrix.ThreePid@d61b0a59 from server 172.18.0.7
Feb 06 20:16:00 [myhostname] docker[7632]: [XNIO-1 task-2] INFO io.kamax.mxisd.session.SessionManager - Stored session 1549480560588
Feb 06 20:16:00 [myhostname] docker[7632]: [XNIO-1 task-2] INFO io.kamax.mxisd.session.SessionManager - Session 1549480560588 for io.kamax.matrix.ThreePid@d61b0a59: sending validation notification
Feb 06 20:16:00 [myhostname] docker[7632]: [XNIO-1 task-2] INFO io.kamax.mxisd.threepid.generator.GenericTemplateNotificationGenerator - Generating notification content for 3PID Session validation
Feb 06 20:16:00 [myhostname] docker[7632]: [XNIO-1 task-2] ERROR io.kamax.mxisd.http.undertow.handler.SaneHandler - Reference #1549480560593 - Unable to read template content at classpath:/threepids/email/validate-local-template.eml: No classpath resource: /threepids/email/validate-local-template.eml
Feb 06 20:16:00 [myhostname] docker[7632]: [XNIO-1 task-2] INFO io.kamax.mxisd.http.undertow.handler.BasicHttpHandler - Request POST http://matrix.mydomain.com/_matrix/identity/api/v1/validate/email/requestToken - Error M_UNKNOWN: An internal server error occured. If this error persists, please contact support with reference #1549480560593

This error started to occur with 1.3.rc.* versions of the kamax/mxisd docker image. With 1.3.0-alpha.3 and lower adding a second email address in Riot worked fine. I'm using the Ansible playbook from https://github.com/spantaleev/matrix-docker-ansible-deploy, with a custom variable matrix_mxisd_docker_image: "kamax/mxisd:1.3.0-rc.2-3-ga4c18de" for testing the latest mxsid.

maxidorius commented 5 years ago

@hardye Definitely a bug during the change of sessions, thanks. I'll make a new image ASAP for you to test.

maxidorius commented 5 years ago

@hardye Could you try with this image please: kamax/mxisd:1.3.0-rc.2-5-g3a6b759?

hardye commented 5 years ago

Done. Works very well now. And the wording of the message sent is a lot less scary than earlier where it said that the email address would be stored in the "central Matrix server" never to be seen again or something to that effect. Thanks for the quick response @maxidorius .

maxidorius commented 5 years ago

@hardye I'm very glad to hear the changes feel good. Thank you for your feedback! I'll close the issue now.