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
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 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

            Build couchbase-lite-net-3.1.0-17 contains couchbase-lite-core commit b4d47c2 with commit message:
            CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-net-3.1.0-17 contains couchbase-lite-core commit b4d47c2 with commit message: CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            Build couchbase-lite-android-3.0.0-182 contains couchbase-lite-core commit 1c86dfe with commit message:
            CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-android-3.0.0-182 contains couchbase-lite-core commit 1c86dfe with commit message: CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            Build couchbase-lite-java-3.0.0-183 contains couchbase-lite-core commit 1c86dfe with commit message:
            CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-java-3.0.0-183 contains couchbase-lite-core commit 1c86dfe with commit message: CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            Build couchbase-lite-android-3.1.0-77 contains couchbase-lite-core commit b4d47c2 with commit message:
            CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-android-3.1.0-77 contains couchbase-lite-core commit b4d47c2 with commit message: CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            Build couchbase-lite-java-3.1.0-77 contains couchbase-lite-core commit b4d47c2 with commit message:
            CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-java-3.1.0-77 contains couchbase-lite-core commit b4d47c2 with commit message: CBL-2379 : Add warning when copy db failed as wrong enc key (#1283)

            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