OPA Hub Giving White Screen on Login – CSS MIME Issue

I had to place this article here because the other forum where I was answering a request (hope you get to read this, Yiyang!) is behaving strangely – I cannot add images or any external content, so I decided to do it here instead. The issue is that when logging into the Hub, you may receive a white screen in the browser. This was noted in a very recent version.

The error message in the console was :

Refused to apply style from ‘http://<host:port>/<deployname>/opa-hub/hub/oraclejet/css/lib/oj/v7.2.0/alta/oj-alta-min.css’ because its MIME (”) is not a supported stylesheet MIME type, and strict MIME checking is enabled.

This error message is quite confusing, and we have seen it in many different contexts. But by far the most common one is that the file does not exist. You can check this yourself by copying the link and opening it in a new tab, as shown in the example image below:

So the most likely thing is the file has been removed or renamed. I was able to reproduce the error by going to the relevant folder in the WebLogic deployment that matched my situation and I renamed the file, and immediately the error appeared in every browser.

CSS Mime Issue

CSS Mime Issue

So, it is worthwhile checking that this file exists. For those of you who are reading this post on the OPA Hub Website, this discussion also came about because in recent versions the new Hub User Interface uses Oracle JET JavaScript and CSS files, which by default stored on a Content Delivery Network on the Internet. If you want to serve the JavaScript locally, you need to use the admin.sh script (this is assuming you are Private Cloud, as Public Cloud does not have that option) to change the parameter called “use_local_jet_files” to true.

Have a nice day!