MIME Type Mismatch Issue When Loading Plugin from Source

163 views
Skip to first unread message

Firas Ben Said

unread,
Mar 18, 2025, 4:35:33 AMMar 18
to BigBlueButton-dev
Hello BBB Team,

I’ve been trying to run a plugin from source following the steps outlined in the GitHub repository documentation, but I keep encountering an issue in the browser. Specifically, the browser console shows the following error:
Screenshot from 2025-03-17 12-40-55.png
To debug this, I checked the Content-Type header using cURL, and here’s the response I received:
```
HTTP/2 200  
accept-ranges: bytes  
access-control-allow-origin: *  
content-type: application/javascript  
date: Fri, 14 Mar 2025 13:47:55 GMT  
etag: W/"19c89a-hU+dYsvQ2+Tw/pumlVHycsc2EvQ"  
ngrok-agent-ips: 41.226.7.27  
vary: Accept-Encoding  
x-powered-by: Express  
content-length: 1689754
```

It appears that the server is correctly setting the Content-Type header to application/javascript for the JavaScript file. However, the browser still treats it as text/html, leading to it being blocked.

I’ve tested this in both Firefox and Chrome, and the issue persists in both browsers.

Has anyone encountered a similar issue, or does anyone have any suggestions on what might be causing this?

Thanks in advance for your help!

Best regards,

Ben Said Firas


leme.gui...@gmail.com

unread,
Mar 26, 2025, 9:35:09 AMMar 26
to BigBlueButton-dev
Hello, Ben, Thanks for the information and feedback.

I am trying to figure it out but I think I would need more information from you. See, ngrok usually put an interstitial page for you to interact with it at least once, this could lead into a problem where nothing in the client will load about the plugins because the response from ngrok is an html claiming for you to click it, hence the `text/html` mime-type.

If that's not the case (you already interacted with ngrok once for every browser you are using - interacted with it outside of bbb scope), I would need more information from this request. Could you do the following?

- Open the console you used to see the logs, but go to the network tab there, and reload the page (to get all requests and responses there);
- Once you done that, search for the name of the plugin inside the network tab and there you'll find headers, preview response and other information.

Could you send a screenshot of the headers tab, the preview tab and also the response tab (please cover credentials if necessary - sessionToken, for instance and domain in which your server is running).

Kind regards,

Guilherme Leme.

Firas Ben Said

unread,
Mar 26, 2025, 10:07:13 AMMar 26
to BigBlueButton-dev

Hi Guilherme,

Thanks for your response.

I interacted with ngrok once on Firefox, but I still faced the same issue. I have attached a screenshot of the headers tab from the network panel for the plugin request (the response header is empty and there is no preview header).
Screenshot from 2025-03-26 14-56-52.png

However, when I tested it in Chrome, I interacted with ngrok, and it worked as expected. So, I’m not sure why Firefox is handling it differently. Do you have any insights on this behavior?

Let me know what you think.

Best regards,

Ben Said Firas



leme.gui...@gmail.com

unread,
Mar 27, 2025, 8:52:31 AMMar 27
to BigBlueButton-dev
Hello, Ben, sorry for the late response.

I have successfully fixed the problem in firefox. The main issue was that while chrome was sending the cookie to prevent the interstitial page to load (It's of the form `abuse_interstitial=<ngrok-uuid>.ngrok-free.app`) in the script tag from html, Firefox has a more restricted policy regarding third-party cookie "interfering" in other websites (In our case, that cookie `abuse_interstitial` was not sent when requesting the script).

Therefore, here is a fix for this:
  • Access the "about:preferences" in your firefox's browsing input (Or go via UI)
  • Search for the word cookie in the search input;
  • There you'll find some of the default configuration on cookies, among those, You'll see three options on cookies preferences: Standard (usually the default), Strict and Custom;
  • For the testing purposes of the plugins, you'll need to select "custom" and inside that selection, there are some checkboxes and some dropdown for you to choose your preferences: You are going to change just the first one labeled "Cookies" to "Cookies from unvisited websites" (since there is no need to block cookies from the already visited websites, such as your ngrok proxy, for this example, of course).
  • Once changed, firefox will ask you to reload all the tabs, do that so you apply the changes.
Now you can test it in firefox and see if it's working.

By the way, thank you for the feedback again, we are including it into the documentation.

Best Regards,

Guilherme Leme.

Firas Ben Said

unread,
Mar 28, 2025, 3:11:29 PMMar 28
to BigBlueButton-dev

Hi Guilherme,

No worries, and thanks for the detailed explanation!

I followed your steps, adjusted the cookie settings in Firefox, and now everything is working fine. I really appreciate your help and the clear instructions.

Thanks again for your support!

Best regards,

Firas Ben Said

Reply all
Reply to author
Forward
0 new messages