Skip to content

Instantly share code, notes, and snippets.

@stephentcannon
Created May 18, 2012 11:12
Show Gist options
  • Save stephentcannon/2724719 to your computer and use it in GitHub Desktop.
Save stephentcannon/2724719 to your computer and use it in GitHub Desktop.
Meteor collection maximum call stack size exceeded
var key = CryptoJS.AES.encrypt('test', 'password');
console.log('key: ' + key);
id = MyCollection.insert({
created: new Date(),
expires: expires,
key: key
}, function(error, result){
console.log('error: ' + error);
console.log('result: ' + error);
});
console.log('insert id: ' + id);
output
key: U2FsdGVkX19NKsbjzfYTIgnV3PTqino6T1ruL4WjgIQ=
error: RangeError: Maximum call stack size exceeded
result: RangeError: Maximum call stack size exceeded
insert id: null
@rkgomekar
Copy link

use key.toString() in your insert query ->
id = MyCollection.insert({
created: new Date(),
expires: expires,
key: key.toString()
}, function(error, result){
console.log('error: ' + error);
console.log('result: ' + error);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment