cbor error with 2.0.7 and createWithInput

I'm using rivetkit 2.0.7 and typescript client but when I use:
client.....getOrCreate([i], {
params: {
authToken: token?.token,
},
createWithInput: {
organizationId: '123',
}
}).connect();
client.....getOrCreate([i], {
params: {
authToken: token?.token,
},
createWithInput: {
organizationId: '123',
}
}).connect();
I'm getting following exceptions - anything I need to setup?
TypeError: Unexpected end of buffer reading string
incomplete: true,

at readString (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/cbor-x@1.6.0/node_modules/cbor-x/decode.js:569:22)
at read (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/cbor-x@1.6.0/node_modules/cbor-x/decode.js:455:23)
at read (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/cbor-x@1.6.0/node_modules/cbor-x/decode.js:457:17)
at checkedRead (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/cbor-x@1.6.0/node_modules/cbor-x/decode.js:209:16)
at <anonymous> (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/rivetkit@2.0.7_@hono+node-server@1.19.4_hono@4.9.8__@hono+node-ws@1.2.0_@hono+node-serv_7148c5ec2b14d5543d7cd21e202dc5c9/node_modules/rivetkit/dist/tsup/chunk-KHRZPP5T.js:3239:35)

564 | return function readString(length) {
565 | let string = strings[stringPosition++]
566 | if (string == null) {
567 | if (bundledStrings)
568 | return readStringJS(length)
569 | let extraction = extractStrings(position, srcEnd, length, src)
^
TypeError: Unexpected end of buffer reading string
incomplete: true,
TypeError: Unexpected end of buffer reading string
incomplete: true,

at readString (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/cbor-x@1.6.0/node_modules/cbor-x/decode.js:569:22)
at read (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/cbor-x@1.6.0/node_modules/cbor-x/decode.js:455:23)
at read (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/cbor-x@1.6.0/node_modules/cbor-x/decode.js:457:17)
at checkedRead (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/cbor-x@1.6.0/node_modules/cbor-x/decode.js:209:16)
at <anonymous> (/Users/samko/Documents/Web/didactic-telegram/node_modules/.pnpm/rivetkit@2.0.7_@hono+node-server@1.19.4_hono@4.9.8__@hono+node-ws@1.2.0_@hono+node-serv_7148c5ec2b14d5543d7cd21e202dc5c9/node_modules/rivetkit/dist/tsup/chunk-KHRZPP5T.js:3239:35)

564 | return function readString(length) {
565 | let string = strings[stringPosition++]
566 | if (string == null) {
567 | if (bundledStrings)
568 | return readStringJS(length)
569 | let extraction = extractStrings(position, srcEnd, length, src)
^
TypeError: Unexpected end of buffer reading string
incomplete: true,
8 Replies
jog1t
jog1t•3mo ago
make sure both client and server are up to date! 🙂 i.e. have the same version
Samko
SamkoOP•3mo ago
No description
jog1t
jog1t•3mo ago
cool, thx, will look into it!
Samko
SamkoOP•3mo ago
thanks a lot! btw I have tried to set encoding: json on both client and server - but it won't create even without createWithInput fails on Unexpected end of CBOR data' with bare encoding it doesn't work with createWithInput but otherwise it works still in 2.0.8 🥺
Nathan
Nathan•3mo ago
looking in to this rn
Samko
SamkoOP•3mo ago
you are the best
Nathan
Nathan•3mo ago
this is still my priority – i've been alll over the place today will keep you posted tmrw give 2.0.9 a try
Samko
SamkoOP•3mo ago
thanks @Nathan! IT works!:))

Did you find this page helpful?