data.aggregate(query) error

Thread is closed for posting
3 posts, 1 answers
  1. Ignacio
    Ignacio avatar
    21 posts
    Member since:
    Feb 2013

    Posted 23 Jan 2017 Link to this post

    Hi there,

    My function nFac() don't works because I have changed the permissions of the table servicios to Private, returning this error:

    {"message":"READ access on type 'servicios' denied for anonymous user.","code":603}

    My code:


    function nFac() {
        var el = new Everlive('');
        var data ='servicios');
        var query = new Everlive.AggregateQuery();
        query.sum('registro', 'fra'); 
        return data.aggregate(query)
            .then(function(data) {
                    var s = JSON.stringify(data);
                    var j = JSON.parse(s);
                    return j.result[0].fra;
                function(error) {

  2. Answer
    Preslav avatar
    503 posts

    Posted 26 Jan 2017 Link to this post

    Hello Ignacio,

    Generally speaking, you should have only one instance of Everlive in an app.

    This faulty behavior happens because the server cannot find any logged in users in the instance created in the nFac function. In order to fix this, you will need to aggregate the data for the servicios table from the same instance of the Everlive where the user is logged in. In other words, do not create a new instance of Everlive in the nFac function and use the one with the user.

    Additionally, I'd suggest checking our Data and Authentication Hybrid tutorial. In this tutorial, you will create an app with a private list of groceries for the registered users.

    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Ignacio
    Ignacio avatar
    21 posts
    Member since:
    Feb 2013

    Posted 27 Jan 2017 in reply to Preslav Link to this post

    Thank you !
Back to Top