Skip to content

Issue: Errors and Missing Configurations in Dojo Quick Start Guide [ Example ] #342

Closed
@okhaimie-dev

Description

@okhaimie-dev

Feedback

Description

When following the quick start guide from the Dojo Book (https://www.dojoengine.org/quickstarts/react), I encountered several issues that prevent the application from running correctly.

Steps to Reproduce

  1. Follow the steps outlined in the Dojo Quick Start Guide.
  2. Attempt to run the application.

Observed Behavior

  1. Initial Error: Encountered the following error:
    CleanShot 2024-11-28 at 01 26 07

  2. White Screen Issue: After resolving the initial error, the application displays a white screen. This is due to an improperly implemented Dojo configuration.

Root Causes and Fixes

  1. Dojo Configuration Issue:
    The quick start guide suggests the following configuration:

    export const dojoConfig = createDojoConfig({
      manifest,
    });

    However, this configuration is incomplete and leads to a white screen. The correct configuration should include additional parameters:

    export const dojoConfig = createDojoConfig({
      manifest,
      rpcUrl: "http://localhost:5050/",
      toriiUrl: "http://localhost:8080",
      masterAddress: "0x127fd5f1fe78a71f8bcd1fec63e3fe2f0486b6ecd5c86a0466c3a21fa5cfcec",
      masterPrivateKey: "0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912",
    });
  2. useSystemCalls Hook Issue:
    The useSystemCalls hook does not account for the initial state properly, leading to timeouts and errors. The hook needs to be updated to handle the initial state correctly.

Suggested Improvements

  1. Update Quick Start Guide:

    • Include the complete Dojo configuration in the guide to prevent the white screen issue.
    • Provide a detailed explanation of each configuration parameter.
  2. Fix useSystemCalls Hook:

    • Ensure the hook properly handles the initial state to avoid timeouts and errors.

If the request is accepted, would you be willing to contribute it?

  • Yes I would be willing to contribute

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions