Skip to content

Fix: Full review 4.0.12 fixes part2 - #258

Merged
rubenberttpingol merged 2 commits into
developfrom
fix/full-review-4-0-12-fixes-part2
Oct 8, 2026
Merged

rubenberttpingol merged 2 commits into
developfrom
fix/full-review-4-0-12-fixes-part2

Conversation

@rubenberttpingol

@rubenberttpingol rubenberttpingol commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #257

Five fixes from the 4.0.12 review, all around how the player talks to the CMS.

Changes

  1. XMDS timeouts and overlapping collections
    XMDS requests had no timeout, so a CMS that never answered held a collection forever. New collections also kept starting on top of a running one, which could send stats and logs twice.

    • Every XMDS request now has a 120s idle timeout.
    • collect() runs one collection at a time. A request that comes in during one queues a single follow-up. If the CMS stops answering, the next collection waits up to 120s for it.
  2. Schedule or file list not applied after a failed fetch
    The CMS checksums were saved before the fetch succeeded. After one failed fetch the player thought it was up to date and didn't try again.

    • The checksums are now only saved after a successful fetch, so a failed one is retried on the next collection.
  3. CMS rejects requests with & or <
    Log fields like method, stat tags, criteria values and the status JSON were sent without escaping. One & made the CMS reject the whole request.

    • These values are now escaped.
    • Log messages are left alone, because the logger already encodes them.
    • Log submission could also stop for good after one bad reply. The flag that blocked it is replaced with a simple "in progress" flag.
  4. Data widget timers piling up
    Every file list fetch added another update timer per data widget and never cleared the old ones.

    • There's now one timer per widget, replaced only when its update interval changes.
  5. Deleted commands still running
    When the CMS sent no commands, the old scheduled timers and profile commands weren't cleared, so a deleted command still ran.

    • Both are now cleared first.
    • Commands more than ~24.8 days ahead are skipped. setTimeout would otherwise run them straight away.

Testing

I tested the real app (npm run dev) against develop.xibo.co.uk, comparing develop with this branch. A local proxy between the app and the CMS injected failures (no reply, a slow reply, a failed fetch). For no. 5 I used a real scheduled command.

# develop this branch
1 slow CMS: 4 overlapping RegisterDisplay calls 1 collection + 1 follow-up
1 no reply: still waiting after 146s gives up after 120s
2 failed schedule fetch never retried retried on the next collection
3 display name with &: CMS returns Bad Request accepted
4 +1 timer per file list fetch no growth
5 deleted command still ran didn't run
5 command 30 days ahead ran right away didn't run

@rubenberttpingol rubenberttpingol self-assigned this Oct 6, 2026
@rubenberttpingol
rubenberttpingol merged commit d864b36 into develop Oct 8, 2026
1 check passed
@rubenberttpingol
rubenberttpingol deleted the fix/full-review-4-0-12-fixes-part2 branch October 8, 2026 11:03
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full review 4.0.12 fixes part2

2 participants