NullRefException on GetView()

when I trying execute next code
couchbaseClient.GetView(“view”, “view”).Stale(StaleMode.False).ToArray();
I getting next error:
Object reference not set to an instance of an object.
at Couchbase.CouchbasePool.Enyim.Caching.Memcached.IServerPool.GetWorkingNodes()
at Couchbase.CouchbaseClient.Couchbase.IHttpClientLocator.Locate(String designDocument)
at Couchbase.CouchbaseViewHandler.GetResponse(IDictionary2 viewParams) at Couchbase.CouchbaseViewHandler.<TransformResults>d__01.MoveNext()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)

I can’t understand what happened because this is code worked for a few years. But after reinstall OS all stuff with .net SDK not working at all.

Hi Retto -

A couple of things to consider:

  • Does the design doc and view exist?
  • Can you run them in the Couchbase Server Manager?
  • Are they published or in development? Is your client using the correct documentNameTransformer?

Check on those and see if it resolves the issue.


It was something strange. Re-creating password of bucket helped fix this issue.

Glad to hear you resolved the issue :slight_smile:

  • Jeff