I’m running basic view queries through the Node.js SDK and it’s working perfectly about 50% of the time and failing completely the rest of the time.
Have been debugging for days… can’t figure it out.
PLEASE HELP !
Environment:
Ubuntu 13.10
Couchbase 2.2.0
libcouchbase 2.2.0
Couchnode 1.1.0
Node.js v0.10.15
I’m running:
var couchbase = require(‘couchbase’);
var db = new couchbase.Connection({host:‘localhost:8091’, bucket:‘testbucket’});
var query = db.view(‘dev_test’, ‘view_all’);
query.query(function(err, results)
{
for (i in results)
console.log(results[i]);
if (err)
console.log('Error: ’ + err);
});
At least half of the time I’m getting this response:
Error: SyntaxError: Unexpected token u
Going deeper into the code it looks like this is
LCB_PROTOCOL_ERROR
Has anyone seen this, any ideas how to fix it ?
Thanks.