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

Capella examples fail for SDK versions 3.3.6 & higher, works with 3.3.5

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Major
    • None
    • 3.3.6, 3.4.3
    • None
    • None
    • Capella Dev
    • 0

    Description

      When running the following code example against Capella dev environment instance, 

      the code does not work only on versions greater than 3.3.5.

      I am attaching the logs for the SDK along with their versions. 

      Code

       

      using System;
      2using System.Threading.Tasks;
      3using Couchbase;
      4using Microsoft.Extensions.Hosting;
      5using Microsoft.Extensions.Logging;
      6
      7namespace CouchbaseDotNetExample_KvGet
      8{
      9    class Program
      10    {
      11        static async Task Main(string[] args)
      12        {
      13
      14            using var loggerFactory = LoggerFactory.Create(builder =>
      15            {
      16                builder
      17                    .AddFilter("Microsoft", LogLevel.Debug)
      18                    .AddFilter("System", LogLevel.Debug)
      19                    .AddFilter("NonHostConsoleApp.Program", LogLevel.Debug)
      20                    .AddConsole();
      21            });
      22
      23            var opts = new ClusterOptions().WithCredentials("", "");
      24            opts.KvIgnoreRemoteCertificateNameMismatch = true;
      25            opts.HttpIgnoreRemoteCertificateMismatch = true;
      26            opts.WithLogging(loggerFactory);
      27            var cluster = await Cluster.ConnectAsync("couchbases://cb.equidistantpeterwegner-kjmffa.sdk.dev.nonprod-project-avengers.com", opts);
      28
      29            var bucket = await cluster.BucketAsync("equidistantpeterwegner-kjmffa");
      30            var scope = await bucket.ScopeAsync("samples");
      31            var collection = await scope.CollectionAsync("airline");
      32            var result = await collection.GetAsync("airline_10");
      33            var airline = result.ContentAs<dynamic>();
      34
      35
      36            System.Console.WriteLine(airline);
      37
      38            await cluster.DisposeAsync();
      39
      40        }
      41    }
      42}
      
      

       

      Project File

      <Project Sdk="Microsoft.NET.Sdk">
      2
      3    <PropertyGroup>
      4        <OutputType>Exe</OutputType>
      5        <TargetFramework>net6.0</TargetFramework>
      6        <ImplicitUsings>enable</ImplicitUsings>
      7        <Nullable>enable</Nullable>
      8    </PropertyGroup>
      9
      10    <ItemGroup>
      11      <PackageReference Include="CouchbaseNetClient" Version="3.3.6" />
      12      <PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
      13      <PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
      14      <PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="6.0.0" />
      15      <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
      16    </ItemGroup>
      17
      18</Project>
      19 

      Logs:

      dotnet-3.3.6.txt

      Note: This is a clone of https://couchbasecloud.atlassian.net/browse/AV-51942?focusedCommentId=164566

      Attachments

        1. CouchbaseNetClient.3.4.3.6441.nupkg
          3.36 MB
        2. debug-logs-3.3.5.txt
          216 kB
        3. debug-logs-3.3.6.txt
          459 kB
        4. debug-logs-3.4.0.txt
          451 kB
        5. debug-logs-3.4.3.txt
          100 kB
        6. debug-logs-3.4.3-6441.txt
          704 kB
        7. debug-logs-serverless-prod.txt
          964 kB
        8. dotnet-3.3.5.txt
          7 kB
        9. dotnet-3.3.6.txt
          15 kB
        10. dotnet-3.4.3.txt
          8 kB

        Issue Links

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

          Activity

            People

              jmorris Jeff Morris
              nithish.raghunandanan Nithish Raghunandanan
              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