Created
May 18, 2012 11:12
-
-
Save stephentcannon/2724719 to your computer and use it in GitHub Desktop.
Meteor collection maximum call stack size exceeded
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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);
});