scratchfoundation / scratchfoundation/scratch-parser

Could not parse as a valid SB2 or SB3 project.

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
71
Forks
81
Avg merge
2h 46m
Merged PRs (30d)
1

Description

When I tried to load a .sb3 file, I encountered the following error.

lib.min.js:181

{
    "validationError":"Could not parse as a valid SB2 or SB3 project.",
    "sb2Errors":[
        {
            "keyword":"required",
            "dataPath":"",
            "schemaPath":"#/required",
            "params":{
                "missingProperty":"objName"
            },
            "message":"should have required property 'objName'"
        }
    ],
    "sb3Errors":[
        {
            "keyword":"enum",
            "dataPath":".targets[1].isStage",
            "schemaPath":"sb3_definitions.json#/definitions/sprite/properties/isStage/enum",
            "params":{
                "allowedValues":[
                    false
                ]
            },
            "message":"should be equal to one of the allowed values"
        }
    ]
}

And I modify the isStage's value to 'false', it can be worked...

So... how to solve it

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported .sb3 loading failure and inspect the validation output in lib.min.js, focusing on targets[1].isStage and the SB2/SB3 schema checks. Determine whether the project should be accepted without manually changing isStage; done means the reported project loads or the validation behavior is clearly documented with a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.