Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-859

ChangeEncryptionKey() and save document after creating a brand new Database throws CouchbaseLiteException (SQLiteDomain / 21): bad parameter or other API misuse.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.8.0
    • 2.5.3
    • LiteCore
    • Security Level: Public
    • None

    Description

      Was able to repro the issue on .NetCore unit test. Before running the test case, database cannot be existed.

      public void TestChangeEncryptionKeyNSaveDocOnNewDB()
              {
                  var config = new DatabaseConfiguration {
                      Directory = Directory
                  };            using (var db1 = new Database("master3", config)) {
                      db1.ChangeEncryptionKey(new EncryptionKey("password")); // setting encryption key on the database file, the database file didn't exist yet in this case
                      using (MutableDocument saveDoc = db1.GetDocument("my-doc")?.ToMutable() ?? new MutableDocument("my-doc")) {
                          saveDoc.SetString("prop", "value");
                          db1.Save(saveDoc);
                      }
                  }
              }
      

       

      Attachments

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

        Activity

          People

            jimb Jim Borden
            sandy.chuang Sandy Chuang (Inactive)
            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