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

Connstr not taking username properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.1
    • None
    • library
    • None
    • 1

    Description

      Using what I think is valid initialization code, and from what I see in the connection string parser, this should work:

                  var config = new ClusterOptions()
                  {
                      Password = "letmein"
                  };
       
                  config.WithConnectionString("couchbase://ingenthr@192.168.1.211?MaxHttpConnections=32");
       
                  cluster = await Cluster.ConnectAsync(config);
      

      But it fails, and I don't see any unit tests to verify it:

      There was an exception: System.AggregateException: One or more errors occurred. (Username and password are required.)
       ---> Couchbase.InvalidConfigurationException: Username and password are required.
         at Couchbase.Cluster..ctor(ClusterOptions clusterOptions) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Cluster.cs:line 66
         at Couchbase.Cluster.ConnectAsync(ClusterOptions options) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Cluster.cs:line 119
         at couchbase_net_testproj.Program.Initialize() in /Users/ingenthr/src/couchbase-net-testproj/Program.cs:line 58
      

      Debugging in saw that username was indeed null, when it is in the connstr.

      Attachments

        Issue Links

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

          Activity

            People

              richard.ponton Richard Ponton
              ingenthr Matt Ingenthron
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty