godotengine / godotengine/godot
Parse error at runtime even though everything is fine at design time (OpenXR app on Meta Quest 3)
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducable in 4.4 dev 3 on Meta Quest 3
### System information
Meta Quest 3, V71.0.0
### Issue description
An OpenXR application for Meta Quest 3 aborts with the error "Could not find type "OpenXRFbSpatialEntity" in the current scope", although everything is OK in the editor and "OpenXRFbSpatialEntity" is found via autocomplete. Everything seems OK in the editor.
Even minimal test projects (see appendix) show this error.
Has anyone had similar experiences?
### Steps to reproduce
Load the project into Meta Quest 3, for example via USB into the "Documents" folder.
Start Godot in Meta Quest 3 and import the project.
Load the plugin "Godot OpenXR Vendors plugin for Godot 4.3" from the assets. (It's too big to paste it here.)
Start the project.
### Minimal reproduction project (MRP)
The project requires the "Godot OpenXR Vendors plugin for Godot 4.3", which would make the file too large here.
The actual project is extremely small and consists of only two very small scenes.
[test.zip](https://github.com/user-attachments/files/18451570/test.zip)
Here are the messages from the Godot log file:
SCRIPT ERROR: Parse Error: Could not find type "OpenXRFbSpatialEntity" in the current scope.
at: GDScript::reload (res://main/DefaultScene.gd:7)
SCRIPT ERROR: Parse Error: Identifier "OpenXRFbSpatialEntity" not declared in the current scope.
at: GDScript::reload (res://main/DefaultScene.gd:11)
SCRIPT ERROR: Parse Error: Identifier "OpenXRFbSpatialEntity" not declared in the current scope.
at: GDScript::reload (res://main/DefaultScene.gd:26)
ERROR: Failed to load script "res://main/DefaultScene.gd" with error "Parse error".
at: load (modules/gdscript/gdscript.cpp:3005)
ERROR: Cannot get class 'OpenXRFbSceneManager'.
at: _instantiate_internal (core/object/class_db.cpp:550)
WARNING: Node OpenXRFbSceneManager of type OpenXRFbSceneManager cannot be created. A placeholder will be created instead.
at: instantiate (scene/resources/packed_scene.cpp:277)
Contributor guide
Research direction
Start by reproducing the Meta Quest 3 failure with the attached test.zip and the required Godot OpenXR Vendors plugin. Inspect main/DefaultScene.gd and the logged GDScript reload errors, then trace the runtime class lookup; done means the project loads on the device without the missing-type, missing-identifier, or class-instantiation errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ar-vr-xr
- Domain
- ar-vr-xr, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100