bug: MIME Types ignored/blocked in strict mode
See original GitHub issueBug Report
Platform(s)
iOS (14.0+)
Current Behavior
XCode / iOS Simulator is not loading local stylesheets when running on brand new MacBook with M1 Pro - page loads but local CSS files do not load. Safari Inspector shows error messages related to the MIME types of the specified stylesheets, even when type="text/css"
is specified in the tags. XCode is NOT running in Rosetta mode as suggested in previous bug reports.
Safari Error Message: “Did not parse stylesheet at ‘capacitor://{app_name}/{file_name}.css’ because non CSS MIME types are not allowed in strict mode.”
Expected Behavior
Specified stylesheets should load without error and be applied properly.
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top Results From Across the Web
Resource blocked due to MIME type mismatch (X-Content ...
We started facing this error in production after our devops team changed the webserver configuration by adding X-Content-Type-Options: nosniff .
Read more >Properly configuring server MIME types - MDN Web Docs
Some content types, such as executable programs, are inherently unsafe. For this reason, these MIME types are usually restricted in terms of ...
Read more >Script blocked due to mime type mismatch - Marketing Nation
The underlying problem is a bug in IE9 which initially detects the CSS as a script, then barfs when it has non-script MIME...
Read more >Strict Mode - React
StrictMode is a tool for highlighting potential problems in an application. Like Fragment , StrictMode does not render any visible UI.
Read more >Content-Security-Policy Header CSP Reference & Examples
The sandbox applies a same origin policy, prevents popups, plugins and script execution is blocked. You can keep the sandbox value empty to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 just got an M1 Mac and now facing this issue with all of my projects. Not running Xcode in Rosetta either.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.