Skip to content

Desk fails to load: Refused to execute script/style due to incorrect MIME type #1899

Description

@NeihTzxc

The web interface fails to load properly (resulting in a blank page or broken UI) because the browser refuses to execute CSS and Javascript files. The console shows a MIME type mismatch, where files expected as text/css or application/javascript are being served as text/html. This usually indicates that Nginx cannot find the physical files and is instead serving a 404 error page in HTML format.

Context information (for bug reports)
Framework: Frappe version-15
Environment: Dockerized deployment using frappe_docker
Build Command:

docker build --no-cache \
  --build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
  --build-arg=FRAPPE_BRANCH=version-15 \
  --secret=id=apps_json,src=apps.json \
  --tag=image-name:tag \
  --file=images/custom/Containerfile .

Steps to reproduce the issue:

  1. Build a custom image using the provided docker build command.
  2. Deploy the stack using Docker Compose.
  3. Access the Frappe Desk via a web browser.

Observed result:

  • Browser Console Errors: Refused to apply style from ... because its MIME type ('text/html') is not a supported stylesheet MIME type.
  • Multiple 404 Not Found errors for assets located in /assets/frappe/dist/.
  • Uncaught TypeError: Cannot read properties of undefined due to missing JS dependencies.
    Expected result:
  • All assets should be served with the correct MIME types (text/css or application/javascript).
  • The Frappe Desk should render and function correctly.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions