Codebook Sync Failure

I have been using Codebook (previously Strip) for a while now on my Mac computers and iPhone and iPad. I sync using dropbox and use wired connections for the Mac and wireless/3g for the mobile devices. All devices now fail to sync and I get different errors but this seems to be the most common “A database error occurred, sync cannot continue. Your data has not been altered. Error: ditto_replicate error appending unseen changelog recorts to ditto_log INSERT INTO ditto_log SELECT l.* FROM %s.ditto_log l INNER JOIN ditto_reps r ON (l.rep_id = r.rep_id AND l.csn > r.csn); (err 11, ext 11, msg database disk image is malformed)”. I don’t really know what I should do as each of the devices is at a different stage of entering data, so they are not all synchronised with each other. The Macs, iphone and ipad are all running the latest OS.

Thanks for any help in advance

Hi @Tanny,

Thank you for using Codebook, and sorry to hear about these problems. You mentioned there were a few different error messages; this error, database disk image is malformed, are you getting that specific message on just one device in particular?

The other errors when you sync with Dropbox on your other devices, do they also mention ditto? If we can figure out which device or devices have good data on them we can reset the corrupted databases as necessary.

Did this start after some event like an updated to Codebook or an update to iOS? If the remote file downloaded over the network were corrupted, perhaps that is causing replication to fail. In that case, odd as it may sound, I wonder if rebooting the router in question, or connecting to Dropbox from another network changes anything?

Hi William,

Thank you for your prompt reply. The error message that I copied looks to be the same on all four devices that I use, none let me sync!

I didn’t note the other error message when it occurred but I have just tried to sync when connected to a 3G network rather than by WIFI or a wired network. In this case, I get this error instead “Error: ditto_replicate error incrementing local csn UPDATE ditto_reps SET csn = can + 1 WHERE is_local = 1; (err5, ext, 5 msg database is locked). I guess Codebook was updated a few weeks ago and the iOS update similarly- I can’t pin it down to as directly occurring after an update. I have no joy in connecting with different networks (e.g work vs home).

Thanks

David

Hi David,

Let’s try this:

  1. Open up your Dropbox folder, either on https://www.dropbox.com or locally
  2. Navigate to the Zetetic folder
  3. Locate strip.db and rename this file to something else to move it out of the way
  4. Are there any duplicate or marked as conflicted versions of the file in this folder?
  5. Start a new sync with Dropbox from one of your devices to see if strip.db is recreated successfully in Dropbox

If that works, then I’d suggest trying to sync again from your other devices. If there’s something wrong with the file out on Dropbox this should relieve the bottleneck. If not we’ll have to try something else (perhaps exporting the data on the desktop and resetting all instances, then re-importing the data.)

Hi William,

Thanks again. That seems to have worked at least with two of my devices sync ok. When I located the Zetetic folder there were three strip.db files tow of which had conflicted in their title. I guess I now know how to resolve such conflicts in the future- I am sorry to have troubled you- I should have been able to work that one out myself.

Kind regards,

David

1 Like

No problem at all, glad to hear things are back in working order!