Real-time subscription matching crashes with "e.split is not a function" (RLS predicate util)
Summary
Problem On our self-hosted instance (Twenty 2.39.0, though also observed earlier on 2.38.1), the server repeatedly logs:
[Event] TypeError: e.split is not a function
at isRecordMatchingRLSRowLevelPermissionPredicate (.../is-record-matching-rls-row-level-permission-predicate.util.js)
at ObjectRecordEventPublisher.isQueryMatchingObjectRecordEvent (.../object-record-event-publisher.js)
at ObjectRecordEventPublisher.getMatchingObjectRecordQueryIds
at ObjectRecordEventPublisher.processObjectRecordStreamEvents
at ObjectRecordEventPublisher.publishThis fires roughly every 1-2 minutes whenever Task records are updated, i.e. it appears to be triggered by real-time subscription/view-matching for live updates, not by an actual configured row-level-permission rule (our workspace has zero rows in core.rowLevelPermissionPredicate and core.rowLevelPermissionPredicateGroup).
We previously diagnosed a similar-looking crash (2026-08-27) as caused by a leftover third-party app ("The Bell") whose row-level-permission rules were malformed; that app was fully uninstalled and its rules removed. This is a recurrence of the same error signature weeks later with zero row-level-permission rules present at all, so it cannot be the same root cause.
We also observed a viewFilter on one of our own Task views (a date filter using operand IS_IN_FUTURE with an empty-string value, the same format Twenty itself uses for IS_TODAY/IS_IN_PAST elsewhere) silently disappear from the view at some point without us deleting it, which may or may not be related.
Proposed solution Harden isRecordMatchingRLSRowLevelPermissionPredicate (or whatever value it eventually calls .split() on inside twenty-shared/dist/utils, likely a relative-date-token parser expecting an underscore-delimited string like "NEXT_1_DAY") to check typeof before calling .split(), and/or add better error context (which view/filter/field caused it) so self-hosted operators can actually pinpoint the offending filter instead of a generic "e.split is not a function".
Additional context Not reproducible via direct DB inspection: we scanned every stored viewFilter with a date-relative operand (IS_TODAY, IS_IN_PAST, IS_RELATIVE, IS_BEFORE, IS_AFTER) across the whole workspace and found no non-string values. The crash is caught (it does not take the server down, HTTP 200 / healthz stay fine), so this is a resilience/robustness bug rather than an outage.
This feature idea was drafted with AI assistance as part of an internal improvement-tracking workflow. It is a suggestion only — no code changes are proposed or included.
Source: twentyhq/twenty