CORS error on /sync from app.element.io #32

Open
opened 2026-09-13 03:08:33 +03:00 by wasilius · 0 comments
Member

CORS not configured for /sync (at least for MSC4222-flavored requests) - breaks app.element.io and any cross-origin client.

Requests to /_matrix/client/v3/sync?...org.matrix.msc4222.use_state_after=true... from app.element.io fail with CORS error in browser console, despite the join/room functionality actually working server-side. This causes Element to show a spurious "failed to join" error even though the join succeeded.

Reproduce this issue:

Created a new room via Element (app.element.io) without setting an explicit room name, invited test_user.

Result: Element UI displayed a "failed to join" type error message, however room existed, test_user was joined, message send/receive worked normally in that room afterward.

Browser LibreWolf console dump:

Запрос из постороннего источника заблокирован: Политика одного источника запрещает чтение удалённого ресурса на https://dev1.bromal.im/_matrix/client/v3/sync?filter=hHLGTX1HNlMLi6gtC0hW8g&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=online&since=zW4rQqrloR. (Причина: не удалось выполнить запрос CORS). Код состояния: (null).

Translate into English:

Request from an external (or non-original) source blocked: The single-source policy prohibits reading a remote resource at https://dev1. bromal.im/_matrix/client/v3/sync?filter=hHLGTX1HNlMLi6gtC0hW8g&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=online&since=zW4rQqrloR. (Reason: Failed to complete the CORS request). Status code: (null).

CORS not configured for /sync (at least for MSC4222-flavored requests) - breaks app.element.io and any cross-origin client. Requests to /_matrix/client/v3/sync?...org.matrix.msc4222.use_state_after=true... from app.element.io fail with CORS error in browser console, despite the join/room functionality actually working server-side. This causes Element to show a spurious "failed to join" error even though the join succeeded. Reproduce this issue: Created a new room via Element (app.element.io) without setting an explicit room name, invited test_user. Result: Element UI displayed a "failed to join" type error message, however room existed, test_user was joined, message send/receive worked normally in that room afterward. Browser LibreWolf console dump: > Запрос из постороннего источника заблокирован: Политика одного источника запрещает чтение удалённого ресурса на https://dev1.bromal.im/_matrix/client/v3/sync?filter=hHLGTX1HNlMLi6gtC0hW8g&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=online&since=zW4rQqrloR. (Причина: не удалось выполнить запрос CORS). Код состояния: (null). Translate into English: > Request from an external (or non-original) source blocked: The single-source policy prohibits reading a remote resource at https://dev1. bromal.im/_matrix/client/v3/sync?filter=hHLGTX1HNlMLi6gtC0hW8g&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=online&since=zW4rQqrloR. (Reason: Failed to complete the CORS request). Status code: (null).
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
main/bromal#32
No description provided.