Sync fails to iOS Codebook when new note added to macOS version

#1

I just added a note with several entries to the macOS version of Codebook and then synced from my iOS device with the two devices connected via the iPhone’s Personal Hotspot WiFi (The WiFi in the building here at work doesn’t allow me to sync the two devices via the same WiFi network for some reason) and the note I created on the iMac in Codebook was not synced over to the iOS Codebook database of entries, despite no errors with the sync occurring.

I did this the opposite direction (added an entry via the iOS version of Codebook then synced) and the note appeared in the macOS version of Codebook as expected.

Can anyone think of a reason why the macOS to iOS syncing would be failing in this scenario?

#2

Hi @darinmarshall

Thanks for your support of Codebook and posting the disucssion forum, although I’m sorry to hear about the issue you’re experiencing.

First, a bit of background on the issue I believe is causing this: Codebook tracks changes that are made to your database along a high water mark for each replica database that you synchronize with. An issue has been identified and addressed that could cause the high water mark tracking to create a gap in sequence, thus “ignoring” changes that may have occurred during a synchronization between two Codebook instances. This issue only affected a small subset of Codebook users. We believe that your instances of Codebook are likely affected by this issue. Again, this issue has been already addressed.

There are two possible approaches for resolving this specific conflict going forward:

Merge data by manual entry:

One option is to select a single instance of Codebook to operate on, making that instance your central copy during the mergring process. This will require you to review the data on each other install of Codebook and recreate the missing entries/data. Once this single instance of Codebook contains all the correct data, you’ll want to replaces= the other instance’s data with the central copy’s (by either performing an overwrite or restore depending on which platform you used as the central copy).

If you typically use one platform to enter most of your data on, I would recommend making this the central copy as it should require the fewest additions.

Merge datra by export to CSV

Another option is to utilize the CSV export option included with Codebook on the desktop. You will need to export each instance of Codebook to separate CSV files, then create a single merged CSV file representing all data elements across your Codebook instances. Once all data is located in a single CSV file, we can prepare Codebook for the import.

I’ll be happy to provide further details on either of these options.

You mentioned Codebook for iOS and Codebook for macOS, how many devices are you using Codebook on?

Again, I’m very sorry for this difficulty. We try very hard to make sure we have fully tested and verified behavior of the application prior to releasing it the public. We have utilized this synchronization system within Codebook for many years successfully, yet we appologize for the defect you were affected by.

Please let me know which option you’d like to proceed with, and if you have any further questions. Thanks!

#3

I have an instance on my iOS device and then one instance on my work iMac at Apple and another instance on my personal/work use MacBook Pro I carry with me back and forth from home to work, etc.

#4

Thanks for the response, from your initial description, it sounds as if the iPhone may be the device that’s afflicted by the “gap” issue mentioned previously.

Let’s first try to confirm that the two macOS devices are properly synced up by following these steps on each macOS device:

  1. Open and unlock Codebook for macOS
  2. Run Integrity Check under File > Integrity Check.
  3. View your database info under File > Database Info and make note of the number of Categories, Entries, and Fields.
  4. Compare the data from number 2 between the two macOS devices, if they match then my assumption above is most likely correct (the iPhone devices has the “gap”). If the two numbers don’t match, make note of which device has the greater number.

Now we can determine how many entries are present on your iPhone device, that aren’t present on your macOS device:

  1. Open and unlock Codebook for iOS.
  2. Run Integrity Check by going to Go to More > Settings > Perform Integrity Check
  3. Go to More > Settings > Database Info and note the number of Categories, Entries, and Fields.
  4. Compare that number to what you have on macOS. If the numbers aren’t that far off, then most likely the manual entry method is the way to go (i.e. there isn’t much data from the “gap” where Codebook data from iOS wasn’t properly propagating to Codebook for macOS). If the numbers have a greater discrepancy, then it’s probably best to use the CSV merge method.

Let me know the results when you have a chance, once we determine the best method to use I can provide more specific instructions.

#5

I ran the Integrity Check option and my macOS version indicated that there was one orphaned item and it was the one I was missing in the iMac at work’s database. The macOS version said it was just Unfiled so, I moved it to the Notes folder.

I’ll give the Codebook db at work a shot tomorrow when I’m in the office and see what shakes out. Thank you for your assistance.

#6

@darinmarshall

Thanks for getting back to me. Because the record showed up after Integrity Check, this most likely indicates that you weren’t affected by the “gap” issue referenced above.

Typically an “orphaned” record means that a record exists in your database that isn’t associated with a category that exists. This can occur in a couple of different scenarios – here’s an example of one of those scenarios:

  1. You create a new note “Note123” on iOS in the “Notes” category.
  2. You delete the “Notes” category on macOS.
  3. You sync between the two.

After the above scenario, when we exchange changes the new note, “Note123” is added to macOS, but since the “Notes” category no longer exists it doesn’t have a place to display it in the interface and it is now orphaned (doesn’t belong to an existing category). Codebook’s sync mechanism does it’s best to preserve these records because it’s sort of in a “Don’t Know” scenario – i.e. doesn’t know whether the user intended to also delete that newly created record (“Note123”) or not, so we err on the side of caution and persist it.

If you could, after you confirm the record shows up on your other macOS copy of Codebook after Integrity Check, could you try creating a test note on Codebook for iOS (within the same category that this other one that didn’t sync was created) and attempt to sync and see if it comes over alright?

Thanks!