# Hook 1.7 fails to launch: uncaught exception 'Cannot create table link.', reason: '(null)'

**URL:** https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563
**Category:** Bug Reports
**Created:** [June 12, 2020, 5:40pm UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563 "2020-06-12T17:40:04Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![raghos](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/raghos/32/217_2.png) [@raghos](https://discourse.hookproductivity.com/u/raghos)
#### Post date: [June 12, 2020, 5:40pm UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/1 "2020-06-12T17:40:04Z")

</div>

Hi,

I’m seeing a crash with Hook v1.7. The app doesn’t launch:

Process: Hook [1110]  
Path: /Applications/Hook.app/Contents/MacOS/Hook  
Identifier: Hook  
Version: 1.7 (3391)  
Code Type: X86-64 (Native)  
Parent Process: ??? [1]  
Responsible: Hook [1110]  
User ID: 501

Date/Time: 2020-06-12 13:35:51.403 -0400  
OS Version: Mac OS X 10.14.6 (18G5033)  
Report Version: 12  
Bridge OS Version: 3.0 (14Y906)  
Anonymous UUID: DA1FDDA7-D94F-7F24-CE08-7356E1524539

Time Awake Since Boot: 160 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: fmdb.\<FMDatabaseQueue: 0x600001d257d0\>

Exception Type: EXC\_CRASH (SIGABRT)  
Exception Codes: 0x0000000000000000, 0x0000000000000000  
Exception Note: EXC\_CORPSE\_NOTIFY

Application Specific Information:  
\*\*\* Terminating app due to uncaught exception ‘Cannot create table link.’, reason: ‘(null)’  
terminating with uncaught exception of type NSException  
abort() called

(removed rest of report)

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [June 12, 2020, 9:19pm UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/2 "2020-06-12T21:19:55Z")

</div>

Could you please try this from command line (/Applications/Utilities/Terminal.app):

`touch ~/Library/Application\ Support/com.cogsciapps.hook/hook.sqlite`

and let us know if it returns a permission error?

2:23 PM: edited to add “touch” command.

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [June 12, 2020, 9:44pm UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/3 "2020-06-12T21:44:39Z")

</div>

Do you have a script , app or other process that manipulates the hook.sqlite apart from Hook itself?

---

<div class="post-metadata">

### Author: ![raghos](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/raghos/32/217_2.png) [@raghos](https://discourse.hookproductivity.com/u/raghos)
#### Post date: [June 12, 2020, 10:00pm UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/4 "2020-06-12T22:00:57Z")

</div>

I tried this. The permissions were fine before, didn’t make a difference.

---

<div class="post-metadata">

### Author: ![raghos](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/raghos/32/217_2.png) [@raghos](https://discourse.hookproductivity.com/u/raghos)
#### Post date: [June 12, 2020, 10:01pm UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/5 "2020-06-12T22:01:34Z")

</div>

No, I’m a pretty regular user of hook. I haven’t set up anything outside of the regular features that come with the app.

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [June 13, 2020, 12:18am UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/6 "2020-06-13T00:18:35Z")

</div>

Just to make sure that there is not another Hook instance, then, dealing with this DB (which there should not be), I would recommend doing this from command line:

`% ps -ax |grep Hook`

or logout/log back in; or reboot. (or have you tried that already?)

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [June 13, 2020, 12:45am UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/7 "2020-06-13T00:45:33Z")

</div>

We recommend trying this:

1. while Hook is not running, In Finder, go to `~/Library/Application Support/com.cogsciapps.hook/` folder.
2. Rename file `1.1` to something else like `1.1_old`
3. Rename file `hook.sqlite` to something else like `hook_old.sqlite_old`.
4. Try to launch Hook.
5. Once Hook is launched, quit Hook.
6. Delete newly created `1.1` and `Hook.sqlite`.
7. Rename `1.1_old` and `hook_old.sqlite_old` back to `1.1` and `hook.sqlite`, respectively.

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [June 13, 2020, 12:53am UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/8 "2020-06-13T00:53:26Z")

</div>

also, I wasn’t clear from your PIM whether you also experienced this with 1.6. Did you?

Our crash analytics only show one such report. So unless others are not sending crash reports, it looks like the issue is not widespread. (Crash reports are handled by Microsoft App Center and only sent if users consent.)

---

<div class="post-metadata">

### Author: ![raghos](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/raghos/32/217_2.png) [@raghos](https://discourse.hookproductivity.com/u/raghos)
#### Post date: [June 14, 2020, 6:09pm UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/9 "2020-06-14T18:09:29Z")

</div>

Hi @LucB,

I followed your instructions. Once I renamed 1.1 and hook.sqlite, Hook did start. It complained about the license, and I re-activated.

However, once I deleted the newly-created folder/file and moved the \_old versions back, hook started crashing again.

To answer your other question, I did see the problem starting with 1.6, and I decided to download/reinstall to see if that would solve the problem. No luck!

I’m not sure what’s in the sqlite file, but if it’s only the info on what’s linked, I’m happy to provide that file for you.

Best,  
Carlos

---

<div class="post-metadata">

### Author: ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)
#### Post date: [June 15, 2020, 9:44pm UTC](https://discourse.hookproductivity.com/t/hook-1-7-fails-to-launch-uncaught-exception-cannot-create-table-link-reason-null/1563/11 "2020-06-15T21:44:15Z")

</div>

we were able to ascertain that the problem was a corrupted hook.sqlite database. Recovery from backup and via tools each, independently, proved to be viable solutions.

There’s a technical background here: [SQLiteException “database disk image is malformed” - Sergei Dorogin’s technical blog](https://techblog.dorogin.com/sqliteexception-database-disk-image-is-malformed-77e59d547c50).

We will publish some of our documentation on using those tools with Hook.

### more generally

Fortunately, this is the first report we’ve had of such an issue since Hook was launched (beta Jan 2019). However, it is possible for apps’ databases to be corrupted for some reasons (e.g., system crash). So it’s always good idea to have a backup of your library folder. We provide instructions here:

[How to Backup and Restore Hook Data – Hook](https://hookproductivity.com/help/more/how-to-backup-and-restore-hook-data).

We note that some Mac apps automatically back up their DB for users. OmniGroup’s excellent OmniFocus app is an example: [Lost database after update on IOS and OF - The Omni Group Forums](http://forums.omnigroup.com/showthread.php?t=25674). I don’t even see an option to switch OmniFocus DB backups off (I think it was there before), so it looks like OmniGroup has decided to make backups mandatory (though maybe there’s a Terminal command line for it).

We’re considering adding auto-backups data backups to Hook.

Given that our crash analytics (via Microsoft App Center, and which are anonymous, optional) don’t show any other such crash, and it’s the first report on the subject, we’ll probably move this topic into Discussion rather than bug reports unless we get data otherwise.

Thanks, again, @raghos for notifying us and working through it with us.
