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
When running npx create-actor@latest actor-core-bug after creating example project with npx create-actor the studio.rivet.gg opens up but it cannot connect to the server.
Server seems to be running ok:
Background
We had a chat yesterday with @NathanFlurry on X about my issue, so I decided to create this issue so it is easier to communicate here on Github. First of all, here is link to repo https://github.com/valstu/actor-core-bug so you can try it out. I created the repo like this:
I created a project with command npx create-actor@latest actor-core-bug
Selected Node.js as platform
Selected Counter project as an example project
I ran npx create-actor@latest actor-core-bug
Studio opens up but it cannot connect to the server
So I spent few hours debugging this today. My gut told me this is related to cors somehow and while trying to figuring out how to disable cors for all websocket routes, I bumped into this issue honojs/hono#4090 and I suspect this might be causing issues for us as well.
I also downgraded hono to v 4.7.6 and everything started working 🤔
@valstu hey, really appraciate your input on this issue. It turned out, that I forgot about the issue you have linked indeed! Disabled the CORS for websockets routes just for now (we're doing the same on actors side). Tested it by myself and its working! Would you like to give it a try? #943
When running
npx create-actor@latest actor-core-bug
after creating example project withnpx create-actor
the studio.rivet.gg opens up but it cannot connect to the server.Server seems to be running ok:
Background
We had a chat yesterday with @NathanFlurry on X about my issue, so I decided to create this issue so it is easier to communicate here on Github. First of all, here is link to repo https://github.com/valstu/actor-core-bug so you can try it out. I created the repo like this:
npx create-actor@latest actor-core-bug
Node.js
as platformCounter
project as an example projectnpx create-actor@latest actor-core-bug
What I've tested out
When I enabled the inspector on the https://github.com/valstu/actor-core-bug/blob/main/actors/app.ts file like this:
and ran the
npx tsx src/index.ts
and then opened up the studio.rivet.gg on the browser it starts to work. Then I'm able to connect to the server.I also noticed that if I change the
app.ts
to following:As is done on the cli code here
actor-core/packages/actor-core-cli/src/server-entry.ts
Lines 9 to 11 in a368c8d
And run
npx tsx src/index.ts
The same problem appears again. And I cannot connect to server anymore.The text was updated successfully, but these errors were encountered: