Skip to content

ReferenceError: storage is not defined when running mcp.js #5

@Adhishtanaka

Description

@Adhishtanaka

When I try to run mcp.js in LibreSprite, I get a runtime error in the console.
It looks like the script is trying to use storage, but that variable is not defined in the environment.

Steps to Reproduce

  1. Open LibreSprite (SDL build v1.2-973d0e3d).
  2. Run mcp.js.
  3. Observe the error console.

Error Output

ReferenceError: storage is not defined
    at _get (<anonymous>:10:9)
    at get (<anonymous>:142:9)
    at checkServerHealth (<anonymous>:182:9)
    at onEvent (<anonymous>:335:17)
    at <anonymous>:1:36

Environment

  • OS: Windows 11
  • LibreSprite version: v1.2-973d0e3d-SDL
  • MCP script: mcp.js

Expected Behavior

The script should run without referencing an undefined variable.

Actual Behavior

Execution fails with ReferenceError: storage is not defined.

Screenshot

Image

Possible Cause

The storage object might not be available in the SDL build, or it was not initialized before being used in mcp.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions