[GH-ISSUE #1594] TypeError: Transaction function cannot return a promise #996

Open
opened 2026-03-02 11:54:14 +03:00 by kerem · 1 comment
Owner

Originally created by @hussion on GitHub (Jun 11, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1594

Describe the Bug

The better-sqlite3 that liteque depends on has recently been upgraded to v11.10.0 link ,Disallow transaction to return a Promise due to unexpected behaviour,The run method in apps/workers/workers/crawlerWorker.ts threw an error:

TypeError: Transaction function cannot return a promise

const worker = new Runner<ZCrawlLinkRequest>(
      LinkCrawlerQueue,
      {
        run: withTimeout(
          runCrawler,
          /* timeoutSec */ serverConfig.crawler.jobTimeoutSec,
        ),

Steps to Reproduce

upgrade better-sqlite3 version to v11.10.0

Expected Behaviour

success

Screenshots or Additional Context

No response

Device Details

No response

Exact Karakeep Version

v0.24.1

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @hussion on GitHub (Jun 11, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1594 ### Describe the Bug The `better-sqlite3` that `liteque` depends on has recently been upgraded to v11.10.0 [link](https://github.com/WiseLibs/better-sqlite3/pull/1364) ,Disallow transaction to return a Promise due to unexpected behaviour,The run method in `apps/workers/workers/crawlerWorker.ts` threw an error: **TypeError: Transaction function cannot return a promise** ``` const worker = new Runner<ZCrawlLinkRequest>( LinkCrawlerQueue, { run: withTimeout( runCrawler, /* timeoutSec */ serverConfig.crawler.jobTimeoutSec, ), ``` ### Steps to Reproduce upgrade better-sqlite3 version to v11.10.0 ### Expected Behaviour success ### Screenshots or Additional Context _No response_ ### Device Details _No response_ ### Exact Karakeep Version v0.24.1 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
Author
Owner

@MohamedBassem commented on GitHub (Jun 15, 2025):

Are you actively hitting this issue? Because karakeep's lockfile is pinned at 11.3.0.

<!-- gh-comment-id:2974388792 --> @MohamedBassem commented on GitHub (Jun 15, 2025): Are you actively hitting this issue? Because karakeep's lockfile is pinned at 11.3.0.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#996
No description provided.