Error in oplog callback MinimongoError: Invalid modifier specified $v

Hi.

Lately (probably from Meteor 1.6) my log is filled with entries like these:

I20180316-16:29:02.347(1)? Error in oplog callback MinimongoError: Invalid modifier specified $v
I20180316-16:29:02.347(1)?     at MinimongoError (packages/minimongo/common.js:1087:17)
I20180316-16:29:02.347(1)?     at Object.keys.forEach.operator (packages/minimongo/local_collection.js:1139:15)
I20180316-16:29:02.347(1)?     at Array.forEach (<anonymous>)
I20180316-16:29:02.348(1)?     at Function.LocalCollection._modify (packages/minimongo/local_collection.js:1132:27)
I20180316-16:29:02.348(1)?     at Matcher.Minimongo.Matcher.canBecomeTrueByModifier (packages/minimongo/minimongo_server.js:128:21)
I20180316-16:29:02.348(1)?     at packages/mongo/oplog_observe_driver.js:641:34
I20180316-16:29:02.348(1)?     at Object.Meteor._noYieldsAllowed (packages/meteor.js:730:12)
I20180316-16:29:02.348(1)?     at OplogObserveDriver._handleOplogEntrySteadyOrFetching (packages/mongo/oplog_observe_driver.js:575:12)
I20180316-16:29:02.348(1)?     at packages/mongo/oplog_observe_driver.js:129:20
I20180316-16:29:02.348(1)?     at packages/mongo/oplog_observe_driver.js:15:9

I am not able to find “$v” anywhere in my project or packages or node_modules.
Does anybody have a clue - or have seen the same?

Jan

I’m seeing this too. It might have started after using mongo 3.6.

1 Like

Alright!

Lets see which packages we have in common, it must be in one of them…

.meteor/packages:

accounts-password@1.5.0
accounts-base@1.4.0
email@1.2.3
jquery@1.11.10
http@1.3.0
meteor-base@1.2.0
mobile-experience@1.0.5
mongo@1.3.1
blaze-html-templates
session@1.1.7
tracker@1.1.3
logging@1.1.19
reload@1.1.11
random@1.0.10
ejson@1.1.0
spacebars
check@1.2.5
ecmascript@0.9.0
standard-minifier-css@1.3.5
standard-minifier-js@2.2.0
reywood:publish-composite
percolatestudio:percolatestudio-migrations
reactive-var@1.0.11
tmeasday:publish-counts
natestrauser:connection-banner
meteorhacks:aggregate
theduke:bootstrap-modal-prompt
less@2.7.11
mdg:validated-method
shell-server@0.3.0
dynamic-import

package-lock.json:

{
  "name": "admin",
  "version": "1.0.0",
  "lockfileVersion": 1,
  "requires": true,
  "dependencies": {
    "babel-runtime": {
      "version": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.18.0.tgz",
      "integrity": "sha1-D0F3/9mEku8Tufgj6ZlKAlhMkHg=",
      "requires": {
        "core-js": "2.5.3",
        "regenerator-runtime": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz"
      }
    },
    "bcrypt": {
      "version": "0.8.7",
      "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-0.8.7.tgz",
      "integrity": "sha1-vDh1qa/Qp7LNIxpqfyGKXOFWsJM=",
      "requires": {
        "bindings": "1.2.1",
        "nan": "2.3.5"
      }
    },
    "bindings": {
      "version": "1.2.1",
      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
      "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE="
    },
    "core-js": {
      "version": "2.5.3",
      "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
      "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4="
    },
    "cron": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/cron/-/cron-1.1.0.tgz",
      "integrity": "sha1-YehoxvGPmOi8uIvNern7j66QlFM=",
      "requires": {
        "moment-timezone": "0.3.1"
      },
      "dependencies": {
        "moment-timezone": {
          "version": "0.3.1",
          "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.3.1.tgz",
          "integrity": "sha1-PvR4VrAtU7cYoQpewgI6opnge/U=",
          "requires": {
            "moment": "2.14.1"
          }
        }
      }
    },
    "he": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/he/-/he-1.1.0.tgz",
      "integrity": "sha1-KTGdSb7sE6mx88T5sqbd5IWbsqc="
    },
    "lasync": {
      "version": "https://registry.npmjs.org/lasync/-/lasync-1.1.0.tgz",
      "integrity": "sha1-vlTTnnS9/Hys2mHrwkGZFMsXdGI="
    },
    "lodash": {
      "version": "4.13.1",
      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz",
      "integrity": "sha1-g+SxCRP0hJbU0W/sSlYK8u50S2g="
    },
    "moment": {
      "version": "2.14.1",
      "resolved": "https://registry.npmjs.org/moment/-/moment-2.14.1.tgz",
      "integrity": "sha1-s1snxH5X7S3ccAU9awe+zbKRdBw="
    },
    "nan": {
      "version": "2.3.5",
      "resolved": "https://registry.npmjs.org/nan/-/nan-2.3.5.tgz",
      "integrity": "sha1-gioNwmYpDOTNOhIoLKPn42Rmigg="
    },
    "node-netcat": {
      "version": "1.4.8",
      "resolved": "https://registry.npmjs.org/node-netcat/-/node-netcat-1.4.8.tgz",
      "integrity": "sha1-pbqVwlJD//v1InDexlrASf3zcCE=",
      "requires": {
        "lasync": "https://registry.npmjs.org/lasync/-/lasync-1.1.0.tgz",
        "underscore": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz"
      }
    },
    "regenerator-runtime": {
      "version": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz",
      "integrity": "sha1-0z65XQ0gAaS+OWWXB8UbDLcc4Ck="
    },
    "time": {
      "version": "0.11.4",
      "resolved": "https://registry.npmjs.org/time/-/time-0.11.4.tgz",
      "integrity": "sha1-7DyJR9f6SI87GXi4EQpoGG9dNA8=",
      "requires": {
        "bindings": "1.2.1",
        "debug": "2.2.0",
        "nan": "2.3.5"
      },
      "dependencies": {
        "debug": {
          "version": "2.2.0",
          "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
          "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
          "requires": {
            "ms": "0.7.1"
          },
          "dependencies": {
            "ms": {
              "version": "0.7.1",
              "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
              "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
            }
          }
        },
        "nan": {
          "version": "2.3.5",
          "resolved": "https://registry.npmjs.org/nan/-/nan-2.3.5.tgz",
          "integrity": "sha1-gioNwmYpDOTNOhIoLKPn42Rmigg="
        }
      }
    },
    "underscore": {
      "version": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
      "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag="
    },
    "unorm": {
      "version": "1.4.1",
      "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz",
      "integrity": "sha1-NkIA1fE2RsqLzURJAnEzVhR5IwA="
    }
  }
}

Hi Any progress on this? we are seeing the same error after migrating from Compose to Atlas

Invalid modifier specified $v

we are also using tmeasday:publish-counts. Can you easily remove yours and see if that fixes it?

this may work as a drop in replacement for tmesday:publish-counts with a little work

https://atmospherejs.com/natestrauser/publish-performant-counts

it’s mentioned in the publish-counts repo readme.MD

Brilliant!
It seems removing tmeasday:publish-counts did the trick. Come to think of it, the counts used from it had stopped updating reactively, so I probably should have connected the dots :slight_smile:

Thank you!

1 Like

Dammit!

So, replacing tmeasday:publish-counts with natestrauser:publish-performant-counts did work, as the first one was causing the log entries.

Unfortunately, I must have one more cause of them, because they are still there, only much much less frequent. There must be one more package in there somewhere, so I am on the hunt again…

funny, same issue here. we did the swap (tmeasday:publish-counts with natestrauser:publish-performant-counts ) but still have the error, so trying to find another cause :frowning:

Which other packages do we have in common?

I’m facing the exact same issue after shifting to MongoDB Atlas. These are the packages I’m using -
less@2.7.11
twbs:bootstrap
fortawesome:fontawesome
zimme:iron-router-active
jquery@1.11.10
alanning:roles
mrt:moment
anti:fake
random@1.1.0
aldeed:collection2
dburles:factory
matb33:collection-hooks
dburles:collection-helpers
http
accounts-password@1.5.0
meteorhacks:aggregate
reactive-var@1.0.11
edgee:slingshot
reywood:publish-composite
ongoworks:security
meteorhacks:search-source
meteorhacks:meteor-down
email@1.2.3
momentjs:moment
mizzao:bootboxjs
meteor-base@1.3.0
mobile-experience@1.0.5
mongo@1.4.2
blaze-html-templates@1.0.4
session@1.1.7
tracker@1.1.3
logging@1.1.19
reload@1.2.0
ejson@1.1.0
spacebars@1.0.12
check@1.3.0
meteorhacks:npm
npm-container
jparker:crypto-core
jparker:crypto-sha1
jparker:crypto-hmac
u2622:persistent-session
osv:mongo-counter@0.3.5
alisalaah:jquery-contextmenu
blueimp:javascript-load-image
iron:router
service-configuration@1.0.11
okgrow:router-autoscroll
meteorhacks:subs-manager
percolate:synced-cron@=1.3.0
sergeyt:typeahead
standard-minifier-css@1.4.0
standard-minifier-js@2.3.1
shell-server@0.3.1
manuel:reactivearray
konecty:autolinker
dbarrett:dropzonejs
ryanswapp:fabricjs
nimble:restivus@=0.8.11
dangrossman:bootstrap-daterangepicker@=2.1.13
mikowals:batch-insert
dynamic-import@0.3.0
natestrauser:publish-performant-counts

At some point between Meteor 1.6 and 1.8 (excluding Mongo 3.6 -> 4) this error has gone away…

For my project, this was due to using a non-recommended Mongo client (Meteor 1.6 used ~ 2.2.x) with a Mongo 3.6 server. On a 3.4 server I saw no such errors. No doubt the Mongo [oplog] API/protocol was tweaked slightly and recommended clients cater for this.

Upgraded to 1.8 now with 3.X.X series driver’s and all good.

This file has the Mongo Client versions per Meteor release: https://github.com/meteor/meteor/blob/devel/packages/npm-mongo/package.js

1 Like