meteorhacks / kadira-profiler

CPU Profiling support for Kadira
https://kadira.io/cpu-profiling.html
MIT License
14 stars 15 forks source link

Remote profiler not working. #4

Closed kkukielka closed 8 years ago

kkukielka commented 8 years ago

Hey!

I have added package for profiling my meteor app, and after running:

Kadira.profileCpu(10, "ID_FROM_PROFILER_SITE", "remote");

I got exception:

Kadira: CPU profiling attempt failed: Internal server error [500]

And on server side:

Exception while invoking method 'kadira.profileCpu' {
stack: 'TypeError: Cannot call method \'getJob\' of undefined
    at Object.Jobs.getAsync (packages/meteorhacks_kadira/lib/jobs.js:4:1)
    at Object.get (packages/meteor/helpers.js:118:1)
    at remoteProfileCPU (packages/meteorhacks_kadira-profiler/lib/server.js:17:1)
    at [object Object].Meteor.methods.kadira.profileCpu (packages/meteorhacks_kadira-profiler/lib/server.js:8:1)
    at [object Object].methodMap.(anonymous function) (packages/meteorhacks_kadira/lib/hijack/wrap_session.js:164:1)
    at maybeAuditArgumentChecks (livedata_server.js:1698:12)
    at livedata_server.js:708:19
    at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
    at livedata_server.js:706:40
    at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
    at livedata_server.js:704:46
    at tryCallTwo (/Users/chris/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:45:5)
    at doResolve (/Users/chris/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:171:13)
    at new Promise (/Users/chris/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:65:3)
    at [object Object]._.extend.protocol_handlers.method (livedata_server.js:678:23)
    at packages/meteorhacks_kadira/lib/hijack/wrap_session.js:52:1',source: 'method' }

I am using meteor@1.2.1 and I have updated all kadira packages.

Running Kadira.profileCpu(10) works and saves file to /tmp

All kadira packages are added to project packages.

What am I doing wrong? :( Thx for any help!

arunoda commented 8 years ago

Could you update meteorhacks:kadira to the latest version. It is v2.27.3.

kkukielka commented 8 years ago

I already did: screen shot 2016-01-28 at 13 54 01

arunoda commented 8 years ago

Okay. To do that, you need to connect to Kadira. Are you?

kkukielka commented 8 years ago

Yes, we have premium account for our deployments, and I just wanted to check CPU profile. Kadira works perfectly :)

arunoda commented 8 years ago

This error happens when your app not connected to Kadira. Check whether this app has Kadira: Successfully connected in the logs.

kkukielka commented 8 years ago

Ok, I have a new error on ui.kadira.io:

zrzut ekranu 2016-02-01 o 17 06 05

Node didn't register module?

I am working on node v0.12.9 right now.

arunoda commented 8 years ago

@kkukielka Meteor doesn't work with v0.12.9 but with 0.10.x. And our profiler is built for 0.10.x. So use it.

kkukielka commented 8 years ago

Oh ok! Great! Now I know what I have to do :) Thank you!

arunoda commented 8 years ago

Reopen if that's not solve your problem.