Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

v0.5.8.74 is the latest version that works

A topic by SanctumSanctorum created 1 day ago Views: 37 Replies: 3
Viewing posts 1 to 2

First of all, I love the work you're doing with this. I came across it about a week or so ago and after initially downloading v0.5.8.103 and being unable to set up a game on the scene editor page I downloaded v0.5.8.74 and that worked fine so I figured it was just a bug with v0.5.8.103 that would get caught by the next version but now after trying v0.5.8.147, I still can't set up a game on the scene editor page.

What's happening is the scenarios section shows up fine and I can click the different scenarios and the villains show up so I can choose between them but none of the Standard or Modular sets show up to choose from. After taking a look at the browser I noticed two errors showing up. One related to being unable to load 'card_statistics.js' as a module script because the server responded with a MIME type of "text/plain" and one related to the createScenarios function in the scene.html file (specifically parentElement being null).

After commenting out this section of code that was throwing the error..

if( key == "Weekly Challenges" ) {
            summary.dataset.total = sets_json[key].scenarios.length
            for( let text of sets_json[key].scenarios ) {
                if( file_names.includes(text) ) {
                    document.getElementById(text).parentElement.style.display = ""
                 }
             }
         }

..I was able to get the Standard and Modular sets to load on the scene editor page but still get the error of the page being unable to load 'card_statistics.js' as a module script and once I select villains/sets/hero and click play game, the new game pages opens up but doesn't load anything and shows the same module script error but this time related to the 'marvel.js' file.

It looks like nobody else has mentioned encountering this so I'm sure it's a problem on my end but after trying it in multiple different browsers and getting the same error in each of them, I can't figure out how to get either of the newest versions working.

Developer (2 edits)

Hi @SanctumSanctorum,

Thank you for your detailed bug report!

It sounds like you’re encountering a MIME type issue with loading JavaScript module scripts. Specifically, you might see an error message like this in your browser:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/plain”. Strict MIME type checking is enforced for module scripts per HTML spec.

If you are seeing this error, it may be related to how your system is configured to handle .js files. We use the mimetypes library to determine the MIME type, which reads data from your Windows registry.

Please check the following registry key:

HKEY_CLASSES_ROOT\.js

Ensure that the Content Type is set to application/javascript instead of text/plain. Make sure to back up your registry before making any changes.

To make it easier, here is a registry file you can use to set the correct values:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.js]
@="JSFile"
"Content Type"="application/javascript"
"PerceivedType"="text"

After updating this key, you won’t need to restart your PC; just restart the game, and everything should work fine.

If the issue persists or if the Content Type is already set correctly, please provide us with more details about the error.


Regarding why you didn’t encounter this issue in v0.5.8.74:

In that version, we used the following code:

<script src="/public/js/xxx.js" defer></script>

In later versions, we updated the code to:

<script type="module">
    import { XXX } from "/public/js/xxx.js";

This change may have introduced stricter MIME type requirements.

Thank you for your patience, and we look forward to resolving this issue!

Yep, this is exactly what the problem was. I changed the ContentType to application/javascript
 and everything is working great now.

Thanks so much for the help!

Developer

Hi @SanctumSanctorum,

I’m so glad to hear that the issue is resolved and everything is working great now!

If you have any more questions or need further assistance in the future, feel free to reach out. Thank you for your patience, and happy gaming!