Skip to content

sqlite error the second time tests run locally #10597

@samuelcolvin

Description

@samuelcolvin

What versions & operating system are you using?

    "@cloudflare/vitest-pool-workers": "^0.8.19",
    "@cloudflare/workers-types": "^4.20250712.0",
    "typescript": "^5.5.2",
    "vitest": "~3.2.0",
    "wrangler": "^4.27.0"

Please provide a link to a minimal reproduction

No response

Describe the Bug

Running npm run test on a project that uses d1, and tests pass the first time.

When tests are run again (e.g. I press a) I get:

[vpw:debug] Reusing runtime for vitest.config.mts...
workerd/jsg/util.c++:322: error: e = workerd/util/sqlite.c++:504: failed: expected _ec == SQLITE_OK [14 == 0]; unable to open database file: SQLITE_CANTOPEN
stack: 104e48f07 104e48a23 10421bee7 10421b93f 10421b7bb 104a807cb 104a5c6f3 104a5c24f 104207787 10420717f 10421a47f 10421987f 1042400f3 104e14904 104e16e07 1041d3ab4 104c0eff4 104b1568c; sentryErrorContext = jsgInternalError; wdErrId = l18fe13mqjorv8216nt11eas
workerd/io/worker.c++:2197: info: uncaught exception; source = Uncaught (in promise); stack = Error: internal error; reference = l18fe13mqjorv8216nt11eas
    at async Object.fetch (file:///Users/samuel/code/pydantic-ai-gateway/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js:15:12)
workerd/io/io-context.c++:377: info: uncaught exception; exception = workerd/jsg/_virtual_includes/iterator/workerd/jsg/value.h:1540: failed: jsg.Error: internal error; reference = l18fe13mqjorv8216nt11eas
stack: 104bd17e8 104bd22f3 1066c7ac3 104a20838 104a20c24

The code is currently private

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions