Error with "getOrCreate"
Getting the following when trying to call "getOrCreate" from my client.
This happens both when trying to access via "useActor" hook and manually calling the method.
When i create the actor in the studio and then call
getForId then the client resolves to the right actor and I can call actions successfully
Not sure how to properly debug?
13 Replies
can confirm this http request is also failing
this is what I intercepted that my app was making
failing on 2.0.7 and 2.0.8
looking in to this
Just for some context, I am trying to do this from a cli application. I am running the server with bun and hono
I made a local copy of this example and it seems to run fine from the cli script and the browser
https://github.com/rivet-dev/rivetkit/tree/main/examples/chat-room
GitHub
rivetkit/examples/chat-room at main · rivet-dev/rivetkit
A library for building stateful workloads anywhere - rivet-dev/rivetkit
Here is what I am working on. let me know if you need help setting it up
https://github.com/ghardin1314/rivet-chat
GitHub
GitHub - ghardin1314/rivet-chat
Contribute to ghardin1314/rivet-chat development by creating an account on GitHub.
Ok tracked this down to the @hono/zod-openapi middleware is not working properly. The
c.req.valid("json") is returning undefined because it appears the zod openapi validation step is not running. the c.req.json() method returns the valid request body and if I use that instead then the route runs successfully
Not sure if this is a code probably or some kind of weird dependency issue trying to use bun as a package manager in a monorepo. I have had weird things happen to me before trying this.
I will investigate this more later when i have time
Confirmed this was a bun module resolution issue. Works fine once I switched to pnpmroger, i'll track that down. thx!
i wish that bun would just work, it breaks every couple versions. we prob just need to add bun + vitest to ci.
yeah me too. the premise of it sounds so good but I always end up disappointed.
just cloned the project to try to reproduce, damn this is cool
couldn't seem to get past the drizzle migration step on master for your branch, can't seem to reproduce getOrCreate in bun on my end. will try the curl req in a sec.
is this what you were seeing? i'm using 1.2.2

thats what it was looking when it works. Honestly I dont think its worth looking into more as it should be fixed on Bun's end in the next release
Bun (@bunjavascript)
@PolymathicEng @nhielsalvana Yes and we’re changing it to the default in 1.3 but have a couple more things to iron out first
X
roger thx