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

Custom Conflict resolution is throwing exception for iOS app when trying to resolve conflict

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.6.0
    • iOS
    • Security Level: Public
    • iOS, emulator iPhone-8-plus
    • Critical

    Description

      Custom Conflict resolution is throwing exception for iOS app when trying to resolve conflict

      Steps to reproduce the issue -
      1. Checkout https://github.com/couchbaselabs/mobile-testkit.git
      2. Checkout branch - feature/cbl-2.6-custom-conflict
      3. Deploy iOS app using Xcode for build 2.6.0-137. (latestbuild app will not have CCR changes, so deploy locally built app )
      4. Run the test -
      pytest -rsx -s --skip-provisioning --timeout 3600 --liteserv-version=2.6.0-137 --liteserv-host=localhost --liteserv-port=8080 --no-conflicts --enable-file-logging --delta-sync --sync-gateway-version=2.5.0 --mode=cc --server-version=6.0.1-2037 --liteserv-platform=ios --create-db-per-test=cbl-test -k test_local_wins_custom_conflicts["pull"] testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_custom_conflicts.py

      CCR API code is available at - https://github.com/couchbaselabs/mobile-testkit/blob/feature/cbl-2.6-custom-conflict/CBLClient/Apps/CBLTestServer-iOS/CBLTestServer-iOS/Server/ReplicatorConfigurationRequestHandler.swift#L278

      Attachments

        1. cbl_client_ios.log
          163 kB
        2. logs1562687183.603713.zip
          14 kB
        3. Screenshot 2019-07-09 21.14.15.png
          Screenshot 2019-07-09 21.14.15.png
          2.37 MB
        4. stacktrace.png
          stacktrace.png
          1.60 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          hemant.rajput Hemant Rajput created issue -
          hemant.rajput Hemant Rajput made changes -
          Field Original Value New Value
          Description Custom Conflict resolution is throwing exception for iOS app when trying to resolve conflict

          Steps to reproduce the issue -
          1. Checkout https://github.com/couchbaselabs/mobile-testkit.git
          2. Checkout branch - feature/cbl-2.6-custom-conflict
          3. Deploy iOS app using Xcode for build 2.6.0-137. (latestbuild app will not have CCR changes, so deploy locally built app )
          4. Run the test -
          pytest -rsx -s --skip-provisioning --timeout 3600 --liteserv-version=2.6.0-137 --liteserv-host=localhost --liteserv-port=8080 --no-conflicts --enable-file-logging --delta-sync --sync-gateway-version=2.5.0 --mode=cc --server-version=6.0.1-2037 --liteserv-platform=ios --create-db-per-test=cbl-test -k test_local_wins_custom_conflicts["pull"] testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_custom_conflicts.py
          Custom Conflict resolution is throwing exception for iOS app when trying to resolve conflict

          Steps to reproduce the issue -
          1. Checkout https://github.com/couchbaselabs/mobile-testkit.git
          2. Checkout branch - feature/cbl-2.6-custom-conflict
          3. Deploy iOS app using Xcode for build 2.6.0-137. (latestbuild app will not have CCR changes, so deploy locally built app )
          4. Run the test -
          pytest -rsx -s --skip-provisioning --timeout 3600 --liteserv-version=2.6.0-137 --liteserv-host=localhost --liteserv-port=8080 --no-conflicts --enable-file-logging --delta-sync --sync-gateway-version=2.5.0 --mode=cc --server-version=6.0.1-2037 --liteserv-platform=ios --create-db-per-test=cbl-test -k test_local_wins_custom_conflicts["pull"] testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_custom_conflicts.py


          CCR API code is available at - https://github.com/couchbaselabs/mobile-testkit/blob/feature/cbl-2.6-custom-conflict/CBLClient/Apps/CBLTestServer-iOS/CBLTestServer-iOS/Server/ReplicatorConfigurationRequestHandler.swift#L278
          daniel.petersen Daniel Petersen made changes -
          Assignee The Lite [ cbgto ] Pasin Suriyentrakorn [ pasin ]
          daniel.petersen Daniel Petersen made changes -
          Assignee Pasin Suriyentrakorn [ pasin ] Jayahari Vavachan [ jayahari.vavachan ]
          Jayahari.Vavachan Jay Vavachan added a comment - - edited

          Hi Hemant,

          Could you please check the below questions?

          • delta sync disabled vs enabled. is it failing when disabled delta sync?
          • What about the ObjC test?
          • is it passing before 2.6.0(137).
          • what about the default conflict resolver? is it failing?
          Jayahari.Vavachan Jay Vavachan added a comment - - edited Hi Hemant, Could you please check the below questions? delta sync disabled vs enabled. is it failing when disabled delta sync? What about the ObjC test? is it passing before 2.6.0(137). what about the default conflict resolver? is it failing?
          hemant.rajput Hemant Rajput added a comment - - edited

          >>delta sync disabled vs enabled. is it failing when disabled delta sync?
          Yes, it's failing with delta_sync disabled

          >> What about the ObjC test?
          We don't have ObjC app. We don't do any testing for ObjC code

          >> is it passing before 2.6.0(137).
          Tried with build 2.6.0-135. It's failing with this build too.

          >> what about the default conflict resolver? is it failing?
          Default config resolver is not throwing any error and tests are passing for default config

          hemant.rajput Hemant Rajput added a comment - - edited >>delta sync disabled vs enabled. is it failing when disabled delta sync? Yes, it's failing with delta_sync disabled >> What about the ObjC test? We don't have ObjC app. We don't do any testing for ObjC code >> is it passing before 2.6.0(137). Tried with build 2.6.0-135. It's failing with this build too. >> what about the default conflict resolver? is it failing? Default config resolver is not throwing any error and tests are passing for default config
          Jayahari.Vavachan Jay Vavachan made changes -
          Attachment stacktrace.png [ 70624 ]
          Jayahari.Vavachan Jay Vavachan added a comment -

          So far I can find that the CBLConflictResolverBridge class is not displayed in Hemant's stack trace but mine does.

          Jayahari.Vavachan Jay Vavachan added a comment - So far I can find that the CBLConflictResolverBridge class is not displayed in Hemant's stack trace but mine does.
          Jayahari.Vavachan Jay Vavachan added a comment -

          I am able to reproduce it with the binary. I will further analyze more on this.

          Jayahari.Vavachan Jay Vavachan added a comment - I am able to reproduce it with the binary. I will further analyze more on this.

          Build couchbase-lite-ios-2.6.0-138 contains couchbase-lite-ios commit 8581225 with commit message:
          CBL-146: fix: swift header missing issue (#2529)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-ios-2.6.0-138 contains couchbase-lite-ios commit 8581225 with commit message: CBL-146 : fix: swift header missing issue (#2529)
          Jayahari.Vavachan Jay Vavachan made changes -
          Assignee Jayahari Vavachan [ jayahari.vavachan ] Hemant Rajput [ hemant.rajput ]
          Jayahari.Vavachan Jay Vavachan added a comment -

          Hemant Rajput, can you check the latest build. we verified this fix in a local project.

          Jayahari.Vavachan Jay Vavachan added a comment - Hemant Rajput , can you check the latest build. we verified this fix in a local project.
          Jayahari.Vavachan Jay Vavachan made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Jayahari.Vavachan Jayahari.Vavachan made changes -
          Actual End 2019-07-12 12:18 (issue has been resolved)

          Tested with build 2.6.0-138, not seeing any crash.

          hemant.rajput Hemant Rajput added a comment - Tested with build 2.6.0-138, not seeing any crash.
          hemant.rajput Hemant Rajput made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            hemant.rajput Hemant Rajput
            hemant.rajput Hemant Rajput
            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