tursodatabase / tursodatabase/libsql-client-ts

HRANA_WEBSOCKET_ERROR

Open
#94 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
576
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Bun: 1.0.1
OS: Ubuntu 22.04.3 LTS

When trying to run drizzle-kit push:sqlite, I got this error:

LibsqlError: HRANA_WEBSOCKET_ERROR: unable to verify the first certificate
    at mapHranaError (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:48441:12)
    at #openStream (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:48575:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async HranaClient.execute (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:48474:29)
    at async TursoSqlite.query (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:42938:21)
    at async fromDatabase3 (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:12938:23)
    at async sqlitePushIntrospect (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:51949:19)
    at async Command.<anonymous> (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:53436:31) {
  code: 'HRANA_WEBSOCKET_ERROR',
  [cause]: WebSocketError: unable to verify the first certificate
      at #onSocketError (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:48099:25)
      at _WebSocket.<anonymous> (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:48022:78)
      at callListener (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:45693:18)
      at _WebSocket.onError (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:45647:13)
      at _WebSocket.emit (node:events:514:28)
      at emitErrorAndClose (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:46607:17)
      at ClientRequest.<anonymous> (/home/tuyenhm@aht.local/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:46504:9)
      at ClientRequest.emit (node:events:514:28)
      at TLSSocket.socketErrorListener (node:_http_client:501:9)
      at TLSSocket.emit (node:events:514:28)
}

Node.js v18.17.1

Anyone knows why?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing drizzle-kit push:sqlite with Bun 1.0.1 and Node.js 18.17.1 on Ubuntu 22.04.3, focusing on the HRANA WebSocket certificate error shown in the report. Trace the connection path that produces HRANA_WEBSOCKET_ERROR; done means identifying whether the failure is in the client or the local certificate setup and documenting an actionable resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, node.js, sqlite, typescript
Domain
database, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.