Skip to content

App won't load in production: MIME type error on redirect to auth on Heroku Docker deployment #155

@siakaramalegos

Description

@siakaramalegos

I'm getting a MIME type error on the auth HTML file only in production (deployed to Heroku using Docker):

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Image

This is technically the index route that is getting redirected to auth. When holding down shift on the auth "script" file, we can see its initiator is a redirect from index.jsx:

Image

Auth response preview:
Image

It's definitely an HTML file:
Image

Headers also indicate it's HTML:
Image

But the app is expecting a JS module instead of an HTML file, and I'm not sure why - I guess because it's being redirected from index.jsx. This feels like an app config issue on auth redirects, but we didn't change any of the default configuration.

Note: app works fine in local development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions