Error Parsing Failed during ViewQuery

Hi there,
I worte my view for a bucket and it work in console fine, but when I want to get result by a query,
it respond with error: [unknown error : error parsing failed].

I checked that the bucket is properly opened because when I changed bucket name for example,
I received an error bucket does not exist and authentication is also correct. I don’t know why get this error when I perform the query.

my code is as follows:

var query = ViewQuery.from('dev_report', 'byLoginDate');

self.Bucket.query(query, function(err, results) {
    if (err) {
        console.log(err);
        return callBack && callBack(err);
    }

    console.log("Successfull query");
    return callBack && callBack(null, results);
});

Can someone tell me what is wrong with my code?
thanks in advanced.

Can you post the code for the view as well?

thanks matthew for your answer.
I solved my problem. It was a misunderstanding about server address.
I’ve adjusted server address and name in “/etc/hosts” and it work fine.
thank you for your contribution, and the issue can be closed.
regards

1 Like