# Codebook Sync Failure

**URL:** https://discuss.zetetic.net/t/codebook-sync-failure/1270
**Category:** Issues
**Created:** [April 5, 2016, 8:57am UTC](https://discuss.zetetic.net/t/codebook-sync-failure/1270 "2016-04-05T08:57:54Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Tanny](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@Tanny](https://discuss.zetetic.net/u/Tanny)
#### Post date: [April 5, 2016, 8:57am UTC](https://discuss.zetetic.net/t/codebook-sync-failure/1270/1 "2016-04-05T08:57:54Z")

</div>

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

---

<div class="post-metadata">

### Author: ![wgray](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/wgray/32/843_2.png) [@wgray](https://discuss.zetetic.net/u/wgray)
#### Post date: [April 5, 2016, 2:12pm UTC](https://discuss.zetetic.net/t/codebook-sync-failure/1270/2 "2016-04-05T14:12:37Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Tanny](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@Tanny](https://discuss.zetetic.net/u/Tanny)
#### Post date: [April 5, 2016, 2:38pm UTC](https://discuss.zetetic.net/t/codebook-sync-failure/1270/3 "2016-04-05T14:38:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![wgray](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/wgray/32/843_2.png) [@wgray](https://discuss.zetetic.net/u/wgray)
#### Post date: [April 5, 2016, 4:10pm UTC](https://discuss.zetetic.net/t/codebook-sync-failure/1270/4 "2016-04-05T16:10:50Z")

</div>

Hi David,

Let’s try this:

1. Open up your Dropbox folder, either on [https://www.dropbox.com](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.)

---

<div class="post-metadata">

### Author: ![Tanny](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@Tanny](https://discuss.zetetic.net/u/Tanny)
#### Post date: [April 5, 2016, 7:54pm UTC](https://discuss.zetetic.net/t/codebook-sync-failure/1270/5 "2016-04-05T19:54:14Z")

</div>

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

---

<div class="post-metadata">

### Author: ![wgray](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/wgray/32/843_2.png) [@wgray](https://discuss.zetetic.net/u/wgray)
#### Post date: [April 5, 2016, 9:06pm UTC](https://discuss.zetetic.net/t/codebook-sync-failure/1270/6 "2016-04-05T21:06:00Z")

</div>

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