element-web icon indicating copy to clipboard operation
element-web copied to clipboard

Email validation page is stuck after clicking link in the email

Open antonengelhardt opened this issue 1 year ago • 19 comments

Steps to reproduce

  1. Where are you starting? What can you see?
  • I am trying to register a new account on my self-hosted Element Web instance running on v1.11.57.
  • When i enter my username, password and email i get the email through my configured email settings.
  • When i click the link in the email, i see a success page and it tells me to close the tab.
  • The initial page where the flow was started, does not change.
  1. What do you click?

The link in the email

  1. More steps

Outcome

What did you expect?

I expected to see the screen where i choose the purpose of how i plan to use Element (Friends, Company, etc.)

What happened instead?

Nothing

Additional information

I am deploying Matrix, Coturn and Element through Kubernetes and with this helm chart.

The interesting thing is that the whole flow works when i do it in the iOS App (not X) or in the Mac App. Just the browser version seems to have Problems or misconfiguration ...

I am requiring the email PID for every registration and define a set of domains that the email is allowed to be sent to.

Operating system

MacOS

Browser information

Arc Version 1.27.3 (45706)

URL for webapp

v1.11.57

Application version

Version 1.11.57 (1.11.57)

Homeserver

synapse v1.97.0

Will you send logs?

Yes

antonengelhardt avatar Feb 03 '24 18:02 antonengelhardt

Matrix logs

The only logs that instantly appear after clicking the link is:

2024-02-03 18:24:29,466 - synapse.rest.client.register - 537 - WARNING - POST-145 - Ignoring initial_device_display_name without password

Element logs

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
10.244.0.187 - - [03/Feb/2024:18:58:30 +0000] "GET / HTTP/1.1" 200 7534 "-" "kube-probe/1.29" "-"
10.244.0.187 - - [03/Feb/2024:18:58:30 +0000] "GET / HTTP/1.1" 200 7534 "-" "kube-probe/1.29" "-"
10.244.1.74 - - [03/Feb/2024:18:58:37 +0000] "GET /config.json?cachebuster=1706986716225 HTTP/1.1" 200 731 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "10.114.0.3"
2024/02/03 18:58:37 [error] 22#22: *4 open() "/usr/share/nginx/html/config.element.mydomain.json" failed (2: No such file or directory), client: 10.244.1.74, server: localhost, request: "GET /config.element.mydomain.json?cachebuster=1706986716225 HTTP/1.1", host: "element.mydomain"
10.244.1.74 - - [03/Feb/2024:18:58:37 +0000] "GET /config.element.mydomain.json?cachebuster=1706986716225 HTTP/1.1" 404 555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "10.114.0.3"
10.244.1.74 - - [03/Feb/2024:18:58:38 +0000] "GET /version HTTP/1.1" 200 8 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "10.114.0.3"
10.244.1.74 - - [03/Feb/2024:18:58:38 +0000] "GET /sw.js HTTP/1.1" 200 40 "https://element.mydomain/sw.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "10.114.0.3"
10.244.1.74 - - [03/Feb/2024:18:58:40 +0000] "GET /img/matrix.d1fcad6.svg HTTP/1.1" 200 16010 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "10.114.0.3"
10.244.0.187 - - [03/Feb/2024:18:58:40 +0000] "GET / HTTP/1.1" 200 7534 "-" "kube-probe/1.29" "-"
10.244.1.74 - - [03/Feb/2024:18:58:40 +0000] "GET /welcome/images/icon-sign-in.svg HTTP/1.1" 200 54455 "https://element.mydomain/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "10.114.0.3"
10.244.1.74 - - [03/Feb/2024:18:58:40 +0000] "GET /welcome/images/icon-create-account.svg HTTP/1.1" 200 587 "https://element.mydomain/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" "10.114.0.3"
10.244.0.187 - - [03/Feb/2024:18:58:50 +0000] "GET / HTTP/1.1" 200 7534 "-" "kube-probe/1.29" "-"

Screenshot of the issue

Screenshot-Arc-005597

antonengelhardt avatar Feb 03 '24 19:02 antonengelhardt

One last note: The times in the logs differ because i didnt find the logs of the previous attempt in the Element pod anymore, so i did it again and just copied those ones in. The matrix logs were the same.

antonengelhardt avatar Feb 03 '24 19:02 antonengelhardt

Element logs

@antonengelhardt Element is an SPA, the logs needed are from the browser, not the web server

t3chguy avatar Feb 12 '24 08:02 t3chguy

@t3chguy Screenshot-Arc-005713@2x

interactive-auth.ts:348 Uncaught (in promise) TypeError: Failed to construct 'URL': Invalid URL
    at u.poll (interactive-auth.ts:348:43)
    at InteractiveAuth.tsx:136:32
poll @ interactive-auth.ts:348
(anonymous) @ InteractiveAuth.tsx:136
setInterval (async)
d @ InteractiveAuth.tsx:135
yo @ react-dom.production.min.js:135
Zs @ react-dom.production.min.js:181
$a @ react-dom.production.min.js:269
Dl @ react-dom.production.min.js:250
Fl @ react-dom.production.min.js:250
Tl @ react-dom.production.min.js:250
yl @ react-dom.production.min.js:243
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:18
qi @ react-dom.production.min.js:122
$i @ react-dom.production.min.js:123
Hi @ react-dom.production.min.js:122
pl @ react-dom.production.min.js:237
enqueueSetState @ react-dom.production.min.js:133
f.setState @ react.production.min.js:12
(anonymous) @ Registration.tsx:311
doSubmit @ RegistrationForm.tsx:168
(anonymous) @ RegistrationForm.tsx:157
await in (anonymous) (async)
ze @ react-dom.production.min.js:52
$e @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
Tr @ react-dom.production.min.js:100
Fr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Pe @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Nr @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Qt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
qi @ react-dom.production.min.js:122
Oe @ react-dom.production.min.js:292
Wt @ react-dom.production.min.js:73
Show 36 more frames
Show less

antonengelhardt avatar Feb 13 '24 17:02 antonengelhardt

🤖

Hello @antonengelhardt! 👋 I'm Dosu, a bot here to help you solve bugs, answer questions, and become a contributor while you're waiting for a human maintainer. I'm here to assist you, so let's dive into your issue and I'll get back to you with a full answer shortly!

dosubot[bot] avatar Feb 13 '24 17:02 dosubot[bot]

What homeserver are you using?

t3chguy avatar Feb 13 '24 17:02 t3chguy

Synapse v1.97.0

antonengelhardt avatar Feb 13 '24 17:02 antonengelhardt

It looks like it cannot poll some URL that it most likely managing the validation 🤔

antonengelhardt avatar Feb 13 '24 17:02 antonengelhardt

This seems like a misconfiguration, and invalid URL is given for the identity server which forms part of your email verification. Is this a self-hosted setup?

t3chguy avatar Feb 13 '24 17:02 t3chguy

Yes, I am using Helm and kubernetes to deploy. In the issue description is the chart I used. Can you tell me what variable is most likely wrong?

antonengelhardt avatar Feb 13 '24 17:02 antonengelhardt

The identity server, without seeing the full config it won't be possible to chase this any further

t3chguy avatar Feb 13 '24 17:02 t3chguy

I am not using any identity server...

In my matrix config i have required email 3pid. Then i have also configured smtp settings to send the emails which also arrive.

I can send you the config via email (or some other channel) because there are too many secrets and confidential stuff to post it on here.

antonengelhardt avatar Feb 13 '24 17:02 antonengelhardt

I believe Element Web's implementation relies on older spec (for wider compatibility) and requires an IS for email verification - similar issue to https://github.com/element-hq/element-web/issues/26172

t3chguy avatar Feb 13 '24 17:02 t3chguy

Emailing it to me won't do much good, I'm just triaging the issue. Anyone can work on it, its an open source project. But if isn't reproducible in a public server or trivial example then it is quite unlikely to be picked up

t3chguy avatar Feb 13 '24 17:02 t3chguy

Reading through the ticket, that you linked, it looks like i have to use vector.im as the identity server? Correct?

antonengelhardt avatar Feb 13 '24 17:02 antonengelhardt

Hosting your own is an option, you're not forced to use a centralised service at any point

t3chguy avatar Feb 13 '24 17:02 t3chguy

I tried that once, and it was not really trivial... So i decided to keep my hands off it.

For some reason, registration works flawlessly on MacOS and iOS, just not on Web

antonengelhardt avatar Feb 13 '24 17:02 antonengelhardt

If by MacOS you mean Element Desktop, that'll because it indeed uses vector.im by default in its config unless you build it yourself/override the config manually. https://github.com/element-hq/element-desktop/blob/develop/element.io/release/config.json#L8-L10

t3chguy avatar Feb 13 '24 17:02 t3chguy

Ok, thanks for your help. I will turn off Element Web and just use the native clients.

antonengelhardt avatar Feb 13 '24 17:02 antonengelhardt