-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Good day! :)
Since we update rxdb to v16.15.0
our sentry is getting spammed with ensureNotFalsy
errors. This is happening because of the toggleOnDocumentVisible
option introduced in v16.5.0
and the replication state queue which was introduced in v16.13.0
.
To be more specific the error is coming from here:
rxdb/src/plugins/replication/index.ts
Line 625 in bc50ccf
replicationState.pause(); |
rxdb/src/plugins/replication/index.ts
Line 437 in bc50ccf
ensureNotFalsy(this.internalReplicationState).events.paused.next(true); |
We also can't really control this behavior, because the whole code is running because of the visibilitychange
event.
I'm assuming that this error "isn't really an error" since the replication still runs normaly and ensureNotFalsy
is only used so that one can be sure that this.internalReplicationState
is not falsy and the replication can be paused. I would say that this error is not helping or saying anything besides "there is an error, but everything continues to work normally".
If this behavior is expected and this.internalReplicationState
can be falsy I would suggest to silently ignore it if it happens in the visibilitychange
event, since otherwise the error is being spammed for each collection which can be a lot.
If the behavior mustn't happen and this.internalReplicationState
must be defined in the queue, then this is a bug.
A test with the reproduction is here: #7265