CoffeeJack / EECE496

funf framework data collect
0 stars 0 forks source link

bug in running application probe #10

Open thoriqsalafi opened 10 years ago

thoriqsalafi commented 10 years ago

in the android apps the running application probes works fine, but when it is come to the js the mClass and mPackage is not defined and only appear as [object]. what should I do to correct this error?

RunningApplicationsProbe_536f5e6810eaece0 { PROBE: 'edu.mit.media.funf.probe.builtin.RunningApplicationsProbe', RUNNING_TASKS: [ { baseActivity: [Object], topActivity: [Object], numRunning: 2, numActivities: 2, id: 115 }, { baseActivity: [Object], topActivity: [Object], numRunning: 1, numActivities: 1, id: 3 }, { baseActivity: [Object], topActivity: [Object], numRunning: 1, numActivities: 1, id: 58 }, { baseActivity: [Object], topActivity: [Object], numRunning: 1, numActivities: 1, id: 11 }, { baseActivity: [Object], topActivity: [Object], numRunning: 0, numActivities: 1, id: 72 }, { baseActivity: [Object], topActivity: [Object], numRunning: 1, numActivities: 1, id: 6 }, { baseActivity: [Object], topActivity: [Object], numRunning: 0, numActivities: 1, id: 38 }, { baseActivity: [Object], topActivity: [Object], numRunning: 0, numActivities: 1, id: 69 }, { baseActivity: [Object], topActivity: [Object], numRunning: 0, numActivities: 1, id: 67 }, { baseActivity: [Object], topActivity: [Object], numRunning: 1, numActivities: 1, id: 15 }, { baseActivity: [Object], topActivity: [Object], numRunning: 0, numActivities: 2, id: 10 }, { baseActivity: [Object], topActivity: [Object], numRunning: 0, numActivities: 2, id: 57 }, { baseActivity: [Object], topActivity: [Object], numRunning: 0, numActivities: 1, id: 54 }, { baseActivity: [Object], topActivity: [Object], numRunning: 0, numActivities: 1, id: 40 } ], Device_ID: '536f5e6810eaece0', TIMESTAMP: 1393487391, WoTK_ID: 'thoriqsalafi' }

C:\server2\routes\realtime.js:107

    if(typeof data[index_lv1][index_lv2][index_lv3] === 'object'){

                                      ^

TypeError: Cannot read property 'mClass' of undefined at C:\server2\routes\realtime.js:107:48 at fn (C:\server2\node_modules\async\lib\async.js:568:34) at C:\server2\node_modules\async\lib\async.js:484:34 at process._tickCallback (node.js:415:13)

thank you coffeejack!

CoffeeJack commented 10 years ago

I think you have to preprocess the data prior to sending the HTTP request to the handler on the Android app.