"Error: the passage "loading" does not exist" On load

Hello! (SugarCube 2.30.0)

I checked, the word “loading” doesn’t exist in any passage, passage name, the stylesheet, or the javascript section, so it isn’t anything I put in there.

When I open the html file in the browser it works. It’s when I upload it to Itch.io and play it: it will show the loading screen and then all you have is the error:
“Error: the passage “loading” does not exist”

If I reupload it with Config.saves.autoload set to false the error goes away. So how would I prevent it from happening?

Thank you!

I’d have to see the code to figure that one out. If you could post a link to the HTML that’s causing the problem, then I could take a look at it to see what’s happening.

Here’s the html file:
index.zip (188.5 KB)

I’m sure it has something to do with saves; it wasn’t doing it at first, and I’m pretty sure the error started after I closed and reopened it without going to a passage that was tagged for saving. And of course because when I uploaded it without autoload it ran like normal.

Would it help to set a start passage with a goto macro sending you to a passage tagged for saving?

Did your project ever have a passage named “loading”? Or have you been reusing project names?

I ask because if you get that error immediately after attempting to load a save, autosave or not, then it seems likely that it’s attempting to play a passage named “loading” because it was recorded in the save that you’re loading.

Try deleting the current autosave, set Config.saves.autoload to your original setting, and then try a new playthrough to see if that resolves the issue.

Nope and nope, and the autosave had been deleted immediately before the error occurred as well.
The start passage isn’t tagged to save, but when I deleted the autosave by reuploading it with “Config.saves-autoload = false;” (and nothing else changed) it fixed the error, so it seems that it had tried to save progress when loading, which created an imaginary “loading” passage which it tried to return to.
Since the start passage isn’t tagged to save, if I closed it at that point then this faulty save wouldn’t have been overwritten by visiting another passage like I was usually doing.

Setting Config.saves-autoload to false does not delete an existing autosave, it simply doesn’t autoload it.

No, that doesn’t happen.

Yes, not delete, it just overwrites it once you go to a different passage tagged for saving.
When I inspected the element during the error the div under “passages” had:
id=“passage-loading” data-passage=“loading”
I’m afraid I don’t remember if it had the tag “save”, but it may have.

Previous to the error occurring I had run the script in the game to delete the autosave and closed it, then reopened and closed it without leaving the start passage, so if it wasn’t creating a new save somehow at or before the start passage then changing the autoload to false wouldn’t have affected anything; as far as I can remember I’ve never used the passage name “loading” in the game at all.

As stated my TME the “loading” message doesn’t work that way, which you can see for yourself if you use your web-browser’s Web Developer Tools to Inspect the HTML elements that make up the Document Object Model of current the page.

You would find a HTML structure like the following at the start of the <body> element’s content…

<div id="init-screen">
	<div id="init-loading"><div>Loading…</div></div>
</div>