question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: MIME Types ignored/blocked in strict mode

See original GitHub issue

Bug 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:closed
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
christinaasucommented, Aug 1, 2022

+1 just got an M1 Mac and now facing this issue with all of my projects. Not running Xcode in Rosetta either.

0reactions
ionitron-bot[bot]commented, Nov 10, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found