Problems with running project in browser. Main scene isn't being loaded

Godot Version

Godot 4.7

Question

Have an issue trying to run my project in a browser. My main scene, when runing from the editor, is my GameController scene and starts up correctly:

However, when I to run in a browser, it runs a different scene:

Am I missing something here?


Exports always boot from whatever is set in Project Settings → Application → Run → Main Scene, so the first thing to check is what that field actually points to. If it’s set to that other scene, that’s your answer. The editor can hide this because F6 (Run Current Scene) runs whatever tab you have open, so the project can look correct in the editor while the export follows the setting. Set Main Scene to your GameController scene and re export.

If the setting is already correct, the browser is likely serving a cached older build. Web builds cache aggressively, so do a hard refresh (Ctrl+Shift+R) or test in a private window after re exporting and see if it loads the right scene then.

I should have clarified but it is already set:

image

The first screenshot is from the “run project”, I did not use “run current scene”.

Reexporting and refreshing but still not running right unfortunately

Two things I’d check next.

First, Godot settings can have per platform overrides using feature tags, so the web build can boot a different main scene than the editor does. Open your project.godot file in a text editor and search for main_scene. If you see a second line like run/main_scene.web pointing at the other scene, that’s the cause, delete that line and re export.

Second, check the export preset itself. In Project → Export, select your Web preset and look at the Resources tab. If Export Mode is set to Export selected scenes or Export selected resources instead of Export all resources, the build can end up missing or mismatching scenes depending on what’s ticked.

Also, which scene is it actually loading in the browser? Knowing which one it grabs instead would help narrow down where it’s coming from.

I completely forgot to mention that I’m using an extension, LimboAI, for my project.

Main scene is correct in the plain test, but yeah I think the problem was trying to export selected scenes (trying to trim the export size down), but looks like I missed some import files.

Works now, thanks for the help! Now I need to clean up my mess of a project