meteor
meteor copied to clipboard
Error in oplog_v2_converter: Cannot read property 'i' of null
Our logs show some errors from the Oplog converter. We also had some other, adjacent errors that could be explained by a client having received bad/old/stale data from a subscription, so it's possible these errors had actually an impact on the reliability of our Meteor app.
Error in oplog callback TypeError: Cannot read property 'i' of null
at nestedOplogEntryParsers (packages/mongo/oplog_v2_converter.js:61:11)
at packages/mongo/oplog_v2_converter.js:98:9
at Array.forEach (<anonymous>)
at nestedOplogEntryParsers (packages/mongo/oplog_v2_converter.js:64:27)
at packages/mongo/oplog_v2_converter.js:98:9
at Array.forEach (<anonymous>)
at nestedOplogEntryParsers (packages/mongo/oplog_v2_converter.js:64:27)
at packages/mongo/oplog_v2_converter.js:98:9
at Array.forEach (<anonymous>)
at nestedOplogEntryParsers (packages/mongo/oplog_v2_converter.js:64:27)
at oplogV2V1Converter (packages/mongo/oplog_v2_converter.js:141:22)
at packages/mongo/oplog_observe_driver.js:607:16
at Object.Meteor._noYieldsAllowed (packages/meteor.js:783:12)
at OplogObserveDriver._handleOplogEntrySteadyOrFetching (packages/mongo/oplog_observe_driver.js:579:12)
at packages/mongo/oplog_observe_driver.js:133:20
at packages/mongo/oplog_observe_driver.js:17:9
at Object.Meteor._noYieldsAllowed (packages/meteor.js:783:12)
at packages/mongo/oplog_observe_driver.js:121:16
at packages/mongo/oplog_tailing.js:108:7
at runWithEnvironment (packages/meteor.js:1320:24)
at Object.callback (packages/meteor.js:1333:14)
at packages/ddp-server/crossbar.js:114:36
The relevant code seems to be:
const nestedOplogEntryParsers = (oplogEntry, prefixKey = '') => {
const { i = {}, u = {}, d = {}, ...sFields } = oplogEntry; // oplogEntry was null
- The version of Meteor showing the problem: 2.6.1
- The version of MongoDB 5.0.8
- The operating system you're running Meteor on: Ubuntu 20.04
- The expected behavior: No errors from oplog converter
- The actual behavior: Errors from oplog converter
Hi @arggh, is it possible to provide some sort of reproduction, or at least run your app with the EV OPLOG_CONVERTER_DEBUG, so we can see what are the values before it breaks?
A reproduction is probably too much to ask, but I'll run our production apps with OPLOG_CONVERTER_DEBUG set and see if I can catch anything 👍
As it didn't appear for a few months now, I think we can close this one. Also, in 2.8, the oplog converter should be more reliable (OPLOG_CONVERTER_DEBUG is still available).
Fixed this in #12339