Closed shinank closed 11 years ago
Can you please help me to debug this? Can you please modify the SC a bit as shown below.
packages/smart-collections/lib/query.js
packages/smart-collections/lib/query.js
Can you post the logs after that. Then I can give a proper fix.
I've updated with a suggested fix. Try the latest(0.3.3) version too
0.3.3 didnt work.
I added the 2 lines to query.js. Here is the output: W20130830-21:27:20.186(-5)? (STDERR) /home/shinank/.meteor/tools/3cba50c44a/lib/nodemodules/fibers/future.js:173 W20130830-21:27:20.186(-5)? (STDERR) throw(ex); W20130830-21:27:20.187(-5)? (STDERR) ^ W20130830-21:27:20.191(-5)? (STDERR) TypeError: undefined is not a function W20130830-21:27:20.191(-5)? (STDERR) at app/lib/collections/collections.js:4:18 W20130830-21:27:20.198(-5)? (STDERR) at app/lib/collections/collections.js:11:3 W20130830-21:27:20.200(-5)? (STDERR) at mains (/home/shinank/meteor-projects/carpool/.meteor/local/build/programs/server/boot.js:153:10) W20130830-21:27:20.200(-5)? (STDERR) at Array.forEach (native) W20130830-21:27:20.200(-5)? (STDERR) at Function..each._.forEach (/home/shinank/.meteor/tools/3cba50c44a/lib/node_modules/underscore/underscore.js:79:11) W20130830-21:27:20.200(-5)? (STDERR) at /home/shinank/meteor-projects/carpool/.meteor/local/build/programs/server/boot.js:80:5
Seems like this is, some other issue. Anyway, here the modified file with logs.
Replace packages/smart-collections/lib/query.js
with this - https://gist.github.com/arunoda/aa5aec1ff2757fa7baa9
I used that file but getting this error when i startup my app Your app is crashing. Here's the latest log.
W20130830-21:45:28.472(-5)? (STDERR) /home/shinank/.meteor/tools/3cba50c44a/lib/nodemodules/fibers/future.js:173 W20130830-21:45:28.473(-5)? (STDERR) throw(ex); W20130830-21:45:28.474(-5)? (STDERR) ^ W20130830-21:45:28.485(-5)? (STDERR) TypeError: undefined is not a function W20130830-21:45:28.486(-5)? (STDERR) at app/lib/collections/collections.js:4:18 W20130830-21:45:28.487(-5)? (STDERR) at app/lib/collections/collections.js:11:3 W20130830-21:45:28.490(-5)? (STDERR) at mains (/home/shinank/meteor-projects/carpool/.meteor/local/build/programs/server/boot.js:153:10) W20130830-21:45:28.490(-5)? (STDERR) at Array.forEach (native) W20130830-21:45:28.491(-5)? (STDERR) at Function..each._.forEach (/home/shinank/.meteor/tools/3cba50c44a/lib/node_modules/underscore/underscore.js:79:11) W20130830-21:45:28.498(-5)? (STDERR) at /home/shinank/meteor-projects/carpool/.meteor/local/build/programs/server/boot.js:80:5 => Exited with code: 1 => Your application is crashing. Waiting for file change.
I really not sure, what's happening here.
Check your spellings on your collections.js file Check Smart-Collections has been added do this also meteor add smart-collections
On Sat, Aug 31, 2013 at 8:16 AM, shinank notifications@github.com wrote:
I used that file but getting this error when i startup my app Your app is crashing. Here's the latest log.
W20130830-21:45:28.472(-5)? (STDERR) /home/shinank/.meteor/tools/3cba50c44a/lib/nodemodules/fibers/future.js:173 W20130830-21:45:28.473(-5)? (STDERR) throw(ex); W20130830-21:45:28.474(-5)? (STDERR) ^ W20130830-21:45:28.485(-5)? (STDERR) TypeError: undefined is not a function W20130830-21:45:28.486(-5)? (STDERR) at app/lib/collections/collections.js:4:18 W20130830-21:45:28.487(-5)? (STDERR) at app/lib/collections/collections.js:11:3 W20130830-21:45:28.490(-5)? (STDERR) at mains (/home/shinank/meteor-projects/carpool/.meteor/local/build/programs/server/boot.js:153:10) W20130830-21:45:28.490(-5)? (STDERR) at Array.forEach (native) W20130830-21:45:28.491(-5)? (STDERR) at Function..each._.forEach (/home/shinank/.meteor/tools/3cba50c44a/lib/node_modules/underscore/underscore.js:79:11) W20130830-21:45:28.498(-5)? (STDERR) at /home/shinank/meteor-projects/carpool/.meteor/local/build/programs/server/boot.js:80:5 => Exited with code: 1 => Your application is crashing. Waiting for file change.
— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-smart-collections/issues/26#issuecomment-23599369 .
Arunoda Susiripala
@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda
Ok Sorry for the trouble. I had several isses on my end.
Here is the output: [34mI20130831-07:51:28.589(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.589(-5)? [39m { _fields: undefined, [34mI20130831-07:51:28.589(-5)? [39m _callbacks: { added: [Function], changed: [Function], removed: [Function] } }, [34mI20130831-07:51:28.589(-5)? [39m callback: [Function: afterAdded] } [34mI20130831-07:51:28.589(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.589(-5)? [39m { _fields: undefined, [34mI20130831-07:51:28.589(-5)? [39m _callbacks: { added: [Function], changed: [Function], removed: [Function] } }, [34mI20130831-07:51:28.589(-5)? [39m callback: [Function: afterAdded] } [34mI20130831-07:51:28.590(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.590(-5)? [39m { _fields: undefined, [34mI20130831-07:51:28.590(-5)? [39m _callbacks: { added: [Function], changed: [Function], removed: [Function] } }, [34mI20130831-07:51:28.590(-5)? [39m callback: [Function: afterAdded] } [34mI20130831-07:51:28.591(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.591(-5)? [39m { _fields: undefined, [34mI20130831-07:51:28.591(-5)? [39m _callbacks: { added: [Function], changed: [Function], removed: [Function] } }, [34mI20130831-07:51:28.591(-5)? [39m callback: [Function: afterAdded] } [34mW20130831-07:51:28.592(-5)? (STDERR) [39m[35mevents.js:71[39m [34mW20130831-07:51:28.592(-5)? (STDERR) [39m[35m throw arguments[1]; // Unhandled 'error' event[39m [34mW20130831-07:51:28.592(-5)? (STDERR) [39m[35m ^[39m [34mW20130831-07:51:28.597(-5)? (STDERR) [39m[35mTypeError: Cannot call method 'changed' of undefined[39m [34mW20130831-07:51:28.597(-5)? (STDERR) [39m[35m at Query._rawChanged.cachedDoc (packages/smart-collections/lib/query.js:134)[39m [34mW20130831-07:51:28.597(-5)? (STDERR) [39m[35m at Array.forEach (native)[39m [34mW20130831-07:51:28.598(-5)? (STDERR) [39m[35m at Query._rawChanged (packages/smart-collections/lib/query.js:133)[39m [34mW20130831-07:51:28.598(-5)? (STDERR) [39m[35m at Query.snapshot (packages/smart-collections/lib/query.js:207)[39m [34mW20130831-07:51:28.598(-5)? (STDERR) [39m[35m at Cursor.each (/home/shinank/meteor-projects/carpool/packages/smart-collections/.build/npm/node_modules/mongodb/lib/mongodb/cursor.js:244:9)[39m [34mW20130831-07:51:28.598(-5)? (STDERR) [39m[35m at Cursor.nextObject (/home/shinank/meteor-projects/carpool/packages/smart-collections/.build/npm/node_modules/mongodb/lib/mongodb/cursor.js:678:5)[39m [34mW20130831-07:51:28.598(-5)? (STDERR) [39m[35m at Cursor.nextObject.commandHandler (/home/shinank/meteor-projects/carpool/packages/smart-collections/.build/npm/node_modules/mongodb/lib/mongodb/cursor.js:658:14)[39m [34mW20130831-07:51:28.599(-5)? (STDERR) [39m[35m at Db._executeQueryCommand (/home/shinank/meteor-projects/carpool/packages/smart-collections/.build/npm/node_modules/mongodb/lib/mongodb/db.js:1670:9)[39m [34mW20130831-07:51:28.600(-5)? (STDERR) [39m[35m at Server.Base._callHandler (/home/shinank/meteor-projects/carpool/packages/smart-collections/.build/npm/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)[39m [34mW20130831-07:51:28.600(-5)? (STDERR) [39m[35m at Server.connect.connectionPool.on.server._serverState (/home/shinank/meteor-projects/carpool/packages/smart-collections/.build/npm/node_modules/mongodb/lib/mongodb/connection/server.js:472:18)[39m [34mI20130831-07:51:28.607(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.608(-5)? [39m { _fields: undefined, [34mI20130831-07:51:28.608(-5)? [39m _callbacks: { added: [Function], changed: [Function], removed: [Function] } }, [34mI20130831-07:51:28.609(-5)? [39m callback: [Function: afterAdded] } [34mI20130831-07:51:28.611(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.612(-5)? [39m { _fields: undefined, [34mI20130831-07:51:28.612(-5)? [39m _callbacks: { added: [Function], changed: [Function], removed: [Function] } }, [34mI20130831-07:51:28.612(-5)? [39m callback: [Function: afterAdded] } [34mI20130831-07:51:28.613(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.613(-5)? [39m { _fields: undefined, [34mI20130831-07:51:28.618(-5)? [39m _callbacks: { added: [Function], changed: [Function], removed: [Function] } }, [34mI20130831-07:51:28.619(-5)? [39m callback: [Function: afterAdded] } [34mI20130831-07:51:28.621(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.621(-5)? [39m { _fields: undefined, [34mI20130831-07:51:28.621(-5)? [39m _callbacks: { added: [Function], changed: [Function], removed: [Function] } }, [34mI20130831-07:51:28.624(-5)? [39m callback: [Function: afterAdded] } [34mI20130831-07:51:28.624(-5)? [39mLOOP { observer: [34mI20130831-07:51:28.624(-5)? [39m { _fields: undefined,
I need the complete log from the start of the app. Can you please paste here and send me a link
Try this version - https://gist.github.com/arunoda/4bcdad426d58542914a0 for the query.js
That worked perfectly. No more errors in the log. Thanks!
Cool. I'll merge this fix in a release :)
On Sun, Sep 1, 2013 at 12:57 AM, shinank notifications@github.com wrote:
That worked perfectly. No more errors in the log. Thanks!
— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-smart-collections/issues/26#issuecomment-23612363 .
Arunoda Susiripala
@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda
released as 0.3.5
Thanks Again! I appreciate your help.
On 8/31/13, Arunoda Susiripala notifications@github.com wrote:
released as 0.3.5
Reply to this email directly or view it on GitHub: https://github.com/arunoda/meteor-smart-collections/issues/26#issuecomment-23617385
Shinan S. Kassam
Np. It was a bug :)
On Sun, Sep 1, 2013 at 7:17 AM, shinank notifications@github.com wrote:
Thanks Again! I appreciate your help.
On 8/31/13, Arunoda Susiripala notifications@github.com wrote:
released as 0.3.5
Reply to this email directly or view it on GitHub:
https://github.com/arunoda/meteor-smart-collections/issues/26#issuecomment-23617385
Shinan S. Kassam
— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/meteor-smart-collections/issues/26#issuecomment-23617442 .
Arunoda Susiripala
@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda
I am getting this error when I add smart-collections to my project and configured my app to use them
W20130829-22:19:39.970(-5)? (STDERR) events.js:71 W20130829-22:19:40.084(-5)? (STDERR) throw arguments[1]; // Unhandled 'error' event W20130829-22:19:40.084(-5)? (STDERR) ^ W20130829-22:19:40.085(-5)? (STDERR) TypeError: Cannot call method 'added' of undefined W20130829-22:19:40.087(-5)? (STDERR) at Query.snapshot (packages/smart-collections/lib/query.js:200) W20130829-22:19:40.088(-5)? (STDERR) at Cursor.each (/home/shinank/.meteorite/packages/smart-collections/arunoda/meteor-smart-collections/c497bdc8fcec8bfe45b456c28822d80466f1b798/.build/npm/node_modules/mongodb/lib/mongodb/cursor.js:244:9) W20130829-22:19:40.089(-5)? (STDERR) at Cursor.nextObject (/home/shinank/.meteorite/packages/smart-collections/arunoda/meteor-smart-collections/c497bdc8fcec8bfe45b456c28822d80466f1b798/.build/npm/node_modules/mongodb/lib/mongodb/cursor.js:678:5) W20130829-22:19:40.089(-5)? (STDERR) at Cursor.nextObject.commandHandler (/home/shinank/.meteorite/packages/smart-collections/arunoda/meteor-smart-collections/c497bdc8fcec8bfe45b456c28822d80466f1b798/.build/npm/node_modules/mongodb/lib/mongodb/cursor.js:658:14) W20130829-22:19:40.089(-5)? (STDERR) at Db._executeQueryCommand (/home/shinank/.meteorite/packages/smart-collections/arunoda/meteor-smart-collections/c497bdc8fcec8bfe45b456c28822d80466f1b798/.build/npm/node_modules/mongodb/lib/mongodb/db.js:1670:9) W20130829-22:19:40.090(-5)? (STDERR) at Server.Base._callHandler (/home/shinank/.meteorite/packages/smart-collections/arunoda/meteor-smart-collections/c497bdc8fcec8bfe45b456c28822d80466f1b798/.build/npm/node_modules/mongodb/lib/mongodb/connection/base.js:382:41) W20130829-22:19:40.091(-5)? (STDERR) at Server.connect.connectionPool.on.server._serverState (/home/shinank/.meteorite/packages/smart-collections/arunoda/meteor-smart-collections/c497bdc8fcec8bfe45b456c28822d80466f1b798/.build/npm/node_modules/mongodb/lib/mongodb/connection/server.js:472:18) W20130829-22:19:40.091(-5)? (STDERR) at MongoReply.parseBody (/home/shinank/.meteorite/packages/smart-collections/arunoda/meteor-smart-collections/c497bdc8fcec8bfe45b456c28822d80466f1b798/.build/npm/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5) W20130829-22:19:40.096(-5)? (STDERR) at Server.connect.connectionPool.on.server._serverState (/home/shinank/.meteorite/packages/smart-collections/arunoda/meteor-smart-collections/c497bdc8fcec8bfe45b456c28822d80466f1b798/.build/npm/node_modules/mongodb/lib/mongodb/connection/server.js:430:20) W20130829-22:19:40.099(-5)? (STDERR) at EventEmitter.emit (events.js:96:17)