Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2551

GetAllBucketsAsync always throws ArgumentNullException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.5
    • 3.0.1
    • None
    • None
    • Windows, .NET Core
    • 1

    Description

      Summary: GetAllBucketsAsync always throws a "Value cannot be null" exception.

      Repro: See code sample:

      using System;
      using System.Threading.Tasks;
      using Couchbase;

      namespace DeleteMe
      {
      class Program
      {
      static async Task Main(string[] args)
      {
      var cluster = await Cluster.ConnectAsync("couchbase://localhost", "Administrator", "password");

      var buckets = await cluster.Buckets.GetAllBucketsAsync();

      foreach (var bucket in buckets)

      { Console.WriteLine(bucket.Key + " " + bucket.Value); }

      await cluster.DisposeAsync();
      }
      }
      }

       

      Expected: I have 3 buckets running in the cluster, it should return information about them.

      Actual: Exception. See stack trace:

      Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'value')
      at Newtonsoft.Json.Utilities.ValidationUtils.ArgumentNotNull(Object value, String parameterName)
      at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
      at Newtonsoft.Json.Linq.Extensions.Value[U](IEnumerable`1 value)
      at Couchbase.Management.Buckets.BucketManager.GetBucketSettings(JToken json)
      at Couchbase.Management.Buckets.BucketManager.GetAllBucketsAsync(GetAllBucketsOptions options)
      at DeleteMe.Program.Main(String[] args) in C:\zproj\DeleteMe\DeleteMe\Program.cs:line 13
      at DeleteMe.Program.<Main>(String[] args)

      C:\zproj\DeleteMe\DeleteMe\bin\Debug\netcoreapp3.1\DeleteMe.exe (process 31576) exited with code -532462766.
      Press any key to close this window . . .

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jmorris Jeff Morris
              matthew.groves Matthew Groves
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty