An issue with getting my game to run in browsers

Hello! I am having trouble getting one of my projects to upload onto itch.io as a browser title. I have gotten numerous put/context canceled errors in regards to several files, including some that I do not have in the project.

I did manually remove numerous RTP files in the project as opposed to using the exclude unused file option, and I am wondering if this could be causing the issue? The game works fine as a .exe, as long as I do not encrypt it. When I encrypt it, I get errors regarding the absence of files that the game should have.
the first part can have many reasons and we would have to see the messages to guess what it is.

the second part about encrypted files missing is easier:
One of your plugins uses the wrong function to load its files.

there is one way to load with a specific function that can handle the encryption, but if a plugin programmer uses a basic html-load function then that will not be able to handle encrypted files.

Basically you'll have to find out which one of your plugins use the wrong function, and then request a patch for it (disable one plugin after another and try an encrypted plugin without that until you find the culprit)
the first part can have many reasons and we would have to see the messages to guess what it is.

the second part about encrypted files missing is easier:
One of your plugins uses the wrong function to load its files.

there is one way to load with a specific function that can handle the encryption, but if a plugin programmer uses a basic html-load function then that will not be able to handle encrypted files.

Basically you'll have to find out which one of your plugins use the wrong function, and then request a patch for it (disable one plugin after another and try an encrypted plugin without that until you find the culprit)
Here is an image of the error that I get:

image.png



It is always this same error, but for different files. At first, it was the icon, but then I tested removing that, and it became some files that I didn't have.

I replaced them to see what would happen, and now it is the tilesets. So, my theory is that I have to replace everything that I manually removed.
One problem is that your folderpath is breaking networking rules, causing all browsers to have problems loading all files.

Your folder is NOT named "Demon%20Blade", that is the problem in the error.
The %20 is the override for forcing the bbrowser to accept a space - a symbol forbidden under networking rules - as part of the adress line, and those overrides are problematic as soon as you get into the internet.

There is a reason why internet files use the underscore instead of spaces...

Please rename your project folder and try again.
(There might be other reasons for your errors in addition to using a forbidden space)
One problem is that your folderpath is breaking networking rules, causing all browsers to have problems loading all files.

Your folder is NOT named "Demon%20Blade", that is the problem in the error.
The %20 is the override for forcing the bbrowser to accept a space - a symbol forbidden under networking rules - as part of the adress line, and those overrides are problematic as soon as you get into the internet.

There is a reason why internet files use the underscore instead of spaces...

Please rename your project folder and try again.
(There might be other reasons for your errors in addition to using a forbidden space)
Alright, I did that, but it didn't fix the issue.

Also, with the image I had posted, I made the mistake of trying to run the executable, but it's the same exact type of error. Using a correct folder, it targets icon.png.

I have the icon folder, and the icon.png, so I don't know why.
can you give a new screenshot of the error, as well as a screenshot of the local folder with the file it tries to load?
as I mentioned there are other possible reasons, and we need to see what you have to find out what might have happened.
can you give a new screenshot of the error, as well as a screenshot of the local folder with the file it tries to load?
as I mentioned there are other possible reasons, and we need to see what you have to find out what might have happened.
Here is the error, and some screenshots of the folders/icon image.

image.png
wrong screenshot - the file it is looking for is the icon.png inside the icon folder.

you also might want to change your windows settings to always display the file extension
Windows has an override for capitalisation, but on the web icon.png and icon.PNG are two different files and that difference is one of the known quirks that can cause such errors, which is why I asked for a screenshot instead of retyping the name.
wrong screenshot - the file it is looking for is the icon.png inside the icon folder.

you also might want to change your windows settings to always display the file extension
Windows has an override for capitalisation, but on the web icon.png and icon.PNG are two different files and that difference is one of the known quirks that can cause such errors, which is why I asked for a screenshot instead of retyping the name.
But that is what I showed?

I combined three screenshots into one. The top is the error, the middle is the project directory, with the visible icon folder, and the bottom is the lone icon.png. (It doesn't say icon.png, but it is a png. I even double checked by looking at its properties.)

EDIT: A friend has been testing uploading my project to itch.io and editing things, and managed to make it work after deleting the characters folder. (Of course, the game would break the moment he starts it.) So, maybe the problem lies in there somewhere?
managed to make it work after deleting the characters folder.
that in itself doesn't make any sense, deleting images would only cause more load errors.

So this points to two very different possibilities:

1) something else was changed but forgotten to mention
2) you have some form of cache or preload plugin installed that had a very bad form of loading everything after scanning files.

Personally I would bet on 1) and you would have to find out what else the friend had done.
It does seem like something is messed up with your file references.

If you export the game completely normally, no excluding files, no encryption, no manually deleting anything, does it play properly?

What software are you using to create your zip file?

You might also want to reach out to itch, as this error is coming from their Web interface, not your game.
that in itself doesn't make any sense, deleting images would only cause more load errors.

So this points to two very different possibilities:

1) something else was changed but forgotten to mention
2) you have some form of cache or preload plugin installed that had a very bad form of loading everything after scanning files.

Personally I would bet on 1) and you would have to find out what else the friend had done.


So, my friend did a deep dive into the game and managed to figure out the issue! It was the use of % in filenames to use GALV's Character frames.

We edited the code to use ~'s instead, and it uploads fine now.

Thanks for trying to help me up to this point.
t was the use of % in filenames to use GALV's Character frames.
Galv made that kind of mistake???
% isn't forbidden but it is used in HTML overrides, which makes it a very bad choice to use.

it should be reported to @Galv in case he is still active to correct that.
Yep, it was a very bad choice to use.

If you need to get it working, edit the plugin file (with notepad or similar) and look for 2 instances of the text:
characterName.match(/\%\((.*)\)/i)

Change the % symbol for another symbol you want to use. Then update your files as needed.

Original thread: https://forums.rpgmakerweb.com/threads/an-issue-with-getting-my-game-to-run-in-browsers.155308/