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

Improve logging message when copying database using a wrong encryption key

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Critical
    • 3.0
    • 3.0
    • LiteCore
    • Security Level: Public
    • None
    • Pasin 58
    • 2

    Description

      This is originated from https://issues.couchbase.com/browse/CBL-2319. If possible, we could improve the error message in the log. For example, we could say that the copied database cannot be open as the given encryption key is wrong or mismatch with the encryption key of the original database.

      2021-09-20 16:52:39.275545-0700 xctest[18383:27484333] CouchbaseLite Database Info: Opening CBLDatabase[testdb] at path /Users/pasin/Library/Developer/CoreSimulator/Devices/5EF60A69-78C4-4FE2-8EBA-9BC5BA4E6794/data/tmp/CouchbaseLite-EE/testdb.cblite2
      2021-09-20 16:52:39.281656-0700 xctest[18383:27484333] CouchbaseLite Database Info: {DB#1}==> litecore::SQLiteDataFile /Users/pasin/Library/Developer/CoreSimulator/Devices/5EF60A69-78C4-4FE2-8EBA-9BC5BA4E6794/data/tmp/CouchbaseLite-EE/testdb.cblite2/db.sqlite3 @0x612000054c40
      2021-09-20 16:52:39.282221-0700 xctest[18383:27484333] CouchbaseLite Database Info: {DB#1} Opening database
      2021-09-20 16:52:39.319962-0700 xctest[18383:27484333] CouchbaseLite Database Info: {CollectionImpl#2}==> litecore::CollectionImpl testdb/_default @0x60b00002c490
      2021-09-20 16:52:39.320348-0700 xctest[18383:27484333] CouchbaseLite Database Info: {CollectionImpl#2} Instantiated
      2021-09-20 16:52:39.422910-0700 xctest[18383:27484333] CouchbaseLite Database Info: Copying prebuilt database from /Users/pasin/Library/Developer/CoreSimulator/Devices/5EF60A69-78C4-4FE2-8EBA-9BC5BA4E6794/data/tmp/CouchbaseLite-EE/testdb.cblite2/ to /Users/pasin/Library/Developer/CoreSimulator/Devices/5EF60A69-78C4-4FE2-8EBA-9BC5BA4E6794/data/tmp/CouchbaseLite-EE/nudb.cblite2
      2021-09-20 16:52:39.429935-0700 xctest[18383:27484333] CouchbaseLite Database Info: {DB#3}==> litecore::SQLiteDataFile /Users/pasin/Library/Developer/CoreSimulator/Devices/5EF60A69-78C4-4FE2-8EBA-9BC5BA4E6794/data/tmp/CouchbaseLite-EE/.cblite/OsQi7B/db.sqlite3 @0x6120000610c0
      2021-09-20 16:52:39.430464-0700 xctest[18383:27484333] CouchbaseLite Database Info: {DB#3} Opening database
      2021-09-20 16:52:39.434310-0700 xctest[18383:27484333] CouchbaseLite Database ERROR: SQLite error (code 26): file is not a database in "SELECT count(*) FROM sqlite_master"
      2021-09-20 16:52:39.434624-0700 xctest[18383:27484333] CouchbaseLite Database ERROR: {DB#3} Could not decrypt database with AES256
      2021-09-20 16:52:39.434983-0700 xctest[18383:27484333] CouchbaseLite Database Info: {DB#3} Retrying decryption with AES128...
      2021-09-20 16:52:39.437663-0700 xctest[18383:27484333] CouchbaseLite Database ERROR: SQLite error (code 26): file is not a database in "SELECT count(*) FROM sqlite_master"
      2021-09-20 16:52:39.437943-0700 xctest[18383:27484333] CouchbaseLite Database ERROR: {DB#3} Could not decrypt database with AES128
      

       

      Attachments

        Issue Links

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

          Activity

            People

              pasin Pasin Suriyentrakorn
              pasin Pasin Suriyentrakorn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty