Login hangs silently when the relay refuses the connection #133

Closed
opened 2026-10-18 22:01:08 +00:00 by littlefox · 1 comment
Owner

When kom-relay refuses a WebSocket (HTTP 503: too many connections from this address, or in all; or 403 for an origin not allowed), the login page just stays as it is: no message, the button seemingly doing nothing. Found in the e2e suite, where specs that left extra browsers open filled the relay's per-address limit (8) and a later login hung for 15 s (the specs are fixed to close them).

The app should say what happened, e.g. 'Reläet tar inte emot fler anslutningar från din adress just nu' for 503 and 'Reläet tillåter inte den här sidan' for 403, and offer to try again.

When kom-relay refuses a WebSocket (HTTP 503: too many connections from this address, or in all; or 403 for an origin not allowed), the login page just stays as it is: no message, the button seemingly doing nothing. Found in the e2e suite, where specs that left extra browsers open filled the relay's per-address limit (8) and a later login hung for 15 s (the specs are fixed to close them). The app should say what happened, e.g. 'Reläet tar inte emot fler anslutningar från din adress just nu' for 503 and 'Reläet tillåter inte den här sidan' for 403, and offer to try again.
Author
Owner

Merged in #142. The relay now accepts a connection it won't serve and closes it at once with 4004 (full for your address), 4005 (full) or 4006 (page not allowed). The login says which, instead of 'Kunde inte nå servern… kontrollera adressen'.

Verified:

  • relay integration tests for per-address, total, X-Forwarded-For and origins;
  • new e2e relay.spec in Chromium (a full relay, a disallowed origin, and no relay at all, with relays on 4901/4903 in tools/e2e.sh);
  • tls.spec still passes;
  • CI green.
Merged in #142. The relay now accepts a connection it won't serve and closes it at once with 4004 (full for your address), 4005 (full) or 4006 (page not allowed). The login says which, instead of 'Kunde inte nå servern… kontrollera adressen'. Verified: - relay integration tests for per-address, total, X-Forwarded-For and origins; - new e2e relay.spec in Chromium (a full relay, a disallowed origin, and no relay at all, with relays on 4901/4903 in tools/e2e.sh); - tls.spec still passes; - CI green.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
littlefox/neokom#133
No description provided.