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
Ron Mccrerey 20Ron Mccrerey 20 

Lightning Container LCC.callApex Return Error

LCC.callApex('LCCController.getUser', params, this.resultHandler,
{escape: true });

 returns error Unable to invoke action 'LCCController.getUser': no controller and/or function found

Here is my Manifest.json
{
"landing-pages" : [
{
"path": "index.html",
"apex-controller": "LCCControler"
}
]
}

Here is the Controller:
global class LCCController {
    @AuraEnabled(cacheable=true)
    @RemoteAction
    global static List<User> getUser() {
        UserInfo.getUserId();
        List<User> me = new List<User>();
        me = [Select FirstName, LastName from User where Id = :UserInfo.getUserId()];
        System.debug('Out 7' + me);
        return me;
    }
}
Raj VakatiRaj Vakati
Change your apex class controller as below and remove     @RemoteAction 
 
public class LCCController {
    @AuraEnabled(cacheable=true)
    public  static List<User> getUser() {
        UserInfo.getUserId();
        List<User> me = new List<User>();
        me = [Select FirstName, LastName from User where Id = :UserInfo.getUserId()];
        System.debug('Out 7' + me);
        return me;
    }
}

 
Ron Mccrerey 20Ron Mccrerey 20
I made the change, but still get the same error.
Raj VakatiRaj Vakati
try this

 
public class LCCController {
    @AuraEnabled
    public  static List<User> getUser() {
        UserInfo.getUserId();
        List<User> me = new List<User>();
        me = [Select FirstName, LastName from User where Id = :UserInfo.getUserId()];
        System.debug('Out 7' + me);
        return me;
    }
}

 
Ron Mccrerey 20Ron Mccrerey 20
Still get same error