MIME type ('text/html') is not executable when adding a javascript file inside /react/features/stream-effects/blur

Hey I am trying to replace the functionality of the background blurring with face detection. I made the scripts and worked outside of jitsi and now I’m trying to integrate it. I have a web worker I would like to start when the “blurring” starts that will start drawing to the canvas.

Simply in the JitsiStreamBlurEffect I’m calling the constructor of my main.js method like so
this._main = new FaceDetect(this._outputCanvasElement.getContext(‘2d’));

Inside FaceDetect I import my worker like so
this.mainWorker = new Worker(’./main_worker.js’);

However when I start my program and start the background-blur effect the console is printing
Refused to execute script from ‘https://localhost:8080/main_worker.js’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.

I know this may not be Jitsi related but I couldn’t find a proper solution. Any help is appreciated.

I noticed that the file main_worker.js was not being served. I even moved it to the root directory of the project but it still is not served. This does not happen on the live server. When I add a sample file test.js to the root directory on my live server I can access that file like this jitsi.example.com/test.js, but why can’t I do it locally? It is a bit troublesome having to test on the remote server.

You may need to tweak the webpack dev server config. It looks like it’s being interpreted as a meeting name.

1 Like

Yeah this is exactly what is happening. Whenever I try to navigate to check if a file is being served like localhost:8080/test.js it starts a meeting with the name test.js.

I just edited the webpack.config.js file and added my folder to the devServerProxyBypass function and it worked! Thanks