Meteor: RangeError: Maximum call stack size exceeded

I am getting the following error

W20141210-18:14:54.394(5.5)? (STDERR) 
W20141210-18:14:54.395(5.5)? (STDERR) /Users/removed/.meteor/packages/meteor-tool/.
W20141210-18:14:54.395(5.5)? (STDERR)                       throw(ex);
W20141210-18:14:54.395(5.5)? (STDERR)                             ^
W20141210-18:14:54.396(5.5)? (STDERR) RangeError: Maximum call stack size exceeded
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.

When I am using meteor methods to return a query result.

    rquery: function(post){
        var result = AdvtColl.find();
        return result;



You can't return a cursor from a method - only EJSON. In your code, result is the result of a find call, which is a cursor - you need to either use findOne or add fetch() after the find() to return the document(s) in question.

var result = AdvtColl.findOne(); // RETURNS A DOCUMENT

var result = AdvtColl.find().fetch(); // RETURNS AN ARRAY OF DOCS (EVEN IF THERE'S ONLY ONE OF THEM)


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.