Skip to content

Service Worker registration failed (text/html) #1068

@luwes

Description

@luwes

Bug report

Packages affected

  • sandpack-client
  • sandpack-react

Description of the problem

console is showing an error since version 2.11.0

Service Worker registration failed: DOMException: Failed to register a ServiceWorker for scope ('https://2-11-2-sandpack.codesandbox.io/') with script ('https://2-11-2-sandpack.codesandbox.io/csb-sw.js'): The script has an unsupported MIME type ('text/html').

SCR-20240125-pokw

Pinning both the client and react pkg to 2.10.0 fixed the issue on our end.

Used here muxinc/media-chrome#791

Repro here, error visible in the console
https://media-chrome-docs-a1ftyhecw-mux.vercel.app/docs/en/get-started

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issues that needs consideration

    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