Ditto_replicate error processing inserts from changelog

Hey guys,

I noticed that one of my passwords that I recently changed isn’t correct (it’s showing the older password) on the desktop version, although I have the correct password on the iOS version.

When I try to sync, I get the following error message:

ditto_replicate error processing inserts from changelog

The desktop version stops syncing at that point, but my iPhone hangs.

I’m using the most recent versions of all operating systems and program updates on both devices. I’m gonna try restarting both devices to see if that helps, but if not, any assistance would be appreciated.

Hi @Overpanic,

Thank you for using Codebook and for posting on discuss, although I’m sorry to hear about the ditto_replicate issue during sync. This error points to corruption within the table that’s used to “smartly” track and exchange changes between Codebook clients during the sync process.

Could I ask if one of your devices is most up-to-date (i.e. has all the most recent changes you’ve made to your Codebook data on it)?

The reason I ask, is because if there is, the easiest way to resolve this issue would be to replace all other database with this most up-to-date database which will “skip over” this issue.

It sounds as if you’re using Desktop WiFi sync – is that correct? And you mentioned that the correct password is on the iOS version, is your iOS version the most up-to-date?

If that’s the case, here are the steps I would recommend taking:

  1. Manually take a backup of your Desktop database (as an added precaution just in case we end up overwriting it and then you realize that there was something on there that hadn’t been synced). – On Codebook for Mac you can take a backup through File > Backups > Backup, On Codebook for Windows you can take a backup through File > Database Info > Backups tab > Backup now.
  2. On your iPhone, visit the sync view, set the operation to “Overwrite” the mode to “Desktop WiFi” and select your Desktop, then tap start – This will replace your Desktop database with your iPhone database.
  3. After the overwrite is complete, switch the operation back to sync, try making a test change to both Codebook for Desktop and Codebook for iOS and ensure that you’re able to perform a regular sync operation without the error anymore.

Do you use Codebook on any additional devices as well? I can provide further instructions for overwriting other devices depending on which sync method you’re using if needed.

Let me know if these steps allow you to sync properly again, and if you have any further questions along the way. Thanks!

Cheers,
Micah

Thanks for the quick reply! Yes, that seems to have worked - the version on my phone was the most up-to-date, and I’ve been able to successfully overwrite the desktop version. Subsequent test sync seems to be working well again with no problems.

@Overpanic

Excellent news. Please feel free to reach out again if you have any further questions, issues, or feedback.

Have a nice day!

Cheers,
Micah

I just got the same error and had to overwrite the database stored on google drive. For a couple of days I had to use a poor wifi connection. I assume that syncing over the poor connection broke the database somehow. I would have expected that some kind of hash sums are in place to prevent creation of corrupt databases. Maybe the authors can take a look into this and include syncing over poor connection in their tests?

Hi @wgerlach

I’m sorry to hear about the behavior you experienced. We would be happy to help troubleshoot the situation further, would you mind reaching out to us directly at support@zetetic.net to provide a bit more information? Thanks!