# Error setting org-roam-mode: (emacsql-timeout Query timed out 30) (macOS issue?)

**URL:** <https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007>\
**Category:** Troubleshooting\
**Created:** [March 6, 2023, 6:27pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007 "2023-03-06T18:27:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [March 6, 2023, 6:27pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/1 "2023-03-06T18:27:30Z")

</div>

![Bildschirm­foto 2023-03-06 um 18.55.52](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/f/fbad0623a172b560bf1453e2914aaa21e1de6d2f.jpeg)

This is a question for the nerd connoisseur.

Last weekend I set up a 2018 MacbookPro from work in the same manner as my daily driver, a 2022 M1 Macbook Pro. Both run the latest macOS (Ventura) and Emacs 29 via Emacs+Plus. Both have the same .emacs, the same .emacs.d (via Git) and the same PATH environment. Except for org-roam (I use the latest version of v1) and Helm, every package is up to date.

Yet, on the newly configured 2018 machine I encounter this weird bug:

**Error setting org-roam-mode: (emacsql-timeout Query timed out 30)**

I tried a lot already and now am at my wits’ end. My gut feeling is that this has something to do with permissions in macOS - but it could also be something completely different.

I found these three articles online but could not solve the issue.

> <https://github.com/org-roam/org-roam/issues/1196>
>
> 1.The startup process is slower than before.
> 2.After boot, a message will appea…r in the mini buffer: Query timeout error："Query timed out",30
> !\[图片\](https://user-images.githubusercontent.com/69200664/96408097-5c795200-1215-11eb-9d31-2dccea3aec26.png)

> <https://github.com/org-roam/org-roam/issues/2206>
>
> \### Description
> I recently migrated to a new laptop. Unfortunately, I am unable… to get org-roam to work on this new machine. Upon attempting to synchronize the database, an error message results, and no db file is created.
> 
> \#### Steps to Reproduce
> 
> 1. Load Emacs
> 2. Run \`org-roam-db-sync\`
> 3. \[Emacs freezes for 30 seconds\]
> 4. The following message is displayed in the echo area: 'Query timeout error: "Query timed out", 30'
> 
> 
> \#### Backtrace
> 
> \`\`\`
> Debugger entered--Lisp error: (emacsql-timeout "Query timed out" 30)
> signal(emacsql-timeout ("Query timed out" 30))
> #f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #\<bytecode 0xdcd203a8e03c0ff\>)(#\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\>)
> apply(#f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #\<bytecode 0xdcd203a8e03c0ff\>) #\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\> nil)
> emacsql-wait(#\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\>)
> #f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #\<bytecode -0x1de985a4cf2deafb\>)(#\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\> \[:pragma (= busy-timeout $s1)\] 15000)
> apply(#f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #\<bytecode -0x1de985a4cf2deafb\>) #\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\> (\[:pragma (= busy-timeout $s1)\] 15000))
> emacsql(#\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\> \[:pragma (= busy-timeout $s1)\] 15000)
> #f(compiled-function (#\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\> (:file "/Users/pablostafforini/.emacs.d/var/org/org-roam.d..."))
> apply(#f(compiled-function
> #f(compiled-function (&rest args) #\<bytecode 0x24e89310fe37eb8\>)(#\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\> (:file "/Users/pablostafforini/.emacs.d/var/org/org-roam.d..."))
> apply(#f(compiled-function (&rest args) #\<bytecode 0x24e89310fe37eb8\>) #\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\> (:file "/Users/pablostafforini/.emacs.d/var/org/org-roam.d..."))
> initialize-instance(#\<emacsql-sqlite-connection emacsql-sqlite-connection-41406e88\> (:file "/Users/pablostafforini/.emacs.d/var/org/org-roam.d..."))
> #f(compiled-function (class &rest slots) "Default constructor for CLASS \`eieio-default-superclass'.\\nSLOTS are the initialization slots used by \`initialize-instance'.\\nThis static method is called when an object is constructed.\\nIt allocates the vector used to represent an EIEIO object, and then\\ncalls \`initialize-instance' on that object." #\<bytecode 0x151baf8e0318ed83\>)(emacsql-sqlite-connection :file "/Users/pablostafforini/.emacs.d/var/org/org-roam.d...")
> apply(#f(compiled-function (class &rest slots) "Default constructor for CLASS \`eieio-default-superclass'.\\nSLOTS are the initialization slots used by \`initialize-instance'.\\nThis static method is called when an object is constructed.\\nIt allocates the vector used to represent an EIEIO object, and then\\ncalls \`initialize-instance' on that object." #\<bytecode 0x151baf8e0318ed83\>) emacsql-sqlite-connection (:file "/Users/pablostafforini/.emacs.d/var/org/org-roam.d..."))
> make-instance(emacsql-sqlite-connection :file "/Users/pablostafforini/.emacs.d/var/org/org-roam.d...")
> emacsql-sqlite("/Users/pablostafforini/.emacs.d/var/org/org-roam.d...")
> org-roam-db()
> org-roam-db-sync()
> eval((org-roam-db-sync) t)
> eval-expression((org-roam-db-sync) nil nil 127)
> funcall-interactively(eval-expression (org-roam-db-sync) nil nil 127)
> call-interactively(eval-expression nil nil)
> command-execute(eval-expression)
> 
> \`\`\`
> 
> \#### Expected Results
> 
> The org-roam database synchronizes.
> 
> \#### Actual Results
> 
> The org-roam database does not synchronize.
> 
> \### Environment
> 
> \- Emacs: GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.5.0, Carbon Version 165 AppKit 2113.5)
> of 2022-05-25
> \- Framework: N/A
> \- Org: Org mode version 9.5 (9.5-g6c8f8f @ /Users/pablostafforini/.emacs.d/straight/build/org/)
> \- Org-roam: v2.1.0-23-g0ecbd3a

> <https://github.com/magit/emacsql/issues/96>
>
> I was trying to switch to a new version of emacs which caused "straight" to rebu…ild everything and since then whenever I try to open a file (any file, I think?) emacs hangs, eventually a 'Query timeout error: "Query timed out", 30' appears and then I have a running "emacsql-sqlite" process running, using one entire core. If I open another file, it'll happen again and I'll then have another process running, using a full core.
> 
> I tried reverting the sqlite package back a couple versions (in case something that had happened since the last time I asked straight to update packages) and the problem remains.  
> 
> I'd be happy to help debug but I have no idea--after much trying!--to get more information on what is happening.

Helpful pointers would be really appreciated!

This is the result of `(debug (org-roam-mode))`:

```auto
Debugger entered--Lisp error: (emacsql-timeout "Query timed out" 30)
  signal(emacsql-timeout ("Query timed out" 30))
  #f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #<bytecode 0xdcdbb9fef8ddf18>)(#<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900>)
  apply(#f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #<bytecode 0xdcdbb9fef8ddf18>) #<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> nil)
  emacsql-wait(#<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900>)
  #f(compiled-function (connection sql &rest args) #<bytecode -0x1eff5dcf1872eb1c>)(#<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> [:pragma (= busy-timeout $s1)] 15000)
  apply(#f(compiled-function (connection sql &rest args) #<bytecode -0x1eff5dcf1872eb1c>) #<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> ([:pragma (= busy-timeout $s1)] 15000))
  emacsql(#<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> [:pragma (= busy-timeout $s1)] 15000)
  #f(compiled-function (conn slots) #<bytecode -0x118a18c66d0e1827>)(#<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> (:file "~/.emacs.d/org-roam-db/org-roam.db"))
  apply(#f(compiled-function (conn slots) #<bytecode -0x118a18c66d0e1827>) (#<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> (:file "~/.emacs.d/org-roam-db/org-roam.db")))
  #f(compiled-function (&rest args) #<bytecode 0x1d0de56ae1e88461>)(#<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> (:file "~/.emacs.d/org-roam-db/org-roam.db"))
  apply(#f(compiled-function (&rest args) #<bytecode 0x1d0de56ae1e88461>) #<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> (:file "~/.emacs.d/org-roam-db/org-roam.db"))
  initialize-instance(#<emacsql-sqlite3-connection emacsql-sqlite3-connection-1ffb2e760900> (:file "~/.emacs.d/org-roam-db/org-roam.db"))
  #f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode -0x1e27f44ed359e4fa>)(emacsql-sqlite3-connection :file "~/.emacs.d/org-roam-db/org-roam.db")
  apply(#f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode -0x1e27f44ed359e4fa>) emacsql-sqlite3-connection (:file "~/.emacs.d/org-roam-db/org-roam.db"))
  make-instance(emacsql-sqlite3-connection :file "~/.emacs.d/org-roam-db/org-roam.db")
  emacsql-sqlite3("~/.emacs.d/org-roam-db/org-roam.db")
  org-roam-db()
  org-roam-db-build-cache()
  org-roam-mode()
  (debug (org-roam-mode))
  eval((debug (org-roam-mode)) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

```

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [March 6, 2023, 8:20pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/2 "2023-03-06T20:20:21Z")

</div>

> [@laotang](#):
>
> `emacsql-sqlite3-connection`

Just to eliminate the most common error I have seen in the forum and GitHub issues after upgrading macOS.

Permission for the executable. You use `emacsql-sqlite3` so the executable is the one from your “package manager” – I don’t know which one you use, but I supposed you can locate the one your Emacs uses (not sure if it is the same one as `where sqlite3` in Terminal \[1\]), and see if you have executable permission to it.

Other than this, I have no idea.

* * *

1. I don’t know if `emacsql-sqlite3` has the equivalent of `emacsql-sqlite-executable-path ` for `emacs-sqlite` (the default Org-roam uses)

---

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [March 6, 2023, 9:10pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/3 "2023-03-06T21:10:53Z")

</div>

Thanks for the reply and the pointer. The idea about the permissions is not bad, the good people at Apple have added a lot of additional security walls in the last few years. But it might not be the answer for this issue.

For some reason I just checked the activity monitor on both machines. On the working machine there is one sqlite3 process. On the one with issues there is not zero nor one but **two** sqlite3 processes. I don’t know what to make of this.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [March 7, 2023, 6:50am UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/4 "2023-03-07T06:50:42Z")

</div>

Is it possible that emacs needs to be “permitted” to access the sqlite3 process now “walled” somehow? Along these lines? (Not this, but something similar?): [osx - How to Restore File System Access in macOS Catalina - Emacs Stack Exchange](https://emacs.stackexchange.com/questions/53026/how-to-restore-file-system-access-in-macos-catalina/53037#53037)

---

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [March 7, 2023, 8:54pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/5 "2023-03-07T20:54:19Z")

</div>

I checked permissions and even gave Emacs, emacsql and sqlite full disk access. Still no improvement. Is there any way a connection from sqlite to the database can be blocked?

For what its worth: If I delete the org-roam.db, a new (and empty) one is created.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [March 7, 2023, 9:28pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/6 "2023-03-07T21:28:40Z")

</div>

Sorry that I have no idea how macOS works. I don’t use it.

It’s very weird when you can create a new file but can’t read it — is this even possible? Not sure if commandline sqlite3 can open the db file directly without Emacs

Why not try the emacsql-sqlite and compile the executable with gcc or clang? (Instead of emacsql-sqlite3 and sqlite3).

---

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [March 7, 2023, 10:10pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/7 "2023-03-07T22:10:33Z")

</div>

Thanks for trying to help, I truly appreciate it.

I did recompile (ones even with gcc-11, based on this: [Timeout trying to open sqlite db on m1 Mac · Issue #92 · magit/emacsql · GitHub](https://github.com/magit/emacsql/issues/92)). The most annoying part of this is that the M1-based machine with the very same setup runs like a charm. The sqlite3 is even one of the non-optimized “intel” versions using Rosetta.

---

<div class="post-metadata">

**Author:** ![JohnAtl](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/johnatl/32/1293_2.png) [@JohnAtl](https://org-roam.discourse.group/u/JohnAtl)\
**Post date:** [March 13, 2023, 5:32pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/8 "2023-03-13T17:32:38Z")

</div>

I do t have much expertise here, but recall org roam using a custom build of SQLite, and I believe those requirements change from time to time.

Have you considered downgrading to 28 or 27?

Also found this:

> **[Org-roam requires sqlite-builtin on emacs 28](https://discourse.doomemacs.org/t/org-roam-requires-sqlite-builtin-on-emacs-28/3674)**
>
> I’m running doom with emacs 28.1 on Linux Mint 20. After the latest upgrade, doom throws an error. It looks as if some part of org-roam is trying to load a builtin version of sqlite, which is not available in emacs 28? Loading data dump... I’ve...

---

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [March 13, 2023, 8:14pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/9 "2023-03-13T20:14:00Z")

</div>

Thanks a lot for following up on this and the link, I really do appreciate the effort!

I’ve experimented with different versions of emacsql and emacs. Downgrading does break other parts of my config, so it would not be my first choice - but it also did not work. The strangest thing about this is that one machine is running perfectly fine with this setup, whereas the second (which is setup identically) fails.

---

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [March 13, 2023, 8:46pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/10 "2023-03-13T20:46:52Z")

</div>

Btw I also used “console.app” on both machines to see whether there are unique sqlite error messages for the struggling Intel Macbook Pro.

This is the list of unique error messages for the machine with the working setup (M1 MBP):

```auto
error	21:14:58.781938+0100	syspolicyd	open flag(s) 0x01000000 are reserved for VFS use and do not affect behaviour when passed to sqlite3_open_v2
error	21:14:58.782051+0100	syspolicyd	cannot open file at line 46922 of [554764a6e7]
error	21:14:58.782390+0100	syspolicyd	os_unix.c:46922: (2) open(/private/var/db/DetachedSignatures) - No such file or directory
sqlite3_open_v2
error	21:14:58.832065+0100	taskgated	cannot open file at line 46922 of [554764a6e7]
error	21:14:58.832089+0100	taskgated	os_unix.c:46922: (2) open(/private/var/db/DetachedSignatures) - No such file or directory
sqlite3_open_v2
[…]	
standard	21:15:02.084909+0100	searchpartyd	automatic index on KeyGenerationBeaconKeys(beaconIdentifier)
[…]
error	21:15:10.250469+0100	Emacs	
error	21:15:10.250505+0100	Emacs	cannot open file at line 46922 of [554764a6e7]
error	21:15:10.250520+0100	Emacs	os_unix.c:46922: (2) open(/private/var/db/DetachedSignatures) - No such file or directory

```

And this is the list for the struggling machine:

```auto
standard	21:19:50.284727+0100	searchpartyd	automatic index on KeyGenerationBeaconKeys(beaconIdentifier)
[…]
 error	21:19:51.606525+0100	tccd	open flag(s) 0x01000000 are reserved for VFS use and do not affect behaviour when passed to sqlite3_open_v2
 error	21:19:51.606642+0100	tccd	cannot open file at line 46922 of [554764a6e7]
 error	21:19:51.606668+0100	tccd	os_unix.c:46922: (2) open(/private/var/db/DetachedSignatures) - No such file or directory
[…]
 error	21:19:54.354862+0100	taskgated	open flag(s) 0x01000000 are reserved for VFS use and do not affect behaviour when passed to sqlite3_open_v2
 error	21:19:54.354935+0100	taskgated	cannot open file at line 46922 of [554764a6e7]
 error	21:19:54.354960+0100	taskgated	os_unix.c:46922: (2) open(/private/var/db/DetachedSignatures) - No such file or directory
[…]
 error	21:19:54.664608+0100	ContextStoreAgent	open flag(s) 0x01000000 are reserved for VFS use and do not affect behaviour when passed to sqlite3_open_v2
 error	21:19:54.666307+0100	ContextStoreAgent	cannot open file at line 46922 of [554764a6e7]
 error	21:19:54.666347+0100	ContextStoreAgent	os_unix.c:46922: (2) open(/private/var/db/DetachedSignatures) - No such file or directory
 error	21:19:54.703269+0100	progressd	volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags

```

The only real difference between is:

`error	21:19:54.703269+0100	progressd	volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags`

Still, not really helpful.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [March 13, 2023, 9:54pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/11 "2023-03-13T21:54:40Z")

</div>

Do you happen to be sharing the same DB file between the two machines by any chance?

---

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [March 14, 2023, 9:39am UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/12 "2023-03-14T09:39:30Z")

</div>

Yes, that is something I only realised later. But even deleting the database does not change this error.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [March 14, 2023, 9:01pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/13 "2023-03-14T21:01:52Z")

</div>

Where I am going with this question is a wild guess as follows.

Is it possible you share an external SSD drive (or internal) between the two machines? For example, you have the M1 Macbook Pro and the Intel-CPU MacBook Pro 2018, and you share the Org files and Org-roam db files in an external SSD drive.

Somehow, googling your error message has led me to these Apple support articles:

- [Data Protection overview](https://support.apple.com/en-gb/guide/security/secf6276da8a/web)
- [Encrypt and protect a storage device with a password in Disk Utility on Mac](https://support.apple.com/en-gb/guide/disk-utility/dskutl35612/mac)

The scenario I am speculating is something like this:

1. You use Org-roam on your MBP 2018, which creates the DB file in the external SSD drive
2. Somehow (wild guess), the SSD drive is also connected to M1 MBP, and detects the new file just created and encrypts it for M1 Apple Silicon (different CPU architecture and/or different machine)
3. MBP 2018 is unable to decrypt the DB file because its encrypted by the M1 Apple Silicon (even though it is MBP 2018 that has created it)

I don’t know if this is even plausible. But you seem to be experiencing something that is very unique to your use scenario and perhaps unique to macOS…

---

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [March 15, 2023, 9:31pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/14 "2023-03-15T21:31:25Z")

</div>

Again, thanks for this. I appreciate the creative approach here (and you don’t even own a Mac!) but sadly this does not seem to be the issue. The setup is somewhat similar because I have my .emacs.d in Github. I forgot that I had the org-roam.db there as well - but moving this file somewhere else does not help.

Running v1 doesn’t make it easier, I guess.

I have solved this issue in the most overkill and ridiculous way possible. In the past few days I have re-written the core functionality of org-roam-v1 (find, insert, show-backlinks) with ripgrep and a lot of regex replacing emacsql. I still have to add “tags” but otherwise “orgrr” (for org-roam-replica) is surprisingly fast and only depends on rg being installed. The idea was to become independent of the future fate of v1 and also to learn more elisp.

---

<div class="post-metadata">

**Author:** ![laotang](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@laotang](https://org-roam.discourse.group/u/laotang)\
**Post date:** [April 2, 2023, 4:34pm UTC](https://org-roam.discourse.group/t/error-setting-org-roam-mode-emacsql-timeout-query-timed-out-30-macos-issue/3007/15 "2023-04-02T16:34:33Z")

</div>

This is the link to [orgrr](https://github.com/rtrppl/orgrr), if anyone likes to try it.
