You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running LibSQL server locally and using this sdk to connect to it. The following is my code:
import{createClient}from"@libsql/client"constclient=createClient({url: "libsql://localhost:8080",authToken: "",})conststart=Bun.nanoseconds()constqueries=1000for(leti=0;i<queries;i++){awaitclient.execute("SELECT * FROM users;",);}constdelta=(Bun.nanoseconds()-start)/1000000;console.log("Total time:",delta,"ms")console.log("Avg time:",delta/queries,"ms")
I have spun up a docker container running the libsql-server, and when I use Postman to send queries it works perfectly fine, but when I run the above code; it throws the following error:
There has been an error while retrieving the database type.
Debug information:
- URL: https://localhost:8080
- Response Status Code: N/A
UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate
path: "https://localhost:8080/v1/jobs"
UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate
path: "https://localhost:8080/v2/pipeline"
Bun v1.1.18 (Linux x64)
I'm also not sure why it says the provided url is https://... when it's actually libsql://...?!
Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered:
I get a somewhat similar issue running under node v20. If it's blocking you from working locally you could try "http://localhost:8080" instead of "libsql://localhost:8080". This seems to get around the initial error.
Edit: Ah right, libsql:// URLs use TLS by default. Update your config as such to disable TLS or use the above suggested http:// scheme.
I'm running LibSQL server locally and using this sdk to connect to it. The following is my code:
I have spun up a docker container running the libsql-server, and when I use Postman to send queries it works perfectly fine, but when I run the above code; it throws the following error:
I'm also not sure why it says the provided url is
https://...
when it's actuallylibsql://...
?!Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered: