Skip to content
← Back to activity

Solution skill

Allow configuring http

Version 2Sign in to save

Complete solution

Libsql Client Ts: allow configuring http. The verified fix is Fix: For plaintext local dev, pass an explicit `http:` or `ws:` URL (e.g. the service URL for that host and port), or use the `?tls=0` query parameter added in 0.2.0. Use this when you hit the symptoms above in libsql-client-ts; not for unrelated libsql-client-ts errors or general setup questions.

TL;DR

Fix: For plaintext local dev, pass an explicit http: or ws: URL (e.g. the service URL for that host and port), or use the ?tls=0 query parameter added in 0.2.0. Also note: turso dev only speaks a very old HTTP API the client can't talk to - run sqld directly for a compatible local server.

The error

Issue tursodatabase/libsql-client-ts#39 (closed, 11 comments): When using a local database, e.g. `libsql://YOUR_HOST:3030`, this library would use `https`. This fails because I can't access YOUR_HOST over https. Please allow me to disable https, so that I can connect to a local client over HTTP. I'm using Cloudflare Workers so it seems like I cannot use the file directly.

Fix

  1. For plaintext local dev, pass an explicit http: or ws: URL (e.g. the service URL for that host and port), or use the ?tls=0 query parameter added in 0.2.0.
  2. Also note: turso dev only speaks a very old HTTP API the client can't talk to - run sqld directly for a compatible local server.

Success check: the symptom above is gone and the original operation completes.

When to use

  • You hit this exact symptom in libsql-client-ts.
  • You want the verified fix without digging through the thread.

When not to use

  • A different error in libsql-client-ts, even a similar-looking one.
  • General libsql-client-ts setup or credential questions.

Compatibility

  • Libsql Client Ts (tursodatabase/libsql-client-ts)

Variant phrasings

  • How to fix "allow configuring http" in libsql-client-ts
  • libsql-client-ts: allow configuring http

Source

  • https://github.com/tursodatabase/libsql-client-ts/issues/39

Evidence

Asked in gh:tursodatabase/libsql-client-ts#39 (https://github.com/tursodatabase/libsql-client-ts/issues/39): Allow configuring http. The issue report: Issue tursodatabase/libsql-client-ts#39 (closed, 11 comments): When using a local database, e.g. libsql://YOUR_HOST:3030, this library would use https. This fails because I can't access YOUR_HOST over https. Please allow me to disable https, so that I can connect to a local client over HTTP. I'm using Cloudflare Workers so it seems like I cannot use the file directly.

Error

[0] workerd/jsg/util.c++:276: error: e = kj/compat/tls.c++:74: failed: OpenSSL error; message = error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER
[0] stack: 1027b92ab 1027bbb1f 1027bc23b 1027bc968 1027c47f8 103760d3c 103762998 1028b3304 1028b3728 1028b2 The verified answer: [honzasp (maintainer)]: The `libsql:` URL scheme always implies TLS (https/wss). For plaintext local dev, pass an explicit `http:` or `ws:` URL (e.g. the service URL for that host and port), or use the `?tls=0` query parameter added in 0.2.0. Also note: `turso dev` only speaks a very old HTTP API the client can't talk to  -  run `sqld` directly for a compatible local server.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_EZoJKbq3lrU5XUDzwBBoPA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Allow configuring http <span>— Vectle</span></a>