Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError #27

Open
mrcwinn opened this issue Jul 18, 2015 · 7 comments
Open

AssertionError #27

mrcwinn opened this issue Jul 18, 2015 · 7 comments

Comments

@mrcwinn
Copy link

mrcwinn commented Jul 18, 2015

Using Meteor 1.1.0.2 and package 1.2.2_1

As soon as I attached a simple analytics.page() call to Router.autoRun every request triggers an AssertionError.

W20150718-09:00:01.211(-7)? (STDERR) AssertionError: You must pass a message object.
W20150718-09:00:01.212(-7)? (STDERR)     at validate (/Users/USER/.meteor/packages/percolatestudio_segment.io/.1.2.2_1.juovpg++os+web.browser+web.cordova/npm/node_modules/analytics-node/lib/index.js:219:3)
W20150718-09:00:01.212(-7)? (STDERR)     at Analytics.page (/Users/USER/.meteor/packages/percolatestudio_segment.io/.1.2.2_1.juovpg++os+web.browser+web.cordova/npm/node_modules/analytics-node/lib/index.js:102:3)
W20150718-09:00:01.212(-7)? (STDERR)     at [object Object].Router.route.waitOn (app/routes.js:21:13)
W20150718-09:00:01.212(-7)? (STDERR)     at packages/iron:router/lib/router.js:277:1
W20150718-09:00:01.212(-7)? (STDERR)     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
W20150718-09:00:01.212(-7)? (STDERR)     at [object Object].hookWithOptions (packages/iron:router/lib/router.js:276:1)
W20150718-09:00:01.212(-7)? (STDERR)     at boundNext (packages/iron:middleware-stack/lib/middleware_stack.js:251:1)
W20150718-09:00:01.212(-7)? (STDERR)     at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108:1)
W20150718-09:00:01.212(-7)? (STDERR)     at packages/meteor/dynamics_nodejs.js:121:1
W20150718-09:00:01.212(-7)? (STDERR)     at [object Object].dispatch (packages/iron:middleware-stack/lib/middleware_stack.js:275:1)
@zol
Copy link
Member

zol commented Aug 14, 2015

Could you please attach a link to a repo with a reproduction? No one else has reported this issue.

@billyvg
Copy link

billyvg commented Aug 20, 2015

We're having the same problem, I believe it's related to analytics-node, the APIs for their client and server APIs are different.

On server it expects an object with the event property as its only parameter.

analytics.track({
  userId: '019mr8mf4r',
  event: 'Purchased an Item',
  properties: {
    revenue: 39.95,
    shippingMethod: '2-day'
  }
});

vs

analytics.track('Signed Up', {
  plan: 'Startup',
  source: 'Analytics Academy'
});

@sferoze
Copy link

sferoze commented Oct 27, 2015

I got the same issue. @billyvg your answer is correct. Tracking on the server has a slightly different API. The docs should mention this.

@dgroch
Copy link

dgroch commented Nov 6, 2015

Yep.
Server side uses syntax for [https://segment.com/docs/libraries/node/](NodeJS Library)

@khaledkbadr
Copy link

I have the same issue, can you tell me how did you solve it?

@dominikmayer
Copy link

The problem is also present with the identify method.

How about the package exposes a method that would then use Meteor.isServer to decide, how to pass the data on to analytics.js or analytics-node?

@ashok-sc
Copy link

ashok-sc commented Nov 5, 2017

I'm still getting this error when using the track method. Is this still an open bug? I'm using analytics-node npm package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants