meteor-astronomy: Astronomy throws exception when upsert is used with Meteor 1.5.2 (LocalCollection._removeDollarOperators is not a function)

It seems astronomy is not compatible with current Meteor 1.5.2

After we upgraded our project (https://www.4minitz.com) from Meteor 1.5.1 to 1.5.2 we suddenly get crashes when using upsert like so:

        TopicSchema.upsert(
            { parentId: this.meetingSeriesId, _id: topicId },
            topicDoc
        );

Here comes exception text (caused by astronomy)

meteor: I20170915-07:42:48.688(2)? Exception while invoking method 'workflow.finalizeMinute' TypeError: LocalCollection._removeDollarOperators is not a function
meteor: I20170915-07:42:48.689(2)?     at classUpsert (packages/jagi:astronomy/lib/modules/storage/utils/class_upsert.js:83:43)
meteor: I20170915-07:42:48.690(2)?     at Function.upsert (packages/jagi:astronomy/lib/modules/storage/class_static_methods/upsert.js:50:18)
meteor: I20170915-07:42:48.690(2)?     at MeetingSeriesTopicsUpdater.upsertTopic (imports/services/finalize-minutes/meetingSeriesTopicsUpdater.js:28:21)
meteor: I20170915-07:42:48.691(2)?     at TopicsFinalizer._mergeOrInsertTopic (imports/services/finalize-minutes/topicsFinalizer.js:53:28)
meteor: I20170915-07:42:48.692(2)?     at TopicsFinalizer.mergeTopics (imports/services/finalize-minutes/topicsFinalizer.js:43:18)
meteor: I20170915-07:42:48.692(2)?     at Function.mergeTopicsForFinalize (imports/services/finalize-minutes/topicsFinalizer.js:14:25)
meteor: I20170915-07:42:48.693(2)?     at [object Object].Meteor.methods.workflow.finalizeMinute (imports/services/finalize-minutes/finalizer.js:75:25)
meteor: I20170915-07:42:48.694(2)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1768:12)
meteor: I20170915-07:42:48.694(2)?     at packages/ddp-server/livedata_server.js:719:19
meteor: I20170915-07:42:48.695(2)?     at [object Object].EVp.withValue (packages/meteor.js:1135:15)

With Meteor 1.5.2 we saw this exception on astronomy current version 2.5.0 and even on the older 2.4.8. We used astronomy 2.4.8 together with Meteor 1.5.1 without any problems. So this is not a new astronomy issue - We looked at changes on Meteor’s side that may have caused this issue even with the former working astronomy version 2.4.8.

Surprise: we found this Meteor commit that removed the private _removeDollarOperators for Meteor 1.5.2-beta1: https://github.com/meteor/meteor/commit/dda994c26247f5b8eeb7fc789735f05e94d82b0e#diff-92272525414f7df6943cac34ebea2a2fL1267

Is there a way to work around the absence of this removed private meteor function?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Ok, should be fixed in 2.5.1. Please check and let me know if it works.

I will test Astronomy with Meteor 1.6 this week and let you know if I have some solution for that

On Sep 18, 2017 6:53 PM, “Martin H. Bramwell” notifications@github.com wrote:

I just now attempted upgrading to METEOR@1.6-beta.27

TypeError: LocalCollection.removeDollarOperators is not a function at classUpsert (packages/jagi:astronomy/lib/modules/storage/utils/class_upsert.js:83:43) at Function.upsert (packages/jagi:astronomy/lib/modules/storage/class_static_methods/upsert.js:50:18) at Function.AccessControl.upsertRecord (lib/access_control.js:83:17) at server/configs/initial_adds.js:25:19 at Array.forEach (<anonymous>) at Function..each..forEach (packages/underscore.js:139:11) at _initPosts (server/configs/initial_adds.js:24:5) at main.js (server/main.js:86:1) : :

Is there some sort of workaround?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jagi/meteor-astronomy/issues/645#issuecomment-330284951, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAKXduC4qCUhUiltsfcOB-jtscuoofyks5sjqAVgaJpZM4PaFwI .