Skip to content
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

Stitch failing to open project - GMREffectLayer types #186

Closed
AvioxArcade opened this issue Dec 1, 2023 · 4 comments
Closed

Stitch failing to open project - GMREffectLayer types #186

AvioxArcade opened this issue Dec 1, 2023 · 4 comments
Assignees
Labels
✨ feature New feature or request 📦 core Stitch Core and CLI

Comments

@AvioxArcade
Copy link

AvioxArcade commented Dec 1, 2023

Trying to set up and use stitch for the first time.
When opening my current project, stitch fails to open with the following error:

ERROR 15:36:06.042 ERROR: Error reading file: c:/...[REDACTED].../rooms/room_main/room_main.yy
[
  {
    "code": "invalid_union_discriminator",
    "options": [
      "GMRInstanceLayer",
      "GMRBackgroundLayer",
      "GMRTileLayer",
      "GMRAssetLayer",
      "GMRPathLayer",
      "GMRLayer"
    ],
    "path": [
      "layers",
      0,
      "resourceType"
    ],
    "message": "Invalid discriminator value. Expected 'GMRInstanceLayer' | 'GMRBackgroundLayer' | 'GMRTileLayer' | 'GMRAssetLayer' | 'GMRPathLayer' | 'GMRLayer'"
  }
]

This is followed up with several more similar errors, but in my room_main.yy file, it looks like the error is from this section of code:

"layers": [
    {"resourceType":"GMREffectLayer", ...

Could simply be that Stitch doesn't support GMREffectLayer layer types.

Thanks

@adam-coster
Copy link
Member

That is exactly the right diagnosis, thanks for the detailed report!

If you don't mind sharing, can you provide your room_main.yy file so I can use it as a sample in the Stitch test suite? That'll help me make sure I'm accounting for whatever data lives in that layer, since we ourselves don't use effect layers.

@adam-coster adam-coster self-assigned this Dec 2, 2023
@adam-coster adam-coster added 📦 core Stitch Core and CLI ✨ feature New feature or request labels Dec 2, 2023
@adam-coster
Copy link
Member

Should be resolved in version 1.55.8, whenever that update shows up in VSCode!

Your room's yy file that includes that layer type will still be useful, since this update just makes Stitch see that room type as "valid" but doesn't actually know anything else about it.

For reference, the spot in the code is here:

const yyRoomEffectLayer = z
.object({
resourceType: z.literal('GMREffectLayer'),
})
.passthrough();

@AvioxArcade
Copy link
Author

AvioxArcade commented Dec 2, 2023

Thanks! It looks like that was the only fix necessary for my project to open!

can you provide your room_main.yy file

Yes, of course!
room_main.zip

Sorry about it being zipped. github won't let me upload .yy files directly.

@adam-coster
Copy link
Member

No worries, that's perfect. Glad it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request 📦 core Stitch Core and CLI
Projects
Status: Done
Development

No branches or pull requests

2 participants