Codebook on Mac cannot access other categories

I am using Codebook 3.0.2 (326) on a Mac. When I access Codebook, all items in the category initially opened are available. I have one category that, if I move to after Codebook is open, it locks up and I cannot do anything in Codebook until I restart it.

I have attempted to re-install the database from Google Drive. It is working without a problem on my iPhone (using the same database) as well as deleting all the preferences I could find (though these were all under STRIP in the library) and deleting the software and reinstalling it. None of these overcome the problem. I do not know why this one category appears to be causing a problem, unless it is corruption in the database that is only affecting the Mac version.

Any ideas how to fix it? Is is a problem with this version of the software (there are no updates available in the App Store, which is how I installed it (and re-installed it)?

Hi @oceanic

Thanks for using Codebook. Although I’m sorry to hear about the trouble with Codebook locking up, that is very strange behavior.

Let’s try running an integrity check (File -> Integrity Check) on your database and see if it finds any issues.

If no issues are found, and you have an up to date copy of your data on Google Drive and your iPhone, let’s try getting rid of your database on your mac along with your preferences and restore from your Google Drive database.

Here are the steps to accomplish that:

  1. Close/quit Codebook if it’s open.
  2. Open Finder and Go -> Go to Folder or hit CMD+SHIFT+G then type this into the Go to Folder field: ~/Library/Containers/net.zetetic.Strip.mac/Data/Library/Application Support/Strip/
  3. Move the default.strip package out of that directory (you can just put it on your desktop for now).
  4. Open Codebook, it should prompt you to set up a master password, set it to the same master password as your iPhone’s master password (should also be the same as the password your strip.db file is encrypted with on Google Drive).
  5. Perform a sync with Google Drive.

After these steps try selecting the category again and let us know if Codebook is still unresponsive. Thanks!

Thanks for the suggestions. I followed your steps; there were no issues from the integrity check, so I deleted the default.strip file, though when restoring from Google Drive, I told it to overwrite the new default database from Google and received the warning it was going to do so. The restore process worked with no issues, but when I went back to the one troublesome category, the spinning pizza of death appeared for a while, then it crashed and sent a crash report. I started the program again and all the categories appeared to be OK apart from that one. When I switched to it, it locked again and then crashed again, so actually the behaviour has got worse (it didn’t crash before; it just locked).

Hi @oceanic

Thanks for trying those suggestions, and sorry it seemed to make things worse. Could you check your console for any error messages when the crash occurs. You can access the console by using spotlight (CMD+Spacebar) to find “console”.

I’m unsure whether this will help or not, but I could provide you with a copy of a beta version that we’re testing currently (it’s the direct version so it would show up as a trial for you, but at least we’ll know if it fixes the issue). I’ve messaged you privately with information on how to get the beta.

Could you let me know what shows up in your console log and whether the beta helps fix the issue? Thanks.

Thanks for that. In the console, it appears to be saying there is an issue with aTitle != nil. I am not sure which field is aTitle, but I can check in that category on my phone to see if anything has a blank title… If I don’t find anything, or it doesn’t fix it, I’ll try the beta. I’ll try responding to your email to send you the full console output rather than posting it here.

Just to keep the thread updated, I couldn’t find any fields that were blank. A full restore from the iPhone to the Mac via Google Drive didn’t have any success, nor did the beta version including the beta version with a complete restore of a working version of the database. Something appears to be corrupted or set up in some way that causes a problem in the database for that particular category.

Hi @oceanic

Thanks for sending over the console log, and for further explaining the steps you attempted. Sorry the beta didn’t help at all. We believe the error message is referring to a blank title getting passed to generate the Menu (the items within Codebook, File, Edit, Sync, Entry, View, Window, and Help) which is why it’s only occurring on your Mac and not your iPhone. I have a couple more suggestions for you to try:

  1. Go into the offending category on your iPhone and create a new entry named “aaaa” don’t create any fields for it. Confirm that it gets sorted to the top of the entry list within that category. Sync with Google Drive on your iPhone, then Sync with Google Drive on your Mac. Try selecting the offending category again, and see if the same stall/crash occurs.

  2. Try manually recreating the category on your Mac from the data listed on your iPhone. Is there a specific field that it freezes/crashes on after creating it? If not are you able to navigate to the category after the full re-creation is complete without it freezing or crashing?

Could you let me know the results of trying these suggestions?

Thanks for the suggestions. The first one worked. Once the new entry was created, the application stabilises. If I try and delete that new entry, it starts to crash again. I tried exporting all the data to CSV then re-importing it and that also fixes the issue, though I had to delete the first column of the exported data otherwise it refuses to import saying “Format error reading import data: Invalid EntryID 109…-2901, unable to find in local database, row: 1” with an OK button. The first column contains the EntryIDs and that matches the very first entry. The re-imported data doesn’t have the icons associated with them, and I would have to specify which data fields to hide, but could work.

I don’t really want to try the recreation of the category on my iPhone since it will take ages with 54 separate entries with loads of generated passwords, and also means any mis-types will mess up, and I am particularly good at making typos on my iPhone. I potentially won’t notice until I attempt to use some of the passwords, which could be months away.

Over the weekend I also tried deleting all entries containing accented characters where possible, but that didn’t make any difference.

What I may try is creating a new category on my iPhone and transferring the entries over one-by-one and synchronising with the Mac to see what happens and when it chokes, or even just moving them on the Mac to a new category to see what happens. I’ll let you know if I spot the offending entry.

Regards,

Nic

I have tried transferring the records one-by-one and the first record crashed a different category once it was moved over. I couldn’t then delete it on the Mac, but fortunately it was an expired credit card so I was able to delete it from my iPhone then re-sync to the Mac and it cleared up the issue. I am not sure what the actual issue was since the record did contain a title, but in trying to sync it across once it was deleted I received the error message “Error: unable to load database: Codebook was unable to load your data, consider quitting or restoring from backup. Underlying error: Invalid parameter not satisfying : aTitle != nil”. This error message appeared during the synchronisation process. The third time I restarted the app on the Mac and synced it worked without a problem and the database seems to be behaving itself.

Regards,

Nic

Hi @oceanic

Great! Glad to hear that category is accessible to you again. Sorry for the hassle. We’re thinking that the first entry in the category must have somehow been causing the issue. In Codebook for Mac, when you select a category the first entry in that category is selected by default.

Would you mind sharing what field types you had in that entry (especially the first field type)? and some general idea of what the values of those field types were? (numbers, symbols, text, or what characters they started with). Feel free to PM me instead if you’d prefer not to share it publicly. This could have just been an isolated incident where that entry was corrupted somehow (it was excellent that you had another copy of your data) , but if it wasn’t we’d like to try to reproduce the issue and find a fix so it doesn’t occur again.

I had to delete the first column of the exported data otherwise it refuses to import saying “Format error reading import data: Invalid EntryID 109…-2901, unable to find in local database, row: 1”

We’ve done some work on the export/import feature (so you should no longer have to delete that column), which should be included in a future update.

OK, we found the issue. One of the entries had a field that had become corrupted. It was the first entry in that category. I deleted that entry (on my iPhone) and synchronised it and then it worked without a problem. It just meant that, when I selected a category on my Mac, it brought the first entry up automatically, but couldn’t show it properly. The iPhone wasn’t showing the entry when I selected the category, so wasn’t demonstrating the same behaviour.

Hi @oceanic

Excellent, glad to hear everything is working as expected again and it appears to be an isolated incident of a single field being corrupted.

Thanks again for using Codebook!