Cannot open file 'res://Init.tscn' - A blank scene!!

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By HaleyHalcyon

I exported my game for HTML5. The game runs perfectly fine on the Godot editor, but it crashes if I change the initial scene, even if the scene is completely blank save for a Control. Here’s what I see on the developer console.

Godot Engine v3.4.stable.mono.official.206ba70f4 - https://godotengine.org tmp_js_export.js:347:16
OpenGL ES 2.0 Renderer: ANGLE (Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0, D3D11-27.20.100.9664) tmp_js_export.js:347:16
OpenGL ES Batching: ON tmp_js_export.js:347:16
 tmp_js_export.js:347:16
ERROR: Mono: Core API hash mismatch. tmp_js_export.js:362:18
   at: _init_godot_api_hashes (modules/mono/mono_gd/gd_mono.cpp:490) - Mono: Core API hash mismatch. tmp_js_export.js:362:18
Mono: Config attempting to parse: '/root/mono-installs/wasm-runtime-release/etc/mono/config'. tmp_js_export.js:347:16
Mono: Config attempting to parse: '/home/web_user/.mono/config'. tmp_js_export.js:347:16
ERROR: Cannot open file 'res://Init.tscn'. tmp_js_export.js:362:18
   at: load_interactive (scene/resources/resource_format_text.cpp:1183) - Condition "err != OK" is true. Returned: Ref<ResourceInteractiveLoader>() tmp_js_export.js:362:18
ERROR: Failed loading resource: res://Init.tscn. Make sure resources have been imported by opening the project in the editor at least once. tmp_js_export.js:362:18
   at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() tmp_js_export.js:362:18
ERROR: Failed loading scene: res://Init.tscn tmp_js_export.js:362:18
   at: start (main/main.cpp:1998) - Condition "!scene" is true. Returned: false tmp_js_export.js:362:18
exception thrown: RuntimeError: indirect call to null,godot_js_main(int, char**)@:wasm-function[15324]:0x2ca1c5
main@:wasm-function[31565]:0x73169e
Godot/Module._main@http://localhost:8060/tmp_js_export.js:9:403120
callMain@http://localhost:8060/tmp_js_export.js:9:415259
SafeEngine/start/Engine</</<@http://localhost:8060/tmp_js_export.js:694:17
SafeEngine/start/Engine</<@http://localhost:8060/tmp_js_export.js:689:14
tmp_js_export.js:362:18
indirect call to null tmp_js_export.html:213:13

Would be helpful to see some code. Or are you just exporting a blank scene with no code?
Did you check the export settings? there’s a tab where you can set which resources get exported.
Are you running the html game from godot’s localhost http server?

rossunger | 2022-01-30 20:37

ERROR: Mono: Core API hash mismatch. tmp_js_export.js:362:18
at: _init_godot_api_hashes (modules/mono/mono_gd/gd_mono.cpp:490) - Mono: Core API hash mismatch.

Did you try with the non-Mono version of Godot?

Are your export templates up to date? If you updated your Godot version you need to also update your export templates.

Also, is the name of the scene Init.tscn with an uppercase I in your file system?

Does it work if you export for desktop as an executable?

Zylann | 2022-01-31 13:58

I also randomly started having this problem after changing the initial scene. Godot’s inbuilt Windows debugger doesn’t have this same problem. Reloading the project changed nothing.

ERROR: Cannot open file 'res://essential/Init.tscn'.
   at: load_interactive (scene/resources/resource_format_text.cpp:1183) - Condition "err != OK" is true. Returned: Ref<ResourceInteractiveLoader>()
ERROR: Failed loading resource: res://essential/Init.tscn. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES()
ERROR: Failed loading scene: res://essential/Init.tscn
   at: start (main/main.cpp:2107) - Condition "!scene" is true. Returned: false
indirect call to null

HaleyHalcyon | 2022-12-19 03:23