Access Check Failed! on ui:inputText component event after Apex call

I’ve got a really basic component which call an Apex method when we press the Enter key. However, since Spring’16, I’ve got the following warning message:

WARNING: Access Check Failed! Component.getEvent():’keyup’ of component ‘markup://ui:inputText {5:2;a}’ is not visible to ‘markup://[MyNameSpace]:TestApp {1:2;a}’.

This warning is not displayed when I enter values in my ui:inputText, but as soon as I hit Enter (and thus, call my Apex method), entering new values in the field will generate this warning.

I don’t understand why this happen, nor do I understand why it only happens after the Apex call. I feel like I’m missing something important about event management in Lightning, so I would like to understand.

I just kept the minimum here so that it’s easier to understand:

TestApp.app:

<aura:application >
    <c:TestInput />
</aura:application>

TestInput.cmp:

<aura:component controller="TestInput">
    <ui:inputText keyup="{!c.getInput}"/>    
</aura:component>

TestInputController.js:

({
    getInput : function(component, event, helper) {
        console.log(event);
        if(event.getParam('keyCode') == 13){
            console.log('OK');
            helper.getValueFromServer(component);
        }
    }
})

TestInputHelper.js:

({
    getValueFromServer : function(component) {
        var action = component.get("c.getValueFromServer");

        action.setCallback(this, function(a) {
            if (a.getState() === "SUCCESS") {
                console.log('Callout OK');             
            }  
        });
        $A.enqueueAction(action);
    }
})

TestInput.apxc:

public class TestInput {
    @AuraEnabled
    public static String getValueFromServer() {
        return 'hello';
    }
}

If anyone understands, thanks in advance for the explanation.

Answer

The keyup event is inherited from the uiEvents interface as is access="GLOBAL" so I think this might be a bug in the access checks logic. I’m pulling in the folks that implemented client side access checks for their help now.

Attribution
Source : Link , Question Author : Fabien Taillon , Answer Author : Ratan Paul

Leave a Comment