"rasa inspect" fails to load JavaScript due to wrong MIME type - Rasa CALM - Rasa Community Forum

👋 Introducing the Rasa Playground

“rasa inspect” fails to load JavaScript due to wrong MIME type

post by alexa on Oct 20, 2024

Rasa Pro CALM Developer Edition on Windows 10 with Python 3.9.13. When I run “rasa inspect” it starts local Rasa server (on http://0.0.0.0:5005) and opens a browser window at “ http://localhost:5005/webhooks/inspector/inspect.html”; but the later fails to load JavaScript code because of wrong MIME type returned by the server for index_xyz.js.

Full error in the browser console:


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.

Is there any way to fix this?


post by alexa on Oct 20, 2024

Found the root cause of the problem - it was the following key in Windows Registry:


HKEY_CLASSES_ROOT\.js\Content Type

For some reason it was set to “plain/text” instead of “application/javascript”.

After changing the key value, rebooting the laptop, purging the “uv cache” and reinstalling the rasa-pro SDK - the problem is gone.


post by KenrickLance on Oct 29, 2024

Thank you! I was having the same problem and this worked.