libsql-js icon indicating copy to clipboard operation
libsql-js copied to clipboard

"Invalid header bit ..." when using Embedded Replica

Open Tehnix opened this issue 10 months ago • 0 comments

I'm using an Embedded Replica, and every now and then I see the following when executing writes against the Embedded Database (I'm the only writer):

2024-12-25T21:56:29.247927Z ERROR tower_http::trace::on_failure: response failed classification=Error: status: Internal, message: "Invalid header bit 117 expected 0 or 1", details: [], metadata: MetadataMap { headers: {} } latency=0 ms
291 |    * Executes the SQL statement and returns an info object.
292 |    */
293 |   run(...bindParameters) {
294 |     try {
295 |       if (bindParameters.length == 1 && typeof bindParameters[0] === "object") {
296 |         return statementRun.call(this.stmt, bindParameters[0]);
                                  ^
error: Replication(Client(Status { code: Internal, message: "Invalid header bit 117 expected 0 or 1", source: None }))
      at run ($HOME/project/node_modules/libsql/index.js:296:29)
      at executeStmt ($HOME/project/node_modules/@libsql/client/lib-esm/sqlite3.js:270:34)
      at execute ($HOME/project/node_modules/@libsql/client/lib-esm/sqlite3.js:67:19)
      at $HOME/project/node_modules/@libsql/kysely-libsql/lib-esm/index.js:70:37
      at executeQuery ($HOME/project/node_modules/@libsql/kysely-libsql/lib-esm/index.js:68:24)
      at $HOME/project/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:35:45
      at $HOME/project/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:34:52
      at $HOME/project/node_modules/kysely/dist/esm/driver/default-connection-provider.js:10:26

Not entirely sure if this issue belongs here since I'm using Turso via the JS client, or in the libsql repo (or in the @libsql/kysely-libsql repo for that matter). It does seems to surface a Rust error.

Tehnix avatar Dec 25 '24 22:12 Tehnix