aaronhuggins / cbor-redux

The Concise Binary Object Representation (CBOR) data format (RFC7049) implemented in pure JavaScript, revived.
https://doc.deno.land/https://deno.land/x/cbor_redux/mod.ts
Other
29 stars 6 forks source link

Surrealdb.js and cbor Error: CBORError: Remaining bytes #36

Open rvdende opened 7 months ago

rvdende commented 7 months ago

Not sure if this is a bug on the surrealdb.js implementation, or in cbor-redux, but this is the error. It seems to happen after a while, not sure if its to do with authentication getting stale, or some other memory issue after a while.

 ⨯ unhandledRejection: Error: CBORError: Remaining bytes
    at decode (file:///node_modules/.pnpm/cbor-redux@1.0.0/node_modules/cbor-redux/esm/src/decode.js:271:19)
    at decodeCbor (file:///node_modules/.pnpm/surrealdb.js@1.0.0-beta.5/node_modules/surrealdb.js/esm/library/cbor/index.js:76:12)
    at HttpEngine.rpc (file:///node_modules/.pnpm/surrealdb.js@1.0.0-beta.5/node_modules/surrealdb.js/esm/library/engine.js:262:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Surreal.ping (file:///node_modules/.pnpm/surrealdb.js@1.0.0-beta.5/node_modules/surrealdb.js/esm/surreal.js:130:27)

Any idea what might be causing this?

rvdende commented 7 months ago

https://github.com/surrealdb/surrealdb.js/issues/248