Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API docs loading issue due to incorrect MIME type of styles and scripts #1036

Closed
johanrd opened this issue Nov 7, 2023 · 10 comments
Closed

Comments

@johanrd
Copy link
Contributor

johanrd commented Nov 7, 2023

  1. Go here: https://ember-resources.pages.dev/functions/use.html
  2. See that sub pages of the api docs refuse to load scripts and style because the MIME type is not supported:
Screenshot 2023-11-07 at 13 32 55
Refused to apply style from 'https://ember-resources.pages.dev/functions/assets/highlight.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
use.html:1 Refused to apply style from 'https://ember-resources.pages.dev/functions/assets/custom.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
use.html:1 Refused to execute script from 'https://ember-resources.pages.dev/functions/assets/main.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
use.html:1 Refused to apply style from 'https://ember-resources.pages.dev/functions/assets/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
use.html:1 Refused to execute script from 'https://ember-resources.pages.dev/functions/assets/navigation.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
use.html:1 Refused to execute script from 'https://ember-resources.pages.dev/functions/assets/search.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
@NullVoxPopuli
Copy link
Owner

For step 1, where'd you get that link?

Anywho, The underlying issue is all Cloudflare breaking things.
Here is the background: cloudflare/workers-sdk#2240 (comment)

This caused it: cloudflare/workers-sdk#2103

@NullVoxPopuli
Copy link
Owner

the page you're looking for is here: https://ember-resources.pages.dev/funcs/use.html

It seems the script that rewrites functions to funcs forgot about some links in the nav https://github.com/NullVoxPopuli/ember-resources/blob/main/.github/workflows/ci.yml#L261

@johanrd
Copy link
Contributor Author

johanrd commented Nov 7, 2023

Ah, thanks, hehe,

Step -2: Go to the main site of the repository: https://github.com/NullVoxPopuli/ember-resources
Step -1: Click link to "API Reference" in section Documentation
Screenshot 2023-11-07 at 14 19 35

this links you to https://ember-resources.pages.dev/modules

Step: 0: Click on "use"
Screenshot 2023-11-07 at 14 19 28

this links you to https://ember-resources.pages.dev/functions/use.html

@johanrd
Copy link
Contributor Author

johanrd commented Dec 18, 2023

@NullVoxPopuli The docs navigation is still broken.

Could it be as easy as this?

https://github.com/NullVoxPopuli/ember-resources/blob/main/docs/typedoc.config.json

  "sidebarLinks": {
-    "link": "/functions/link.link.html",
-    "modifier": "/functions/modifier.modifier.html",
-    "service": "/functions/service.service.html",
-    "RemoteData": "/functions/util_remote_data.RemoteData.html",
-    "UpdateFrequency": "/functions/util_fps.UpdateFrequency.html",
-    "keepLatest": "/functions/util_keep_latest.keepLatest.html",
-    "debounce": "/functions/util_debounce.debounce.html",
-    "map": "/functions/util_map.map.html",
-    "trackedFunction": "/functions/util_function.trackedFunction.html",
-    "trackedTask": "/functions/util_ember_concurrency.trackedTask.html",
-    "helper": "/functions/util_helper.helper.html"
+    "link": "/funcs/link.link.html",
+    "modifier": "/funcs/modifier.modifier.html",
+    "service": "/funcs/service.service.html",
+    "RemoteData": "/funcs/util_remote_data.RemoteData.html",
+    "UpdateFrequency": "/funcs/util_fps.UpdateFrequency.html",
+    "keepLatest": "/funcs/util_keep_latest.keepLatest.html",
+    "debounce": "/funcs/util_debounce.debounce.html",
+    "map": "/funcs/util_map.map.html",
+    "trackedFunction": "/funcs/util_function.trackedFunction.html",
+    "trackedTask": "/funcs/util_ember_concurrency.trackedTask.html",
+    "helper": "/funcs/util_helper.helper.html"
  },

@NullVoxPopuli
Copy link
Owner

Could it be as easy as this?

Probably! Do you want to submit a pr?

johanrd added a commit to johanrd/ember-resources that referenced this issue Dec 18, 2023
NullVoxPopuli added a commit that referenced this issue Dec 18, 2023
docs: Update typedoc.config.json – possible fix for #1036
johanrd added a commit to johanrd/ember-resources that referenced this issue Dec 18, 2023
NullVoxPopuli added a commit that referenced this issue Dec 18, 2023
docs: Update typedoc.utils.config.json continuation of #1036
@NullVoxPopuli
Copy link
Owner

perhaps I need to not use cloudflare for typedoc deployments :(

@johanrd
Copy link
Contributor Author

johanrd commented Jan 12, 2024

seems fixed now!

@johanrd
Copy link
Contributor Author

johanrd commented Aug 23, 2024

Reopening, the issue is back now.

  1. Go here: https://ember-resources.pages.dev/
  2. Click on resourceFactory
  3. See missing styles due to Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.:
Screenshot 2024-08-23 at 13 33 59

@johanrd johanrd reopened this Aug 23, 2024
@NullVoxPopuli
Copy link
Owner

grrrrr this functions thing oof

@NullVoxPopuli
Copy link
Owner

ah, in protest, I moved the docs here to Vercel: https://ember-resources.nullvoxpopuli.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants