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

Can't open scene with missing script #97153

Closed
KoBeWi opened this issue Sep 18, 2024 · 4 comments · Fixed by #97180
Closed

Can't open scene with missing script #97153

KoBeWi opened this issue Sep 18, 2024 · 4 comments · Fixed by #97180

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Sep 18, 2024

Tested versions

4.4 dev 694d3c2
Works in 4.3

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

Trying to open scene with missing script results in error:
image
This is printed in the console:

  Attempt to open script 'res://TheScriptHeNeeds.gd' resulted in error 'File not found'.
  Failed loading resource: res://TheScriptHeNeeds.gd. Make sure resources have been imported by opening the project in the editor at least once.
  C:\godot_source\scene/resources/resource_format_text.cpp:284 - Parse Error: File unrecognized. [Resource file res://INeedScript.tscn:6]
  Failed loading resource: res://INeedScript.tscn. Make sure resources have been imported by opening the project in the editor at least once.

Steps to reproduce

  1. Create scene
  2. Attach a script
  3. Close scene
  4. Delete script file
  5. Try to open scene again
  6. Select "Open Anyway" on missing dependencies

Minimal reproduction project (MRP)

wherescript.zip

@akien-mga
Copy link
Member

I also saw this weird "saved in a newer format" error, I don't remember the circumstance, but the message in itself is completely wrong so that part is a bug too.

@matheusmdx
Copy link
Contributor

Bisecting points to #95508 as the culprit, @Summersay415

image

@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 18, 2024

So the option could be ignore ERR_UNRECOGNIZED when opening scene, but that would require to change error when newer format is used (#90571).

@akien-mga
Copy link
Member

Based on this regression, I think #95508 was wrong, as it claimed to add an error only when no ResourceFormatLoader is found, but that is evidently not the case.

I'll revert it for now, and we can revisit how to signal that there is no ResourceFormatLoader in a safer way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Immediate Blocker
Development

Successfully merging a pull request may close this issue.

3 participants