Error" Reader is not positioned at the start of an object

My Query in Query Editor Returns successfully result in format: [ 13 ]
When I am trying to read result in C# SDK I get Error: “Reader is not positioned at the start of an object.”

I am reading result using following code:

       var result = _couchbaseCacheProvider.Query<byte?>(query, _bucketName).Result;
       return await result.FirstAsync();

where _couchbaseCacheProvider.Query is

       public async Task<IQueryResult<T>> Query<T>(string query, string bucketName)
        var cluster = await _clusterProvider.GetClusterAsync();
        var result = await cluster.QueryAsync<T>(query);

        return result;

Question: how to get value of the query when query returns RAW result of just a number?
Thank you

This bug has been identified and fixed, and will be in the next release of the SDK (available very soon I’m told).

1 Like