Skip to content

[Bug]: Client not in sync with torii grpc #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
rsodre opened this issue Jul 30, 2024 · 1 comment · Fixed by #250
Closed
1 task

[Bug]: Client not in sync with torii grpc #247

rsodre opened this issue Jul 30, 2024 · 1 comment · Fixed by #250
Labels
bug Something isn't working

Comments

@rsodre
Copy link
Contributor

rsodre commented Jul 30, 2024

Dojo.js Version

1.0.0-alpha.0

What happened?

Components in the react examples are not being updated from torii.
I'using the code below on my setup, as documented.

const sync = await getSyncEntities(
    toriiClient,
    contractComponents as any,
    []
);

What is the expected behavior?

Components / game state should always be in sync with torii.

Steps to reproduce

The react-phaser-example example seems to be the only one not using overrides.
It relies on getSyncEntities() as exemplified above.

  • Deploy dojo starter locally
  • Run torii locally
  • run the phaser client
  • try to move the rock (WASD keys).
  • Look at torii logs, it is being indexed!
  • Game state is not updated.

As a side note, I understand overrides are useful sometimes, but we have to replicate game logic off-chain.
Moving a square on the screen is a good override example, but should not be THE Dojo example.
Newcomers will think we have to override every call, otherwise it will not be updated. That's a mistake I made when I started with Dojo, and it gave me a lot of headaches and fud on Torii.
It is my opinion there should be one specific example explaining how to do overrides, all the others should rely on Torii as the norm.

Trace

No response

Is there an existing issue for this?

  • I have searched the existing issues and verified no issue exits for this problem.
@rsodre rsodre added the bug Something isn't working label Jul 30, 2024
@rsodre rsodre changed the title [Bug]: [Bug]: Client not in sync with torii grpc Aug 1, 2024
@MartianGreed
Copy link
Collaborator

@ponderingdemocritus can I be assigned ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants