function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
agrassiagrassi 

Lightning Locker Service: Maximum call stack size exceeded on action getCallback()

Hello everyone. The third parameter bellow is a promise, that when resolved or rejected will execute a callback function. 
There I receive Maximum call stack size exceeded when Locker service is active.
 
var dataService = {
request : $A.getCallback(function(actionName, params, defer) {
    
    var componentActionName = 'c.' + actionName;
    var action = component.get(componentActionName);
    
    action.setParams(params);
    
    action.setCallback(this, function(a) {
        try {
            
            var state = a.getState();
            if (state === 'SUCCESS') {
                defer.resolve(a.getReturnValue());
            }
            else if (state === 'ERROR') {
                var errors = a.getError();
                if (errors) {
                    defer.reject(errors[0].message);
                } else {
                    defer.reject('Lightning server side unknown error');
                }
            }
        } catch (ex) {
            console.log('### Exception: ');
            console.log(ex);
        }
    });
    
    $A.enqueueAction(action);
    
})

Any idea on what might be going on?

Thanks!
Best Answer chosen by agrassi
agrassiagrassi
This has been fixed by Salesforce on SUMMER '16 PATCH 7.0

More details:

https://success.salesforce.com/issues_view?id=a1p3A000000jkqqQAA

All Answers

ftahirftahir
agrassi, are you still seeing this issue today? This week we applied a fix, I am 99% positive your issue should be fixed now.
agrassiagrassi
Hi! Sorry to disappoint, but I'm still experiencing the exact same issue. Thanks anyway!
ftahirftahir
I opened a bug for you, W-3220927 for your reference.
agrassiagrassi
Thanks ftahir. Where can I see the status of this ticket?
ftahirftahir
agrassi, you can contact support and provide them the bug number above. They will be able to check the status.

Right now the team is looking into the details and potential fix. Once the fix is identified we will release it in a weekly patch.
agrassiagrassi
This has been fixed by Salesforce on SUMMER '16 PATCH 7.0

More details:

https://success.salesforce.com/issues_view?id=a1p3A000000jkqqQAA
This was selected as the best answer