Resource from mediaelement blocked due to MIME type mismatch - drupal-7

I'm trying to fix a hacked site for someone so I am not sure why this is happening:
The resource from “https://xxx.ca/sites/xxxx/libraries/mediaelement/build/mediaelement-and-player.min.js?v=4” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). xxx.ca
I've installed mediaelement in my libraries folder and also in the modules folder.
Any suggestions?

Related

Click to Download .ICS File

In my React project, I have a calendar .ics file in my local folders and want the user to download once they click a button so I'm providing the path to the .ics file in that button. However, I'm getting this error:
"Module parse failed: Unexpected token (4:6)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file."
How do I simply have users click a button to download an .ics file?
Introduction
I was going to just add a comment to your answer, since I don't have a definitive answer for your question, but it turns out that I need a minimum of 50 reputation, so...
I'm not sure if provided enough information for your problem, but I'll answer based on what could understand from your statements.
The Problem
[...] However, I'm getting this error:
"Module parse failed: Unexpected token (4:6) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file."
I don't know what module bundler your are using, but it seems that your bundler can't recognize .ics files. Hence, you need to declare the type of file. Check your module bundler configuration files and add the required support to the aforesaid extension. If you're using Webpack, for example, change the rules attribute of your webpack.config document adding a new rule, notice that, in this case, you'll need to provide a loader.
I hope this helps. This is my first answer here on StackOverflow, sorry if I misunderstood anything or something simillar.

CRA - Failed to register a ServiceWorker, unsupported MIME type ('text/html')

I am getting the following error when publishing my create react app but the error doesn't appear locally. I recently updated my React version and a load of packages too. I'm guessing it's possibly something to do with that as I've never had this issue before?
Error during service worker registration: DOMException: Failed to register a ServiceWorker for scope ('https://**subdomain**.azurewebsites.net/') with script ('https://**subdomain**.azurewebsites.net/service-worker.js'): The script has an unsupported MIME type ('text/html').
Any input on this will be greatly appreciated. The error doesn't appear to be breaking anything from what I can see but I'd rather not push this to production with any kind of errors
So turns out the issue was because I updated the react version. CRA doesn't have service workers out of the box anymore. The project was returning 'unsupported MIME type ('text/html')' because it was hitting 404 looking for a file that doesn't exist.
The fix was relativly simple.
I replaced the registerServiceWorker() in my index.js file with reportWebVitals(). I then added reportWebVitals.js to my src folder. (I just created a temp react project and pulled the file from that). After I did that it started to work for me. I think I also had to npm install web-vitals.

Failed to register a ServiceWorker for scope - The script has an unsupported MIME type ('text/html')

Im getting this message in the console when I view the production site. Running locally everything is registers perfectly and all the lighthouse checks pass in chrome dev tools.
Ive tried trouble shooting following the following threads but no luck:
Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html') Vue js?
Service Worker registration error: Unsupported MIME type ('text/html')
Any help would be appreciated as I would really like to run this as a PWA. Here is a link to the full repo
https://github.com/brianlfarmerllc/React_PWA_ReadMeFormatter
I can provide code snippets if that is more helpful
The problem actually fixed itself when I push to heroku a second time. Really not sure what the fix/glitch was but it is resolved.

JavaMail not working in OSGI(ServiceMix/Karaf)

I created a Karaf Instance on a Service Mix(7.0.1) and deployed my bundles into it.
The camel route is starting up properly, but always fails when it should send an email.
With the following exception:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
I tried several solutions i found from different sources around the web, but cannot actually fix it.
I tried commenting javax.activation out in the jre.properties file of the instance, as well as using a bundle that contains java mail and the osgi friendly version of the activation bundle in the same feature.
Could openJDK be an issue here?
Note: Everything works perfectly fine on a windows/oraclejdk environment, the exception only occurs in a linux/openjdk environment.
My issue stemed from a class loader problem after all and i fixed it by bundling javax.mail/mail/1.4.7 and org.apache.servicemix.specs.activation-api-1.1/2.8.0 in the same bundle.
I also needed to remove every occurence of javax.activation from the jre.properties and config.properties file of the child instance.
I am not sure why it ran per default on a different environment, as in theory the same classloader problems should have occured too, but that might be connected to different JREs being in use.

Package acceptance validation error: WMAppManifest.xml wasn’t found

I built my windows8.1 silverlight app with vs2015.
while submitting to store its complain as "Package acceptance validation error: WMAppManifest.xml wasn’t found" tough it exists.
Local windows app certification kit complaining that there is an error in reading this file.
also looked into below post, MY wmappmanifest schema looks correct
AppManifest Validation failed. Invalid AppPlatformVersion in WMAppmanifest.xml
Could you please help me in figuring out the issue here? you help is highly appricated.
My silly mistake. After editing xap file, while creating zip file creating folder inside folder. It is fixed now.

Resources