Cultofcoders:redis-oplog TypeError: Cannot read property 'stop' of undefined

“cultofcoders:redis-oplog”

cultofcoders:redis-oplog@2.0.5
METEOR@2.7.3

How to fix error

I20220630-16:20:30.160(7)? Exception in onStop callback: TypeError: Cannot read property 'stop' of undefined
I20220630-16:20:30.160(7)?     at ObserveMultiplexer.onStop [as _onStop] (packages/cultofcoders:redis-oplog/lib/mongo/observeChanges.js:53:35)
I20220630-16:20:30.161(7)?     at ObserveMultiplexer._stop (packages/cultofcoders:redis-oplog/lib/mongo/ObserveMultiplex.js:119:14)
I20220630-16:20:30.161(7)?     at ObserveMultiplexer.removeHandle (packages/cultofcoders:redis-oplog/lib/mongo/ObserveMultiplex.js:105:18)
I20220630-16:20:30.161(7)?     at ObserveHandle.stop (packages/cultofcoders:redis-oplog/lib/mongo/ObserveMultiplex.js:288:23)
I20220630-16:20:30.161(7)?     at Subscription.<anonymous> (packages/mongo/collection.js:434:21)
I20220630-16:20:30.161(7)?     at runWithEnvironment (packages/meteor.js:1320:24)
I20220630-16:20:30.161(7)?     at packages/meteor.js:1333:14
I20220630-16:20:30.161(7)?     at packages/ddp-server/livedata_server.js:1232:7
I20220630-16:20:30.161(7)?     at Array.forEach (<anonymous>)
I20220630-16:20:30.161(7)?     at Function._.each._.forEach (packages/underscore.js:139:11)
I20220630-16:20:30.161(7)?     at Subscription._callStopCallbacks (packages/ddp-server/livedata_server.js:1231:7)
I20220630-16:20:30.161(7)?     at Subscription._deactivate (packages/ddp-server/livedata_server.js:1221:10)
I20220630-16:20:30.161(7)?     at packages/ddp-server/livedata_server.js:953:11
I20220630-16:20:30.161(7)?     at Map.forEach (<anonymous>)
I20220630-16:20:30.161(7)?     at Session._deactivateAllSubscriptions (packages/ddp-server/livedata_server.js:952:21)
I20220630-16:20:30.161(7)?     at packages/ddp-server/livedata_server.js:494:12

Thanks.

Hi @bug249286 would you be able to give us more context?

@hschmaiske Thank you very much for you attention to this matter.

An error was occurred sometime only but not all the time. Unable to tell the error time exactly.

Would you be able to provide a code snippet for me to try to reproduce the issue?

By looking at the code, it’d mean that this line got executed before this one. That’d mean, the ObserveMultiplex._stop of this very multiplexer got called right before the first one managed to complete setting up. That’s really weird, as the constructor is already wrapped in Meteor._noYieldsAllowed, and there’s not much in between.

@bug249286 are you able to reproduce it consistently, e.g., by performing some action in the app?

1 Like