I am using breezejs to help manage my data. When I have changes and need to save them I call breeze.saveChanges in my datacontext the saveSucceedded callback never gets called. I get an error RangeError: Maximum call stack size exceeded. But the save is successful because the changes are persisted on the server.The saveFailed is called but there is an identical error called before this one. The callstack points to breeze but could the error come from somewhere else since the breeze data is saving?
function save(){
return manager.saveChanges()
.then(saveSucceedded)
.catch(saveFailed)
.finally(final);
function saveSucceedded(result){
console.log('Saved Data')// never gets here but data on server updates
}
function saveFailed(error){
var msg = config.appErrorPrefix + 'Save failed: ' +
breeze.saveErrorMessageService.getErrorMessage(error);
error.message = msg;
console.log(msg);
throw error;
}
function final(){
console.log('finally')
}
}
RangeError: Maximum call stack size exceeded
at http://localhost:3030/vendor/breezejs/breeze.debug.js:14571:13
at __objectForEach (http://localhost:3030/vendor/breezejs/breeze.debug.js:47:13)
at processAnonType (http://localhost:3030/vendor/breezejs/breeze.debug.js:14569:9)
at processMeta (http://localhost:3030/vendor/breezejs/breeze.debug.js:14532:24)
at visitNode (http://localhost:3030/vendor/breezejs/breeze.debug.js:14595:27)
at http://localhost:3030/vendor/breezejs/breeze.debug.js:14572:13
at __objectForEach (http://localhost:3030/vendor/breezejs/breeze.debug.js:47:13)
at processAnonType (http://localhost:3030/vendor/breezejs/breeze.debug.js:14569:9)
at processMeta (http://localhost:3030/vendor/breezejs/breeze.debug.js:14532:24)
at visitNode (http://localhost:3030/vendor/breezejs/breeze.debug.js:14595:27) ionic.bundle.js:18897
[IMA Error] Save failed: Maximum call stack size exceeded datacontext.js:128
Error: [IMA Error] Save failed: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at http://localhost:3030/vendor/breezejs/breeze.debug.js:14571:13
at __objectForEach (http://localhost:3030/vendor/breezejs/breeze.debug.js:47:13)
at processAnonType (http://localhost:3030/vendor/breezejs/breeze.debug.js:14569:9)
at processMeta (http://localhost:3030/vendor/breezejs/breeze.debug.js:14532:24)
at visitNode (http://localhost:3030/vendor/breezejs/breeze.debug.js:14595:27)
at http://localhost:3030/vendor/breezejs/breeze.debug.js:14572:13
at __objectForEach (http://localhost:3030/vendor/breezejs/breeze.debug.js:47:13)
at processAnonType (http://localhost:3030/vendor/breezejs/breeze.debug.js:14569:9)
at processMeta (http://localhost:3030/vendor/breezejs/breeze.debug.js:14532:24)
at visitNode (http://localhost:3030/vendor/breezejs/breeze.debug.js:14595:27)