Search code examples
c#.net-corecouchbasenullreferenceexception.net-core-sdk

NullReferenceException inside Couchbase client 3.0 during connection


I am working on migration from .NET SDK 2.7 to .NET SDK 3.0. Couchbase server 6.0. This code throws NullReferenceException. I can't understand what I am doing wrong. I can't put the exception call stack. The site tells me that I have too much code or exception should be marked as code.

var options = new ClusterOptions()
    .WithConnectionString("http://192.168.1.120:8091") //Node's IP
    .WithCredentials("User", "Password")
    .WithBuckets("SomeBucket");
var cluster = await Cluster.ConnectAsync(options);

Solution

  • It was a problem in SDK and it was fixed in 3.0.2. But right now I am getting the same error on getting buckets. So need to wait for the new SDK version again :-)

    Update

    Some more details u can get here. Shortly. Remove the port and all will be more or less OK.