Skip to content

🐛 BUG: hmr-client.js fails to load when inside of a srcdoc iframe #3903

Open
@KevinBrogan

Description

@KevinBrogan

Quick checklist

  • I am using the latest version of Snowpack and all plugins.

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the bug

<iframe srcdoc="<script src='someFileOnDevServer.js'></script>"></iframe>

results in an error

about:srcdoc:1 Uncaught DOMException: Failed to construct 'WebSocket': The URL 'wss:///' is invalid.
at http://localhost:8080/_snowpack/hmr-client.js:58:16

and because the exception isn't caught, the module fails to load.

Steps to reproduce

  1. Load a dev server hsotged file with HMR inside of a srcdoc iframe
  2. Error! Uncaught DOMException:

Link to minimal reproducible example (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions