Meteor 1.2.1 MongoDB Invalid Modifier $currentDate - mongodb

I recently updated to Meteor 1.2.1 and deployed my project to the meteor development servers {app}.meteor.com However, upon doing so I started noticing errors with the $currentDate modifier in my mongo update statements.
This was working before the update and actually works locally. However, seems to be broken on the deployment. Thoughts on this?
The code:
Members.update({burnId: burnId, "isViewing": { $eq : false}}, { $inc: { "numUnreadMessages": 1}, $currentDate: {updatedAt: true}}, {multi: true});
UPDATE: I actually ran meteor mongo {app}.meteor.com and tried to run a simple update command db.collection.update({_id: "1234"}, {$currentDate: {updatedAt: true}}) and it worked on the local copy, but not on the deployed version.
I'm assuming that the deployment servers (free) for meteor are having trouble running Meteor 1.2. Is there a way to resolve this? I also assume this will be fixed with Galaxy, but alas that's not available to the general public yet.
The logs:
[Sun Sep 27 2015 15:56:51 GMT+0000 (UTC)] INFO Exception while invoking method 'sendMessage' MongoError: Invalid modifier specified $currentDate
at Object.Future.wait (/meteor/dev_bundles/0.5.13/lib/node_modules/fibers/future.js:398:15)
at [object Object].<anonymous> (packages/meteor/helpers.js:119:1)
at [object Object].MongoConnection.(anonymous function) (packages/mongo/mongo_driver.js:736:1)
at [object Object].mongoConnectionProto.(anonymous function) [as update] (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2923:1)
at OptimizedApply (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:271:1)
at Object.ret.(anonymous function) [as update] (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2881:1)
at [object Object].Mongo.Collection.(anonymous function) [as update] (packages/mongo/collection.js:586:1)
at [object Object].Meteor.methods.sendMessage (server/Methods.js:124:1)
at [object Object].methodMap.(anonymous function) (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2554:1)
at maybeAuditArgumentChecks (livedata_server.js:1692:12)
- - - - -
at Object.toError (/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/utils.js:114:11)
at /meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/collection/core.js:636:22
at Server.Base._callHandler (/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
at /meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:488:18
at [object Object].MongoReply.parseBody
(/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at [object Object].<anonymous> (/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
at [object Object].emit (events.js:95:17)
at [object Object].<anonymous>
(/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
at [object Object].emit (events.js:98:17)
at Socket.<anonymous> (/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:440:22)
[Sun Sep 27 2015 15:56:54 GMT+0000 (UTC)] INFO Exception while invoking method 'sendMessage' MongoError: Invalid modifier specified $currentDate
at Object.Future.wait (/meteor/dev_bundles/0.5.13/lib/node_modules/fibers/future.js:398:15)
at [object Object].<anonymous> (packages/meteor/helpers.js:119:1)
at [object Object].MongoConnection.(anonymous function) (packages/mongo/mongo_driver.js:736:1)
at [object Object].mongoConnectionProto.(anonymous function) [as update] (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2923:1)
at OptimizedApply (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:271:1)
at Object.ret.(anonymous function) [as update] (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2881:1)
at [object Object].Mongo.Collection.(anonymous function) [as update] (packages/mongo/collection.js:586:1)
at [object Object].Meteor.methods.sendMessage (server/Methods.js:124:1)
at [object Object].methodMap.(anonymous function) (packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2554:1)
at maybeAuditArgumentChecks (livedata_server.js:1692:12)
- - - - -
at Object.toError (/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/utils.js:114:11)
at /meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/collection/core.js:636:22
at Server.Base._callHandler (/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
at /meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:488:18
at [object Object].MongoReply.parseBody
(/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at [object Object].<anonymous> (/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
at [object Object].emit (events.js:95:17)
at [object Object].<anonymous>
(/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
at [object Object].emit (events.js:98:17)
at Socket.<anonymous> (/meteor/containers/951f3aa3-e3e5-e5bf-afc8-323fba10ef52/bundle/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:440:22)

This was an issue with Meteor's free version. Using an updated version of mongo does the trick.

Related

Exception while invoking method 'forgotPassword' Error: getaddrinfo ENOTFOU

Exception while invoking method 'forgotPassword' Error: getaddrinfo ENOTFOU
ND
I20161024-13:37:32.563(5.75)? at Object.Future.wait
(/home/john/.meteor/packages/meteor-tool/.1.3.3.k
c10re++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibe
rs/future.js:449:15)
I20161024-13:37:32.564(5.75)? at smtpSend (packages/email/email.js:89:1)
I20161024-13:37:32.564(5.75)? at Object.Email.send (packages/email/email.js:192:1)
I20161024-13:37:32.564(5.75)? at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-pa
ssword/password_server.js:577:9)
I20161024-13:37:32.564(5.75)? at [object Object].forgotPassword (packages/accounts-password/password_
server.js:516:12)
I20161024-13:37:32.565(5.75)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:170
4:12)
I20161024-13:37:32.565(5.75)? at packages/ddp-server/livedata_server.js:711:19
I20161024-13:37:32.565(5.75)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.
js:56:1)
I20161024-13:37:32.565(5.75)? at packages/ddp-server/livedata_server.js:709:40
I20161024-13:37:32.566(5.75)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.
js:56:1)
I20161024-13:37:32.566(5.75)? at packages/ddp-server/livedata_server.js:707:46
I20161024-13:37:32.567(5.75)? at tryCallTwo (/home/john/.meteor/packages/promise/.0.7.2.1cuapq8++os+w
eb.browser+web.cordova/npm/node_modules/promise/lib/core.js:45:5)
I20161024-13:37:32.567(5.75)? at doResolve (/home/john/.meteor/packages/promise/.0.7.2.1cuapq8++os+we
b.browser+web.cordova/npm/node_modules/promise/lib/core.js:200:13)
I20161024-13:37:32.567(5.75)? at new Promise (/home/john/.meteor/packages/promise/.0.7.2.1cuapq8++os+
web.browser+web.cordova/npm/node_modules/promise/lib/core.js:66:3)
I20161024-13:37:32.567(5.75)? at Session.method (packages/ddp-server/livedata_server.js:681:23)
I20161024-13:37:32.568(5.75)? at packages/ddp-server/livedata_server.js:551:43
I20161024-13:37:32.568(5.75)? - - - - -
I20161024-13:37:32.568(5.75)? at errnoException (dns.js:37:11)
I20161024-13:37:32.568(5.75)? at Object.onanswer [as oncomplete] (dns.js:126:16)

Meteor error - Storing tasks in a collection

I am following the meteor site tutorial (https://www.meteor.com/tutorials/blaze/collections).
But when you add the line:
export const Tasks = new Mongo.Collection('tasks');
I get the following error:
/Users/user/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:313
throw(ex);
^
MongoError: failed to connect to server [localhost:27017] on first connect
at Object.Future.wait (/Users/user/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:449:15)
at new MongoConnection (packages/mongo/mongo_driver.js:216:27)
at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
at new Mongo.Collection (packages/mongo/collection.js:103:40)
at meteorInstall.imports.api.tasks.js (imports/api/tasks.js:4:14)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at Module.Mp.import (/Users/user/.meteor/packages/modules/.0.7.6_1.j54juu++os+web.browser+web.cordova/npm/node_modules/reify/lib/runtime.js:70:16)
- - - - -
at [object Object].<anonymous> (/Users/user/.meteor/packages/npm-mongo/.1.5.50.1g0yl8n++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/topologies/server.js:313:35)
at emitOne (events.js:77:13)
at [object Object].emit (events.js:169:7)
at [object Object].<anonymous> (/Users/user/.meteor/packages/npm-mongo/.1.5.50.1g0yl8n++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:260:12)
at [object Object].g (events.js:260:16)
at emitTwo (events.js:87:13)
at [object Object].emit (events.js:172:7)
at Socket.<anonymous> (/Users/user/.meteor/packages/npm-mongo/.1.5.50.1g0yl8n++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/connection.js:162:49)
at Socket.g (events.js:260:16)
at emitOne (events.js:77:13)
Exited with code: 1
Your application is crashing. Waiting for file change.
The line in the tutorial:
export const Tasks = new Mongo.Collection('tasks');
Is different from your line:
Export Tasks const = new Mongo.Collection ('tasks');
The goal of the code is to initialize a new constant, Tasks, set it to a new Mongo.Collection, and then export it.

REST route not working with Meteor's iron router

I'm trying to create a simple REST api in my Meteor app. Using the exact example from the doc
Router.route('/webhooks/stripe', { where: 'server' })
.get(function () {
// GET /webhooks/stripe
})
.post(function () {
// POST /webhooks/stripe
})
.put(function () {
// PUT /webhooks/stripe
})
throw an error:
=> Exited with code: 8
W20160116-16:39:15.200(-8)? (STDERR)
W20160116-16:39:15.201(-8)? (STDERR) /Users/me/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20160116-16:39:15.201(-8)? (STDERR) throw(ex);
W20160116-16:39:15.201(-8)? (STDERR) ^
W20160116-16:39:15.204(-8)? (STDERR) TypeError: Object [object Object] has no method 'get'
W20160116-16:39:15.205(-8)? (STDERR) at lib/router.js:9:4
W20160116-16:39:15.205(-8)? (STDERR) at /Users/me/repo/.meteor/local/build/programs/server/app/lib/router.js:25:4
W20160116-16:39:15.205(-8)? (STDERR) at /Users/me/repo/.meteor/local/build/programs/server/boot.js:242:10
W20160116-16:39:15.205(-8)? (STDERR) at Array.forEach (native)
W20160116-16:39:15.205(-8)? (STDERR) at Function._.each._.forEach (/Users/me/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160116-16:39:15.205(-8)? (STDERR) at /Users/me/repo/.meteor/local/build/programs/server/boot.js:137:5
Any idea?
It seems to me that you perhaps missed to install iron-router?
.. at /Users/me/repo/.meteor/local/build/programs/server/app/lib/router.js:25:4
This seems to indicate that Router is still the meteor own router, not iron-router, which lives somewhere in
/Users/me/repo/.meteor/local/build/programs/server/packages
Make sure you ran:
meteor add iron:router
You can see which packages are already installed using meteor list.

protractor sets error without opening browser

i download a new ionic project and i am trying to test the header contains these elements ""
my config file is
exports.config = {
framework: 'jasmine2',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['../www/head.spec.js'],
multiCapabilities: [
{
browserName: 'chrome'
}]
}
named this as e2e.js
my test case file is
describe('header Module', function(){
var header;
beforeEach(function() {
header = element(by.css('title'));
});
it('should check title text',function(){
expect(header.getText()).toContain('Ionic Blank Starter');
});
});
and i named this as head.spec.js
my issue is that i could see the browser opened and my protractor sends an error msg
empresss-Mac-mini:myApp admin$ protractor test/e2e.js
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest. (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172:16)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:259:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at doNTCallback2 (node.js:439:9)
at process.tickCallback (node.js:353:17)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
at [object Object].Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
at [object Object].DriverProvider.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
at [object Object].Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.js:182:37)
at /usr/local/lib/node_modules/protractor/lib/runner.js:263:21
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:525:49
[launcher] Process exited with error code 1
could someone help to fix this issue
when i try to webdriver-manager update err msg is displayed
empresss-Mac-mini:~ admin$ webdriver-manager update
fs.js:799
return binding.mkdir(pathModule._makeLong(path),
^
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protractor/selenium'
at Error (native)
at Object.fs.mkdirSync (fs.js:799:18)
at Object.<anonymous> (/usr/local/lib/node_modules/protractor/bin/webdriver-manager:126:6)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:134:18)
at node.js:961:3
empresss-Mac-mini:~ admin$

Can't do basic find with Waterline in sails console

I have a Job model that searches a table of jobs. The table was created using rails, and I set 'migrate' to 'safe' in the Job model. I have written out all the attributes in the model. I cannot get basic functions to work in the sails console. I have three jobs in the table, with ids 1,2, and 3. When I execute:
sails> Job.findOneById(1).done(function(err,job){console.log(j.id)})
It poops out on me. The sails console crashes (super annoying). The output looks like this:
sails> Job.findOneById(1).done(function(err,job){console.log(j.id)})
undefined
sails>
/home/redmage/tac/node_modules/sails-postgresql/lib/query.js:544
var type = self._schema[key].type;
^
TypeError: Cannot read property 'type' of undefined
at /home/redmage/tac/node_modules/sails-postgresql/lib/query.js:544:33
at Array.forEach (native)
at Query.cast (/home/redmage/tac/node_modules/sails-postgresql/lib/query.js:541:23)
at /home/redmage/tac/node_modules/sails-postgresql/lib/adapter.js:372:32
at Array.forEach (native)
at __FIND__ (/home/redmage/tac/node_modules/sails-postgresql/lib/adapter.js:371:23)
at Query.handleReadyForQuery (/home/redmage/tac/node_modules/sails-postgresql/node_modules/pg/lib/query.js:84:10)
at null.<anonymous> (/home/redmage/tac/node_modules/sails-postgresql/node_modules/pg/lib/client.js:159:19)
at EventEmitter.emit (events.js:117:20)
at null.<anonymous> (/home/redmage/tac/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:97:12)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:528:21)
Here is the ORM for Job. It is very basic:
module.exports = {
//VERY IMPORTANT:
migrate: 'safe',
tableName: 'jobs',
attributes: {
}
}